<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
i have permission (by admin) to use port 80 and 443. No other port is available to me for security reasons. <BR>
<HR id=stopSpelling>
Date: Mon, 23 Feb 2009 14:13:38 +0200<BR>From: mika@digikartta.net<BR>To: gpoul48@hotmail.com<BR>CC: users@openlayers.org<BR>Subject: Re: [OpenLayers-Users] proxy not working<BR><BR>Any particular reason why are you running your GeoServer in port 443? It's usually reserved for https. Maybe your Windows/IIS don't like the idea of it. Can you try another port, like 8888 for example?<BR><BR>- mika -<BR><BR>george gpoul48 kirjoitti:
<BLOCKQUOTE cite=mid:SNT105-W58B5192F5B051D3DE221CBA2AE0@phx.gbl>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
<BR>i dont get any error message from iis log. Yes it is the same host for web and geoserver but different ports. <BR> <BR>> Date: Mon, 23 Feb 2009 12:22:49 +0100<BR>> Subject: Re: [OpenLayers-Users] proxy not working<BR>> From: <A class=EC_moz-txt-link-abbreviated href="mailto:igrcic@gmail.com">igrcic@gmail.com</A><BR>> To: <A class=EC_moz-txt-link-abbreviated href="mailto:mika@digikartta.net">mika@digikartta.net</A><BR>> CC: <A class=EC_moz-txt-link-abbreviated href="mailto:gpoul48@hotmail.com">gpoul48@hotmail.com</A>; <A class=EC_moz-txt-link-abbreviated href="mailto:users@openlayers.org">users@openlayers.org</A><BR>> <BR>> Yup might be something about IIS. Seems that proxy is set up fine, and<BR>> geoserver is working ok.<BR>> <BR>> But when you run<BR>> <A class=EC_moz-txt-link-freetext href="http://84.205.237.73/script/proxy.py?url=http://84.205.237.73:443/geoserver/wms?REQUEST=GetFeatureInfo&EXCEPTIONS=application/vnd.ogc.se_xml&BBOX=142.52861,-44.59531,149.785355,-38.626637&X=567&Y=316&INFO_FORMAT=text/html&QUERY_LAYERS=tasmania&FEATURE_COUNT=50&Layers=tasmania&Styles=&Srs=EPSG:4326&WIDTH=800&HEIGHT=658&format=image/png">http://84.205.237.73/script/proxy.py?url=http://84.205.237.73:443/geoserver/wms?REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=142.52861%2C-44.59531%2C149.785355%2C-38.626637&X=567&Y=316&INFO_FORMAT=text%2Fhtml&QUERY_LAYERS=tasmania&FEATURE_COUNT=50&Layers=tasmania&Styles=&Srs=EPSG%3A4326&WIDTH=800&HEIGHT=658&format=image%2Fpng</A><BR>> <BR>> you get:<BR>> Some unexpected error occurred. Error text was: <urlopen error [Errno<BR>> 10060] A connection attempt failed because the connected party did not<BR>> properly respond after a period of time, or established connection<BR>> failed because connected host has failed to respond><BR>> <BR>> What does ur IIS log say? Sorry but dont know much about IIS, always<BR>> used apache or in J2EE environment.<BR>> Maybe here are some users that set it up on IIS??<BR>> <BR>> 2009/2/23 Mika Lehtonen <A class=EC_moz-txt-link-rfc2396E href="mailto:mika@digikartta.net"><mika@digikartta.net></A>:<BR>> > Hi George,<BR>> ><BR>> > maybe you indeed need a proxy. You are running your servers in a same host,<BR>> > but in different ports, right? I'm not an expert on this, but I think that's<BR>> > the case. From the proxy point of view, they're not a same host.<BR>> > I am still thinking that this could be an IIS related problem. I tried your<BR>> > proxy and it seemed to be working when accessing openlayers.org or<BR>> > openstreetmap.org. But when I tried to access your server (Jetty?), I get<BR>> > these:<BR>> ><BR>> > <A class=EC_moz-txt-link-freetext href="http://84.205.237.73/script/proxy.py?url=http://84.205.237.73:443/geoserver/">http://84.205.237.73/script/proxy.py?url=http://84.205.237.73:443/geoserver/</A><BR>> ><BR>> > Some unexpected error occurred. Error text was: <urlopen error [Errno 10060]<BR>> > A connection attempt failed because the connected party did not properly<BR>> > respond after a period of time, or established connection failed because<BR>> > connected host has failed to respond><BR>> ><BR>> > - mika -<BR>> ><BR>> > P.S. I think you could also set some proxy up in your IIS so that e.g. all<BR>> > the requests made to host/geoserver/ would redirect to host:443/ or<BR>> > something like that..<BR>> ><BR>> > george gpoul48 kirjoitti:<BR>> ><BR>> > It is working without proxy only in localhost, but not from the internet.<BR>> > That is why i used proxy. Is it possible to run without proxy? Regarding iis<BR>> > i have no idea what it should be. IIS configured and tested to run python<BR>> > without problem. Any idea?<BR>> ><BR>> > thank you all for your concern<BR>> ><BR>> > ________________________________<BR>> > Date: Mon, 23 Feb 2009 11:02:36 +0200<BR>> > From: <A class=EC_moz-txt-link-abbreviated href="mailto:mika@digikartta.net">mika@digikartta.net</A><BR>> > To: <A class=EC_moz-txt-link-abbreviated href="mailto:igrcic@gmail.com">igrcic@gmail.com</A><BR>> > CC: <A class=EC_moz-txt-link-abbreviated href="mailto:gpoul48@hotmail.com">gpoul48@hotmail.com</A>; <A class=EC_moz-txt-link-abbreviated href="mailto:users@openlayers.org">users@openlayers.org</A><BR>> > Subject: Re: [OpenLayers-Users] proxy not working<BR>> ><BR>> > Hi Ivan and George,<BR>> ><BR>> > I just tested the site and it seems that the request sent works. Also the<BR>> > proxy works. But do you need proxy when using GetFeatureInfo?<BR>> ><BR>> > maybe this has something to do with IIS?<BR>> ><BR>> > - mika -<BR>> ><BR>> > Ivan Grcic kirjoitti:<BR>> ><BR>> > Hi,<BR>> ><BR>> > first check if the normal request is working, without proxy. What does<BR>> > firebug say if its not working?<BR>> ><BR>> > On Mon, Feb 23, 2009 at 9:26 AM, george gpoul48 <A class=EC_moz-txt-link-rfc2396E href="mailto:gpoul48@hotmail.com"><gpoul48@hotmail.com></A> wrote:<BR>> ><BR>> ><BR>> > Hallo everyone!!<BR>> > I use this proxy.py file and i am trying to get information for a map<BR>> > feature clicking on it, but the computer returns this message:<BR>> > "Some unexpected error occurred. Error text was:" Can anyone help me? Where<BR>> > am i wrong?<BR>> ><BR>> > See my map at <A class=EC_moz-txt-link-freetext href="http://84.205.237.73/default/mytest.aspx">http://84.205.237.73/default/mytest.aspx</A><BR>> ><BR>> ><BR>> ><BR>> ><BR>> > Proxy.py code<BR>> > #!C:/Python26/python.exe -u<BR>> ><BR>> > import urllib2<BR>> > import cgi<BR>> > import sys, os<BR>> > # Designed to prevent Open Proxy type stuff.<BR>> > allowedHosts = ['84.205.237.73:443', '<A class=EC_moz-txt-link-abbreviated href="http://www.openlayers.org/">www.openlayers.org</A>', 'openlayers.org',<BR>> > 'labs.metacarta.com', 'world.freemap.in',<BR>> > 'prototype.openmnnd.org', 'geo.openplans.org',<BR>> > 'sigma.openplans.org',<BR>> > '<A class=EC_moz-txt-link-abbreviated href="http://www.openstreetmap.org/">www.openstreetmap.org</A>']<BR>> > method = os.environ["REQUEST_METHOD"]<BR>> > if method == "POST":<BR>> > qs = os.environ["QUERY_STRING"]<BR>> > d = cgi.parse_qs(qs)<BR>> > if d.has_key("url"):<BR>> > url = d["url"][0]<BR>> > else:<BR>> > url = <A class=EC_moz-txt-link-rfc2396E href="http://www.openlayers.org/">"http://www.openlayers.org"</A><BR>> > else:<BR>> > fs = cgi.FieldStorage()<BR>> > url = fs.getvalue('url', <A class=EC_moz-txt-link-rfc2396E href="http://www.openlayers.org/">"http://www.openlayers.org"</A>)<BR>> > try:<BR>> > host = url.split("/")[2]<BR>> > if allowedHosts and not host in allowedHosts:<BR>> > print "Status: 502 Bad Gateway"<BR>> > print "Content-Type: text/plain"<BR>> > print<BR>> > print "This proxy does not allow you to access that location (%s)."<BR>> > % (host,)<BR>> > print<BR>> > print os.environ<BR>> ><BR>> > elif url.startswith(<A class=EC_moz-txt-link-rfc2396E href="http:///">"http://"</A>) or url.startswith(<A class=EC_moz-txt-link-rfc2396E href="https:///">"https://"</A>):<BR>> ><BR>> > if method == "POST":<BR>> > length = int(os.environ["CONTENT_LENGTH"])<BR>> > headers = {"Content-Type": os.environ["CONTENT_TYPE"]}<BR>> > body = sys.stdin.read(length)<BR>> > r = urllib2.Request(url, body, headers)<BR>> > y = urllib2.urlopen(r)<BR>> > else:<BR>> > y = urllib2.urlopen(url)<BR>> ><BR>> > # print content type header<BR>> > i = y.info()<BR>> > if i.has_key("Content-Type"):<BR>> > print "Content-Type: %s" % (i["Content-Type"])<BR>> > else:<BR>> > print "Content-Type: text/plain"<BR>> > print<BR>> ><BR>> > print y.read()<BR>> ><BR>> > y.close()<BR>> > else:<BR>> > print "Content-Type: text/plain"<BR>> > print<BR>> > print "Illegal request."<BR>> > except Exception, E:<BR>> > print "Status: 500 Unexpected Error"<BR>> > print "Content-Type: text/plain"<BR>> > print<BR>> > print "Some unexpected error occurred. Error text was:", E<BR>> ><BR>> > ------------------------------------------------------------------<BR>> ><BR>> > getfeatureinfo code<BR>> ><BR>> > .<BR>> > .<BR>> > .<BR>> > OpenLayers.ProxyHost = "/script/proxy.py?url=";<BR>> > .<BR>> > .<BR>> > .<BR>> > map.events.register('click', map, function (e) {<BR>> > document.getElementById('nodelist').innerHTML = "Please<BR>> > wait...";<BR>> > var params = {<BR>> > REQUEST: "GetFeatureInfo",<BR>> > EXCEPTIONS: "application/vnd.ogc.se_xml",<BR>> > BBOX: map.getExtent().toBBOX(),<BR>> > X: e.xy.x,<BR>> > Y: e.xy.y,<BR>> > INFO_FORMAT: 'text/html',<BR>> > QUERY_LAYERS: map.layers[0].params.LAYERS,<BR>> > FEATURE_COUNT: 50,<BR>> > Layers: 'Tinos:dimoi',<BR>> > Styles: '',<BR>> > Srs: 'EPSG:900913',<BR>> > WIDTH: map.size.w,<BR>> > HEIGHT: map.size.h,<BR>> > format: format};<BR>> ><BR>> > OpenLayers.loadURL(<A class=EC_moz-txt-link-rfc2396E href="http://84.205.237.73:443/geoserver/wms">"http://84.205.237.73:443/geoserver/wms"</A>, params, this,<BR>> > setHTML, setHTML);<BR>> > OpenLayers.Event.stop(e);<BR>> > });<BR>> ><BR>> ><BR>> > // sets the HTML provided into the nodelist element<BR>> > function setHTML(response){<BR>> > document.getElementById('nodelist').innerHTML =<BR>> > response.responseText;<BR>> > };<BR>> ><BR>> ><BR>> > ________________________________<BR>> > Κάντε κλικ για να παίξετε Fishticuffs με τους φίλους σας, τώρα! Κάντε κλικ<BR>> > εδώ!<BR>> > _______________________________________________<BR>> > Users mailing list<BR>> > <A class=EC_moz-txt-link-abbreviated href="mailto:Users@openlayers.org">Users@openlayers.org</A><BR>> > <A class=EC_moz-txt-link-freetext href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> > ________________________________<BR>> > Φέρτε τους φίλους σας από το Facebook και το Hotmail στον Messenger ΤΩΡΑ!<BR>> > Κάντε κλικ εδώ!<BR>> ><BR>> > ________________________________<BR>> > _______________________________________________<BR>> > Users mailing list<BR>> > <A class=EC_moz-txt-link-abbreviated href="mailto:Users@openlayers.org">Users@openlayers.org</A><BR>> > <A class=EC_moz-txt-link-freetext href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR>> ><BR>> ><BR>> > _______________________________________________<BR>> > Users mailing list<BR>> > <A class=EC_moz-txt-link-abbreviated href="mailto:Users@openlayers.org">Users@openlayers.org</A><BR>> > <A class=EC_moz-txt-link-freetext href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR>> ><BR>> ><BR>> <BR>> <BR>> <BR>> -- <BR>> Ivan Grcic<BR><BR>
<HR>
Κάντε κλικ για να παίξετε Fishticuffs με τους φίλους σας, τώρα! <A href="http://www.livemessenger-emoticons.com/fishticuffs/el-gr/">Κάντε κλικ εδώ!</A> <PRE><HR width="90%" SIZE=4>
_______________________________________________
Users mailing list
<A class=EC_moz-txt-link-abbreviated href="mailto:Users@openlayers.org">Users@openlayers.org</A>
<A class=EC_moz-txt-link-freetext href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A>
</PRE></BLOCKQUOTE><br /><hr />Κάντε κλικ για να παίξετε Fishticuffs με τους φίλους σας, τώρα! <a href='http://www.livemessenger-emoticons.com/fishticuffs/el-gr/' target='_new'>Κάντε κλικ εδώ!</a></body>
</html>