<urlopen error (11001, 'getaddrinfo failed')>

O

opengis

Hello Python User,
I am using python in an openlayers application to access another
server on my network via javascript. The proxy script works fine
when the application runs in Apache HTTP Server, but I get a
"<urlopen error (11001, 'getaddrinfo failed')>" error after moving
the application to Tomcat. The tomcat cgi configuration tested
fine with a "hello world" python script. I then boiled my proxy
script down to the following:

#!c:/Program Files/Python25/python.exe -u

import urllib2
import cgi

fs = cgi.FieldStorage()
url = fs.getvalue('url', "http://www.openlayers.org")
try:
y = urllib2.urlopen(url)
print y.read()

except Exception, E:
print "Status: 500 Unexpected Error"
print "Content-Type: text/plain"
print
print "url: ", url
print
print "Some unexpected error occurred. Error text was:", E

This script produces the "<urlopen error (11001, 'getaddrinfo
failed')>". The openlayers homepage is expected. My environment
is Tomcat 6, Apache 2, Win XP, and Python 2.5. I have my local
firewall turned off. Proxy support is enabled, and working, in
Apache 2.0 (I get the error with Apache Server stopped). I seem to
be missing something to facilitate the communication between
python, my network and tomcat. Any direction or solution is
greatly appreciated.

Thank you,
Josh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top