Discussion:
[OpenLayers-Users] WMSFeatureInfo not working on Firefox on Ubuntu 12.04
danny shevitz
2012-05-24 22:28:40 UTC
Permalink
Howdy,

We have an Openlayers application that is stable and has worked for a while on
our private network. If I hit it with from Firefox 12.0 on Windows 7 everything
works as expected.

If I hit the same page from Firefox 12.0 on Ubuntu 12.04. The map isn't
clickable anymore. In particular we have a client side vector layer of points
that the
WMSGetFeatureInfo adds points to. On the Ubuntu box, it is like the event isn't
registered. Absolutely nothing happens and in Firebug, no wms GetFeatureInfo
request is made.

Is this a known issue?

thanks,
Danny
Phil Scadden
2012-05-24 23:19:01 UTC
Permalink
Got a proxy installed? You need it.
http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.
danny shevitz
2012-05-29 16:23:10 UTC
Permalink
Phil Scadden <***@...> writes:

> Got a proxy installed? You need it.
> http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost
>
> Notice: This email and any attachments are confidential. If received in error
please destroy and
> immediately notify us. Do not copy or disclose the contents.

I am using nginx and uwsgi. I have proxy directives defined in the nginx
configuration. You are correct that I am displaying layers from a Geoserver
which is not on the server. However I am able to see WMS layers on the Geoserver
just fine. It is only the WMSGetFeatureInfo that is failing. I presume
WMSGetFeatureInfo uses a GET request under the hood. If so, my proxy is fine
because otherwise, the WMS layer wouldn't display.

In addition, and the real killer, is that hitting the same server from a Windows
box, renders the map just fine and allows the clickable interaction I need. It
only seems to be a problem of the Firefox client on Ubuntu.

Again to reiterate,
Ubuntu Firefox -> known working remote server fails
Ubuntu Firefox -> same machine server fails
Windows box Firefox -> know working remote server works
Windows box Firefox -> same Ubuntu machine server two lines up works

Any ideas?

thanks,
Danny
Smaran Harihar
2012-05-29 17:03:07 UTC
Permalink
Hi,

Phil: Could this be the same issue as mine. Even i was not able to get it
done.

Danny: Of course I was not able to check on windows, but what is the error
that you are getting on your developer tool? Is it something related
to *XMLHttpRequest
not able to load*.



On Tue, May 29, 2012 at 9:23 AM, danny shevitz <***@lanl.gov> wrote:

> Phil Scadden <***@...> writes:
>
> > Got a proxy installed? You need it.
> > http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost
> >
> > Notice: This email and any attachments are confidential. If received in
> error
> please destroy and
> > immediately notify us. Do not copy or disclose the contents.
>
> I am using nginx and uwsgi. I have proxy directives defined in the nginx
> configuration. You are correct that I am displaying layers from a Geoserver
> which is not on the server. However I am able to see WMS layers on the
> Geoserver
> just fine. It is only the WMSGetFeatureInfo that is failing. I presume
> WMSGetFeatureInfo uses a GET request under the hood. If so, my proxy is
> fine
> because otherwise, the WMS layer wouldn't display.
>
> In addition, and the real killer, is that hitting the same server from a
> Windows
> box, renders the map just fine and allows the clickable interaction I
> need. It
> only seems to be a problem of the Firefox client on Ubuntu.
>
> Again to reiterate,
> Ubuntu Firefox -> known working remote server fails
> Ubuntu Firefox -> same machine server fails
> Windows box Firefox -> know working remote server works
> Windows box Firefox -> same Ubuntu machine server two lines up works
>
> Any ideas?
>
> thanks,
> Danny
>
> _______________________________________________
> Users mailing list
> ***@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>



--
Thanks & Regards
Smaran Harihar
danny shevitz
2012-05-29 20:06:05 UTC
Permalink
> Hi,
>
> Phil: Could this be the same issue as mine. Even i was not able to get it done.
>
> Danny: Of course I was not able to check on windows, but what is the error
that you are getting on your developer tool? Is it something related to
XMLHttpRequest not able to load.

A second related comment.
Gery .
2012-05-29 20:46:09 UTC
Permalink
Hello Danny,

I don't know if this will help you but I had a similar problem, ie. my map was unclickable. I pressed almost everthing in my keyboard but nothing, the thing never worked. After rechecking things, my mistake was that I assigned the ip in my html and was trying to get the map through localhost, it was quite silly the error but yes it happens sometimes. Perhaps something very obvious is actually your problem, and the code might be right.

HTH,

Gery


> To: openlayers-***@lists.osgeo.org
> From: ***@lanl.gov
> Date: Tue, 29 May 2012 20:06:05 +0000
> Subject: Re: [OpenLayers-Users] WMSFeatureInfo not working on Firefox on Ubuntu 12.04
>
>
> > Hi,
> >
> > Phil: Could this be the same issue as mine. Even i was not able to get it done.
> >
> > Danny: Of course I was not able to check on windows, but what is the error
> that you are getting on your developer tool? Is it something related to
> XMLHttpRequest not able to load.
>
danny shevitz
2012-05-29 21:04:08 UTC
Permalink
Gery . <***@...> writes:

