localhost, ?!

B

Boris Ozegovic

Three machines, one at my home, other two at my job, in every machine there
is Win XP SP2 and Python 2.5

At home:
urllib2.urlopen("http://localhost"), everything is ok

At job:
urllib2.urlopen("http://localhost")
raise BadStatusLine(line), after half a minute.

urllib2.urlopen("http://127.0.0.1")
HTTP Error 503: Service Unavailable, immediately.

Anybody have slightest clue wthat is going on? :-/

If I use urllib, then localhost works on every machine, and urllib2 works
on every machine when retreiving URLs outside localhost.
 
F

Fabio Z Tessitore

Il Tue, 28 Aug 2007 18:27:31 +0200, Boris Ozegovic ha scritto:
Three machines, one at my home, other two at my job, in every machine
there is Win XP SP2 and Python 2.5

At home:
urllib2.urlopen("http://localhost"), everything is ok

At job:
urllib2.urlopen("http://localhost")
raise BadStatusLine(line), after half a minute.

urllib2.urlopen("http://127.0.0.1")
HTTP Error 503: Service Unavailable, immediately.

Anybody have slightest clue wthat is going on? :-/

I think to have http://localhost working you need a web server (like
apache). maybe you have it at your home.

bye
Fabio
 
B

Bjoern Schliessmann

Boris said:
At job:
urllib2.urlopen("http://localhost")
raise BadStatusLine(line), after half a minute.

Looks like name resolving problems.
urllib2.urlopen("http://127.0.0.1")
HTTP Error 503: Service Unavailable, immediately.

Definitely a problem with the web server (503 means "service
unavailable").
Anybody have slightest clue wthat is going on? :-/

Try using wireshark or a similar tool to see what's going on on
protocol level.

Regards,


Björn
 
B

Boris Ozegovic

Bjoern said:
Definitely a problem with the web server (503 means "service
unavailable").

I did try on two servers, Apache and simple python server. There was
identically error on both servers.
Try using wireshark or a similar tool to see what's going on on
protocol level.

Ok.
 
B

Bjoern Schliessmann

Boris said:
Bjoern Schliessmann wrote:

I did try on two servers, Apache and simple python server. There
was identically error on both servers.

Also try to look at the logs, you're bound find something there too.

And don't forget to report back :)

Regards,


Björn
 

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
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top