[OpenLayers-Users] <urlopen error (11001, 'getaddrinfo failed')> wihle using proxy.cgi.

lorkyo lorkyo at 163.com
Tue Aug 19 11:02:33 EDT 2008


Hi 
I came across error when using Tomcat 5.5 under Windows OS to set the proxy work properly. I have remove the comment of the servlet and mapping, and renname the jar folloing the steps found on Apache site. But when I try to acess the http://localhost:8080/geoserver/cgi-bin/proxy.cgi,I always get a error:
Some unexpected error occurred. Error text was: <urlopen error (11001, 'getaddrinfo failed')>
I can get a  http://localhost:8080/geoserver/cgi-bin/test1.cgi work and print "hello world" on the browser.
The cotent of test1.cgi is below:
*************
#!C:\Python25\python -u
import urllib2
import cgi
import sys, os
import urllib

print "hello world"
**************
 
And I write a test2.cgi:
************
#!C:\Python25\python -u
import urllib2
import cgi
import sys, os
import urllib
# Designed to prevent Open Proxy type stuff.
try:
 the_url = "http://www.google.com"
 req = urllib2.urlopen(the_url)
 print req.read()
except Exception, E:
    print "Status: 500 Unexpected Error"
    print "Content-Type: text/plain"
    print 
    print "Some unexpected error occurred. Error text was:", E
 the_url = "http://www.google.com"
 req = urllib2.urlopen(the_url)
************/
When I access  http://localhost:8080/geoserver/cgi-bin/test2.cgi I get the same error: 
 Some unexpected error occurred. Error text was: <urlopen error (11001, 'getaddrinfo failed')>
So I think the problem is the urllib2.urlopen(). But I can get it work properly using console command: pythoy test2.cgi and get the html content, but after I put it under tomcat I get such a error, I don't know why, is it because I didn't configur the  Tomcat correctly?
Thank you, best regards!
                                            lorkyo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080819/948aa4ee/attachment.html


More information about the Users mailing list