>
>
> Hello Danny,I don't know if this will help you but I had a similar problem,
ie. my map was unclickable. I pressed almost everthing in my keyboard but
nothing, the thing never worked. After rechecking things, my mistake was that I
assigned the ip in my html and was trying to get the map through localhost, it
was quite silly the error but yes it happens sometimes. Perhaps something very
obvious is actually your problem, and the code might be right.HTH,Gery

Could you please be a little more specific? Everything in our application is
specified in terms of relative paths. e.g. app.local/geoserver. Which ip are you
referring to? I don't think we have any urls/ip's at all in our code, only in
the nginx configuration. I grep'ed out code and we have no mention of localhost
at all.

e.g. the get feature control is created via
control=new OpenLayers.Control.WMSGetFeatureInfo({url:'/geoserver/wms'...}


Also was you problem consistent with having the same server provide a clickable
map on another machine? The remote map works fine, it's the browser on the same
machine as the server that's the problem. If it were a problem that I specified
localhost somewhere, I would would expect a not working page on the remote
machine, exactly the opposite of what I have.

thanks,
Danny
Gery .
2012-05-29 21:12:28 UTC
Permalink
it was actually my own pc, I added for example: http://123.456.789/gery.html in my html, and I was using in FF: http://localhost/gery.html, that's why it could see the map but after clicking the features but no response at all. Well I don't use geoserver, I use Mapserver which is much more simple for me, so no idea about geoserver. If you think it is the browser, update it, FF is in the 12 version now, I also noticed some problems with older versions of FF (3 i think) and my app, problem that didn't happen in FF 7 and above for instance.

HTH,

> To: openlayers-***@lists.osgeo.org
> From: ***@lanl.gov
> Date: Tue, 29 May 2012 21:04:08 +0000
> Subject: Re: [OpenLayers-Users] WMSFeatureInfo not working on Firefox on Ubuntu 12.04
>
> Gery . <***@...> writes:
>
> >
> >
> > Hello Danny,I don't know if this will help you but I had a similar problem,
> ie. my map was unclickable. I pressed almost everthing in my keyboard but
> nothing, the thing never worked. After rechecking things, my mistake was that I
> assigned the ip in my html and was trying to get the map through localhost, it
> was quite silly the error but yes it happens sometimes. Perhaps something very
> obvious is actually your problem, and the code might be right.HTH,Gery
>
> Could you please be a little more specific? Everything in our application is
> specified in terms of relative paths. e.g. app.local/geoserver. Which ip are you
> referring to? I don't think we have any urls/ip's at all in our code, only in
> the nginx configuration. I grep'ed out code and we have no mention of localhost
> at all.
>
> e.g. the get feature control is created via
> control=new OpenLayers.Control.WMSGetFeatureInfo({url:'/geoserver/wms'...}
>
>
> Also was you problem consistent with having the same server provide a clickable
> map on another machine? The remote map works fine, it's the browser on the same
> machine as the server that's the problem. If it were a problem that I specified
> localhost somewhere, I would would expect a not working page on the remote
> machine, exactly the opposite of what I have.
>
> thanks,
> Danny
>
> _______________________________________________
> Users mailing list
> ***@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
danny shevitz
2012-05-29 21:21:13 UTC
Permalink
Gery . <***@...> writes:

>
>
> it was actually my own pc, I added for example: http://123.456.789/gery.html
in my html, and I was using in FF: http://localhost/gery.html, that's why it
could see the map but after clicking the features but no response at all. Well I
don't use geoserver, I use Mapserver which is much more simple for me, so no
idea about geoserver. If you think it is the browser, update it, FF is in the 12
version now, I also noticed some problems with older versions of FF (3 i think)
and my app, problem that didn't happen in FF 7 and above for instance.HTH,

Thanks again for the response. I am using FF 12.0.

On both machines, Ubuntu (same as the server machine) and Windows, I am
referring to the website using a url "app.local" which is specified in
/etc/hosts on Ubuntu
and c:/system/win32/drivers/etc/hosts to 127.0.0.1

Anything I am missing?

thanks,
Danny
Gery .
2012-05-29 21:32:35 UTC
Permalink
probably your error is Apache, check here: http://ubuntuforums.org/showthread.php?t=833523

try in linux: sdiff -s /etc/hosts c:/system/win32/drivers/etc/hosts, what do you get? if you can click your map in windows, I think the problem is apache in ubuntu, also try assigning your ip address: www.whatismyipaddress.com

I've heard that people had problems in Ubuntu, not only with OL, but with other open source. If you can get Centos, you should go for it.

HTH,


> To: openlayers-***@lists.osgeo.org
> From: ***@lanl.gov
> Date: Tue, 29 May 2012 21:21:13 +0000
> Subject: Re: [OpenLayers-Users] WMSFeatureInfo not working on Firefox on Ubuntu 12.04
>
> Gery . <***@...> writes:
>
> >
> >
> > it was actually my own pc, I added for example: http://123.456.789/gery.html
> in my html, and I was using in FF: http://localhost/gery.html, that's why it
> could see the map but after clicking the features but no response at all. Well I
> don't use geoserver, I use Mapserver which is much more simple for me, so no
> idea about geoserver. If you think it is the browser, update it, FF is in the 12
> version now, I also noticed some problems with older versions of FF (3 i think)
> and my app, problem that didn't happen in FF 7 and above for instance.HTH,
>
> Thanks again for the response. I am using FF 12.0.
>
> On both machines, Ubuntu (same as the server machine) and Windows, I am
> referring to the website using a url "app.local" which is specified in
> /etc/hosts on Ubuntu
> and c:/system/win32/drivers/etc/hosts to 127.0.0.1
>
> Anything I am missing?
>
> thanks,
> Danny
>
> _______________________________________________
> Users mailing list
> ***@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
danny shevitz
2012-05-29 21:57:09 UTC
Permalink
Gery . <***@...> writes:

>
>
> probably your error is Apache, check here:
http://ubuntuforums.org/showthread.php?t=833523try in linux: sdiff -s /etc/hosts
c:/system/win32/drivers/etc/hosts, what do you get? if you can click your map in
windows, I think the problem is apache in ubuntu, also try assigning your ip
address: www.whatismyipaddress.comI've heard that people had problems in Ubuntu,
not only with OL, but with other open source. If you can get Centos, you should
go for it.HTH,

I'm not using Apache,
I'm using Nginx for my server.

D
Phil Scadden
2012-05-29 21:06:07 UTC
Permalink
> A second related comment.
Phil Scadden
2012-05-29 21:53:38 UTC
Permalink
I am no expert on this but have battled royally with the problem getting
OL application working off a USB.

Why need a proxy?

Well because usually you have your application (especially the host
page) on one server and geoserver somewhere else. Since the browsers started
tightening up security on XHR, the restriction has been that XHR request
need to reference an item in same directory as your OL page or in a
subdirectory of that. Obviously mapserver/geoserver will be somewhere
else. What OL needs to do is switch its http requests through a proxy.
In my system, I have
proxy.jsp in my main directory, with proxyhost pointing to it. So
instead of GET to http://myserver, it generates
proxy.jsp?url=http://mygeoserver
Proxy.jsp checks the URL to see if it is one my allowed hosts, opens the
url, fetches data and pipes back to OL.

This is different from using a web proxy in your lab network configuration.

Using cgi is another way implement the proxy.

Its my understanding, that any OL function implemented to use a callback
is going to go through XHR, so to use those you must have
OpenLayers.proxyhost configured.

Somethings can be implemented without the proxy (especially WFS) by
using script protocol. Script injection is another way avoid cross-site
restrictions, but it depends on server able to wrap response (json) in a
callback function.



Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.
danny shevitz
2012-05-29 23:10:58 UTC
Permalink
Phil Scadden <***@...> writes:

> Why need a proxy?
>
> Well because usually you have your application (especially the host
> page) on one server and geoserver somewhere else. Since the browsers started
> tightening up security on XHR, the restriction has been that XHR request
> need to reference an item in same directory as your OL page or in a
> subdirectory of that. Obviously mapserver/geoserver will be somewhere
> else. What OL needs to do is switch its http requests through a proxy.
> In my system, I have
> proxy.jsp in my main directory, with proxyhost pointing to it. So
> instead of GET to http://myserver, it generates
> proxy.jsp?url=http://mygeoserver
> Proxy.jsp checks the URL to see if it is one my allowed hosts, opens the
> url, fetches data and pipes back to OL.

This much I understand, except instead of writing the proxy script myself. I am
having the webserver (Nginx) doing the proxying for me. I redirect /geoserver to
http://otherbox/geoserver. This effectively "fools" OpenLayers into thinking my
geoserver requests are in a subdirectory, but I'm not writing the proxy. This is
dead standard web server configuration. With proxying implemented on the server,
why would I need ProxyHost set in OpenLayers?

Again, I don't think the problem is a proxy problem (but I am not 100% sure)
because the same server (Ubuntu) serves the same page on the same FF 12.0 on a
different machine (Windows) just fine. The identical page on FF 12.0 on a
Windows client has a clickable map. In addition, a known working page (renders
just fine with a clickable map on Ubuntu 11.04) does not have a clickable map on
Ubuntu 12.04. The only time I have trouble is with FF 12.0 on Ubuntu 12.04

Danny
Loading...