473,563 Members | 2,695 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

socket.error connection refused

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?

Nov 23 '06 #1
2 9146
Vania wrote:
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
>>import httplib
h=httplib.HTT PConnection('ww w.google.com')
h.connect()
h.request('GE T','/')
h.getresponse ().read()
'<HTML><HEAD><m eta http-equiv="content-type" content="text/html;charset=ut f-8">\n<TITLE> 302 Moved</TITLE></HEAD><BODY>\n<H 1>302 Moved</H1>\nThe document has moved\n<A HREF="http://www.google.de/">here</A>.\r\n</BODY></HTML>\r\n'
>>>
fails on multiple trials, then you have a very strange network setup. maybe multiple/confusing NIC's ...
Robert
Nov 24 '06 #2

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

Vania

robert ha scritto:
Vania wrote:
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
>import httplib
h=httplib.HTTP Connection('www .google.com')
h.connect()
h.request('GET ','/')
h.getresponse( ).read()
'<HTML><HEAD><m eta http-equiv="content-type" content="text/html;charset=ut f-8">\n<TITLE> 302 Moved</TITLE></HEAD><BODY>\n<H 1>302 Moved</H1>\nThe document has moved\n<A HREF="http://www.google.de/">here</A>.\r\n</BODY></HTML>\r\n'
>>

fails on multiple trials, then you have a very strange network setup. maybe multiple/confusing NIC's ...
Robert
Nov 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2234
by: anuradha.k.r | last post by:
hi, i have written a simple socket program in python to connect to a windows machine.On the server side i am running a windows socket program which works perfectly fine,my server program waites at accept() for a connection to be established.on the client side however i am not able to connect and am getting an error "10061 connection...
11
8498
by: anuradha.k.r | last post by:
hi, i am writing a socket program in python,both client side and server side.I've written the client side which is working perfectly fine(checked it against server program written in C).but as for my server program written in python it simply hangs.it does not show any error also.I've tried sample programs available .I don understand what...
1
408
by: Helge Aksdal | last post by:
i've recently made my very first socket program in python, however i've stumbled upon a problem. this program connects to a server serveral hundred time while it's executed (it's not possible to let connection stay up, because the server closes it), and after a time my program dies with the error: "socket.error: (134, 'Transport endpoint is...
1
3013
by: niceyama | last post by:
Dear c.l.p, I have recently been doing the tutorial of Python and everything is well, i'm upto the pass section. Anyway, when I try to launch idle now I get the error message: Socket Error: Connection Refused. I do not have a firewall, so I don't know what is going on. Also, this comes up after it: IDLE's subprocess didn't make the...
0
2583
by: =?Utf-8?B?QWxwZXIgQUtDQVlPWg==?= | last post by:
Hello, First of all I wish you a good day. My help request is about .NET asynchrounus socket communication. I have developed Server-Client Windows Forms .NET applications in VC++ .NET v2003. I have several problems re-establishin connection between peers. Below are my problem cases after closing of the first successfull communication; ...
6
10270
by: Diego F. | last post by:
Hello. I'm writing an application that manages sockets and has a message protocol. I connect to another machine and I have to send and receive certain messages. I need the possibility to restart the communication. I tried with a simple socket.close method and trying to connect again as the first time, but the connection is refused.
2
3413
by: Nicolas Le Gland | last post by:
Hello everyone here. This is my first post in this newsgroup, I hope I won't be to much off-topic. Feel free to redirect me to any better group. I am getting strange timing issues when failing to asynchronously connect sockets on closed or filtered ports, but I'm quite unsure if this is a PHP issue or my misunderstanding, as it seems...
2
2394
by: Mirko Vogt | last post by:
Hey, it seems that the socket-module behaves differently on unix / windows when a timeout is set. Here an example: # test.py import socket sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM) print 'trying to connect...'
3
11646
by: TsanChung | last post by:
I want to make a java TCP socket client to communicate with a TCP server socket on linux. Are there some sample C unix server and java client socket programs available? The Richard Stevens' "Unix network programming" book described a TCP server (tcpcliserv04.c) and client (tcpcli04.c). I compiled and executed them successfully as follows:...
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.