<DIV>Hello </DIV>
<DIV>I came across error when using Tomcat 5.5 under Windows OS to set the proxy work properly. When I try to acess the <A href="http://localhost:8080/geoserver/cgi-bin/proxy.cgi">http://localhost:8080/geoserver/cgi-bin/proxy.cgi</A>,I always get a error:</DIV>
<DIV>Some unexpected error occurred. Error text was: &lt;urlopen error (11001, 'getaddrinfo failed')&gt;<BR></DIV>
<DIV>I can get a&nbsp; <A href="http://localhost:8080/geoserver/cgi-bin/test1.cgi">http://localhost:8080/geoserver/cgi-bin/test1.cgi</A>&nbsp;work properly to print "hello world"</DIV>
<DIV>&nbsp;</DIV>
<DIV>The problem is the urllib2.urlopen(). I write a test2.cgi:</DIV>
<DIV>************</DIV>
<DIV>#!C:\Python25\python -u</DIV>
<DIV>import urllib2<BR>import cgi<BR>import sys, os<BR>import urllib<BR># Designed to prevent Open Proxy type stuff.</DIV>
<DIV><BR>try:<BR>&nbsp;the_url = "<A href="http://www.google.com">http://www.google.com</A>"<BR>&nbsp;req = urllib2.urlopen(the_url)<BR>&nbsp;print req.read()<BR>except Exception, E:<BR>&nbsp;&nbsp;&nbsp; print "Status: 500 Unexpected Error"<BR>&nbsp;&nbsp;&nbsp; print "Content-Type: text/plain"<BR>&nbsp;&nbsp;&nbsp; print <BR>&nbsp;&nbsp;&nbsp; print "Some unexpected error occurred. Error text was:", E</DIV>
<DIV>&nbsp;the_url = "<A href="http://www.google.com">http://www.google.com</A>"<BR>&nbsp;req = urllib2.urlopen(the_url)</DIV>
<DIV>************/</DIV>
<DIV>I can get it work properly using console command pythoy test2.cgi, but after I put it under tomcat, I get the same error:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;Some unexpected error occurred. Error text was: &lt;urlopen error (11001, 'getaddrinfo failed')&gt;<BR></DIV>
<DIV>I don't know why, might it be&nbsp;rooted in the configuration of Tomacat?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you, best regards!&nbsp;</DIV>