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



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

.



Relevant Pages

  • RE: Loopholes in a proxy and smtp server
    ... but I don't know what the implications of doing that would be on your proxy. ... Loopholes in a proxy and smtp server ... The script is actually running client side on your proxy server. ...
    (Security-Basics)
  • Re: internet proxy
    ... Is it possible to create separate shortcuts to IE - one with 'proxy server ... This script gets used when you enable the "Automatically ... connect to the host so no proxy would get used. ...
    (microsoft.public.windowsxp.general)
  • Re: Somewhat complex nntp/inetd/open proxy question
    ... > out to usenet in general) from open proxies for abuse prevention reasons, ... > to listen for port 119 connections, which would be passed to a script ... > checks a host to see if it's an open proxy. ... there's any correlation between a news client and a proxy server, ...
    (comp.os.linux.security)
  • object references/memory access
    ... between two python programs on the same machine. ... it remains in the memory of a server program. ... the search script is called by Apache. ...
    (comp.lang.python)
  • Re: Restarting scripts
    ... Instead of os.spawn, if you have python 2.4, you can use the ... The issue then becomes how to properly shut down the server in the ... Use signal handling in the loader program to take down the server ... or my script... ...
    (comp.lang.python)

Loading