473,378 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 9134
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.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'
>>>
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.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'
>>

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
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...
11
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...
1
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...
1
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:...
0
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...
6
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...
2
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...
2
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...
3
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'...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.