Discussion:
WMSgetFeatureInfo ProxyHost
(too old to reply)
Shadin
2013-05-21 08:31:16 UTC
Permalink
Does WMSGetFeatureInfo need a proxyhost to allow remote server accessing the
data? I use ProxyHost to allow WFS requests, but seems not working with
WMSGetFeatureInfo. the local machines retrieves data from GeoServer
successfully but external machines doesn't!



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
adityakumar529
2013-05-21 08:49:40 UTC
Permalink
Dear Shadin,
As long as the data is coming from remote server, proxy host is required.



Aditya kumar



-----
GIS Developer
India Urban Space Foundation
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054553.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Shadin
2013-05-21 08:52:26 UTC
Permalink
the proxy is working with WFS, but with not with WMSgetFeatureInfo
please help



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054556.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
adityakumar529
2013-05-21 08:54:30 UTC
Permalink
Shadin,
The layer will come but on click data will not come if your proxy is
not properly configured.




Aditya Kumar



-----
GIS Developer
India Urban Space Foundation
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054557.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Shadin
2013-05-21 09:25:22 UTC
Permalink
How should I configure it? I add the public IP and the port to the
allowedHosts



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054564.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
adityakumar529
2013-05-21 09:30:12 UTC
Permalink
You have to add those domain in your allowed host.



-----
GIS Developer
India Urban Space Foundation
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054565.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Shadin
2013-05-21 09:36:36 UTC
Permalink
here is my allowedHosts

allowedHosts = ['localhost', 'localhost:8080','localhost:80',
'localhost:8080/geoserver',
'PrivateIP','PrivateIP:8080', 'PrivateIP:8080/geoserver',
'PublicIP','PublicIP:8080', 'PublicIP:8080/geoserver',
'www.openlayers.org', 'openlayers.org',
]



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054566.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
adityakumar529
2013-05-21 09:40:22 UTC
Permalink
Hi Shadin,
I will give you one example.
Suppose you want to access the data from the following url
http://wms.jpl.nasa.gov/wms.cgi?Service=WMS&Version=1.1.1&Request=GetCapabilities


then you have to mention "wms.jpl.nasa.gov" in allowedHosts.
Hence it will be somewhat like

allowedHosts = ['localhost', 'localhost:8080','localhost:80',
'localhost:8080/geoserver',
'PrivateIP','PrivateIP:8080', 'PrivateIP:8080/geoserver',
'PublicIP','PublicIP:8080', 'PublicIP:8080/geoserver',
'www.openlayers.org', 'openlayers.org', *wms.jpl.nasa.gov*
]



-----
GIS Developer
India Urban Space Foundation
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054569.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Shadin
2013-05-21 10:16:36 UTC
Permalink
I access my data through either private or public IP. I don't have a domain
name



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054573.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
adityakumar529
2013-05-21 10:18:36 UTC
Permalink
then you have to put that IP



-----
GIS Developer
India Urban Space Foundation
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054574.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Shadin
2013-05-21 10:35:43 UTC
Permalink
I added with no luck

