[OpenLayers-Users] proxy not working

george gpoul48 gpoul48 at hotmail.com
Mon Feb 23 07:32:29 EST 2009


i have permission (by admin) to use port 80 and 443. No other port is available to me for security reasons.  


Date: Mon, 23 Feb 2009 14:13:38 +0200
From: mika at digikartta.net
To: gpoul48 at hotmail.com
CC: users at openlayers.org
Subject: Re: [OpenLayers-Users] proxy not working

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?

- mika -

george gpoul48 kirjoitti: 


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



Κάντε κλικ για να παίξετε Fishticuffs με τους φίλους σας, τώρα! Κάντε κλικ εδώ! 
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
  
_________________________________________________________________
Εξασφαλίστε το ολοκαίνουριο Messenger 2009 τώρα!
http://download.live.com/messenger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090223/dcd270a4/attachment.html


More information about the Users mailing list