Connecting Tech Pros Worldwide Help | Site Map

socket.error connection refused

Vania
Guest
 
Posts: n/a
#1: Nov 23 '06
Hi, I'm not sure this is the proper forum but I try nevertheless.
The problem I'am facing is that the socket library always fail to
connect to an URL. The net effect is that I can not use setuptools.
I'm using Python2.4 on a windows XPPRO Sp2 machine.
The firewall is disabled.
There is no NLTM proxy.
I connect to the internet through a NAT server (and it works).
Other than with easy_install I tried to connect to a number of external
urls
(all of them running) and even to localhost,
directly in script using urllib
and the error is always the same errno: 10061 connection refused.
Any ideas?

robert
Guest
 
Posts: n/a
#2: Nov 24 '06

re: socket.error connection refused


Vania wrote:
Quote:
Hi, I'm not sure this is the proper forum but I try nevertheless.
The problem I'am facing is that the socket library always fail to
connect to an URL. The net effect is that I can not use setuptools.
I'm using Python2.4 on a windows XPPRO Sp2 machine.
The firewall is disabled.
There is no NLTM proxy.
I connect to the internet through a NAT server (and it works).
Other than with easy_install I tried to connect to a number of external
urls
(all of them running) and even to localhost,
directly in script using urllib
and the error is always the same errno: 10061 connection refused.
Any ideas?

urllib.urlopen can pick up an invalid proxy setting from environ or IE-settings.

routers/NAT servers sometimes need a 2nd tick - all browsers try it 2..4 times before displaying "no connection" - this is (unfortunately) not the default behavior of the "browser" urllib.

if bare
Quote:
Quote:
Quote:
>>import httplib
>>h=httplib.HTTPConnection('www.google.com')
>>h.connect()
>>h.request('GET','/')
>>h.getresponse().read()
'<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">\n<TITLE>302 Moved</TITLE></HEAD><BODY>\n<H1>302 Moved</H1>\nThe document has moved\n<A HREF="http://www.google.de/">here</A>.\r\n</BODY></HTML>\r\n'
Quote:
Quote:
Quote:
>>>
fails on multiple trials, then you have a very strange network setup. maybe multiple/confusing NIC's ...


Robert
Vania
Guest
 
Posts: n/a
#3: Nov 24 '06

re: socket.error connection refused



Thanks for the explanation.
Probably the fact that I was working inside a virtual machine
didn't help.

Vania

robert ha scritto:
Quote:
Vania wrote:
Quote:
Hi, I'm not sure this is the proper forum but I try nevertheless.
The problem I'am facing is that the socket library always fail to
connect to an URL. The net effect is that I can not use setuptools.
I'm using Python2.4 on a windows XPPRO Sp2 machine.
The firewall is disabled.
There is no NLTM proxy.
I connect to the internet through a NAT server (and it works).
Other than with easy_install I tried to connect to a number of external
urls
(all of them running) and even to localhost,
directly in script using urllib
and the error is always the same errno: 10061 connection refused.
Any ideas?
>
>
urllib.urlopen can pick up an invalid proxy setting from environ or IE-settings.
>
routers/NAT servers sometimes need a 2nd tick - all browsers try it 2..4 times before displaying "no connection" - this is (unfortunately) not the default behavior of the "browser" urllib.
>
if bare
>
Quote:
Quote:
>import httplib
>h=httplib.HTTPConnection('www.google.com')
>h.connect()
>h.request('GET','/')
>h.getresponse().read()
'<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">\n<TITLE>302 Moved</TITLE></HEAD><BODY>\n<H1>302 Moved</H1>\nThe document has moved\n<A HREF="http://www.google.de/">here</A>.\r\n</BODY></HTML>\r\n'
Quote:
Quote:
>>
>
fails on multiple trials, then you have a very strange network setup. maybe multiple/confusing NIC's ...
>
>
Robert
Closed Thread