here is a post explains my problem
http://osgeo-org.1560.x6.nabble.com/getfeatureinfo-Some-unexpected-error-occurred-Error-text-was-HTTP-Error-401-Unauthorized-td3922330.html



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054584.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Phil Scadden
2013-05-21 21:15:55 UTC
Permalink
What happens if you try the same call directly in the browser (right
click on the call in the NET tab of fire bug and choose "open in new
tab"? (or just the URL direct into browser bar). You want to compare the
call via the proxy with the call made direct. You dont have browser
security in the way doing this. If it is POST data rather than GET, then
try with CURL or with this rather nifty free tool
http://code.google.com/p/rest-client/ (I use this constantly).

If it works to remoteIP when going direct but returns 401 (or whatever
the proxy is set to on fail) when going through proxy, then proxy is
misconfigured. If direct call fails, then problem must lie with security
at geoserver end or with firewall rules.

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.
Shadin
2013-05-22 03:17:40 UTC
Permalink
if I paste the url of private ip in the browser, i get the proxy file
downloaded. but if I paste the public url, the page keep loading with
showing nothing, then network timeout



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054781.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Phil Scadden
2013-05-22 04:12:53 UTC
Permalink
Shadin - I am interested in these two cases:
Shadin
2013-05-22 04:50:10 UTC
Permalink
in the first case I got a popup window asking to open a
geoserver-GetFeatureInfo.application, So am guessing this is okay.

in the second case (the url contains many symbols such as %...etc) .. I got
the timeout issue.

I'm lost here. I'm sure my proxy was working just okay with WFS requests.
idk what I'm missing here.



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054785.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
adityakumar529
2013-05-22 04:57:20 UTC
Permalink
Shadin,
Can you please check if your proxy is working fine or not.
I put the following url http://localhost:81/cgi-bin/proxy.cgi which
redirects me to the homepage.
Please check the same.



Aditya Kumar



-----
GIS Developer
India Urban Space Foundation
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054786.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Shadin
2013-05-22 05:17:48 UTC
Permalink
this url redirect me to OpenLayers site
http://localhost/cgi-bin/proxy.cgi



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054788.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
adityakumar529
2013-05-22 05:20:10 UTC
Permalink
Shadin,
Your proxy is configured fine.


Aditya kumar



-----
GIS Developer
India Urban Space Foundation
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054790.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Shadin
2013-05-22 05:48:37 UTC
Permalink
the proxy is fine and I insert the public ip in the allowHosts array. I don't
know what I'm missing here.
by the way, I installed python 2.7 to run the proxy




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054791.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Gery .
2013-05-22 05:58:35 UTC
Permalink
and you have a previous python version installed in your system? Windows? Linux?

Sent from my iRon

On May 22, 2013, at 7:49, "Shadin" <***@hotmail.com> wrote:

the proxy is fine and I insert the public ip in the allowHosts array. I don't
know what I'm missing here.
by the way, I installed python 2.7 to run the proxy




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054791.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Shadin
2013-05-22 06:11:38 UTC
Permalink
My server is ubuntu 12.4 and i see in the usr/lib that there is a folder
called python 2.6 contains only dist-packages folder



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054795.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Gery .
2013-05-22 07:57:28 UTC
Permalink
the problem with linux boxes such as rhel, ubuntu, I think also centos, is that most of the time new python versions have to be installed, however many applications (such as yum in rhel) depends on the original version (for rhel5 is the good and old one 2.4). In my case I had to install the RPM python 2.6 version but nothing worked correctly (ie. with the 2.6) until I replaced the "python" file located in /usr/bin with the new python2.6. I think ubuntu behaves more or less the same way as rhel and centos, so try:

which python
python -V

I think with that output it'd be easier to see if python is the cause of the problems you're facing. If so, you need to make an alias or just replace the "python" file in /usr/bin with your new python vesion:

rm python
cp python2.7 python

I think you installed recently the 2.7, btw why do you need this version? this may solve your issues.


__________________________________________________________________________________________
Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario.
Think green - keep it on the screen. Do NOT print if it is NOT necessary.
Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie es NICHT, wenn es NICHT notwendig ist.


> Date: Tue, 21 May 2013 23:11:38 -0700
> From: ***@hotmail.com
> To: openlayers-***@lists.osgeo.org
> Subject: Re: [OpenLayers-Users] WMSgetFeatureInfo ProxyHost
>
> My server is ubuntu 12.4 and i see in the usr/lib that there is a folder
> called python 2.6 contains only dist-packages folder
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054795.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> ***@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
Phil Scadden
2013-05-22 05:05:10 UTC
Permalink
>in the second case (the url contains many symbols such as %...etc) .. I got
>the timeout issue.

Are you sure it is time out? In the NET tab, there is a status column.
Proxy would normally set that to a 503 or something if the url fails to
match allowedhosts.
Is the proxy working at all?
Aside from that you need some debug lines in there.

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.
Shadin
2013-05-22 05:18:19 UTC
Permalink
in status column the error is: [ 503 service unavailable ]



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054789.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Phil Scadden
2013-05-22 21:37:12 UTC
Permalink
> in status column the error is: [ 503 service unavailable ]
Well unless you have explicitly put a 503 (unlikely) into your proxy
code, i would say that is not a configuration issue in your proxy. I'd
start looking at the code around where your proxy opens a connection to
the real URL.

I am assuming you dont have a way attach a debugger to the proxy. Unless
you do, this is going to be a lot easier to sort out if start adding
some logging capability to the proxy and see where its problems lie. It
is starting to sound like a firewall rule.


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.
Shadin
2013-05-21 11:44:18 UTC
Permalink
Here is the error I get: Some unexpected error occurred. Error text was
<urlopen error [Errno 110] Connection timed out>



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5054609.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Shadin
2013-05-23 21:21:07 UTC
Permalink
Finally I figured it out!

I was using the same url for WMS layers and WMSGetFeatureInfo request which
is depending on the client ip, public (external client) or private (internal
client)

that worked with WMS/WFS layers, but turns out that WMSGetFeatureInfo url
should always use the private ip as an internal client. this is what I was
missing here.

Well, I'm not a network guru so I might not explaining it in a correct way.
but hopefully this would help anyone running into the same issue.

Thank you all for your time!



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMSgetFeatureInfo-ProxyHost-tp5054544p5055384.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Continue reading on narkive:
Loading...