Python Error Error 10061
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more errno 10061 connection refused about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users selenium winerror 10061 Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping winerror 10061 gns3 each other. Join them; it only takes a minute: Sign up Errno 10061 : No connection could be made because the target machine actively refused it ( client - server ) up vote 13 down vote favorite 1
Socket.error Errno 10061 No Connection Could Be Made
I have a problem with these client and server codes, I keep getting the [Errno 10061] No connection could be made because the target machine actively refused it I'm running the server on a virtual machine with Windows XP SP3 and the client on Windows 7 64bit, my python version is 2.7.3. What I want to know is how should I edit the code to use the client and server on different networks! Thanks! server : #!/usr/bin/python python socket.error connection refused # This is server.py file import socket # Import socket module s = socket.socket() # Create a socket object host = '0.0.0.0' # Get local machine name port = 12345 # Reserve a port for your service. print 'Server started!' print 'Waiting for clients...' s.bind((host, port)) # Bind to the port s.listen(5) # Now wait for client connection. c, addr = s.accept() # Establish connection with client. print 'Got connection from', addr while True: msg = c.recv(1024) print addr, ' >> ', msg msg = raw_input('SERVER >> ') c.send(msg); #c.close() # Close the connection client : #!/usr/bin/python # This is client.py file import socket # Import socket module s = socket.socket() # Create a socket object host = socket.gethostname() # Get local machine name port = 12345 # Reserve a port for your service. print 'Connecting to ', host, port s.connect((host, port)) while True: msg = raw_input('CLIENT >> ') s.send(msg) msg = s.recv(1024) print 'SERVER >> ', msg #s.close # Close the socket when done PS : code is from internet. python sockets share|improve this question edited Aug 10 at 10:25 Venu Saini 56216 asked Oct 20 '12 at 22:32 havox 320246 1 actively refused it implies that the server machine's firewall blocked the connection, probably unrelated to code. –Michael Berkowski Oct 20 '12 at 22:34 firewall is off :/ still getting error –havox Oct 2
here for a quick overview of the site Help python connectionrefusederror Center Detailed answers to any questions you might have Meta
Errno 10061 Kodi
Discuss the workings and policies of this site About Us Learn more about Stack
Tsm Errno = 10061
Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask http://stackoverflow.com/questions/12993276/errno-10061-no-connection-could-be-made-because-the-target-machine-actively-re Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Python urllib.request.urlopen() returning error 10061? up vote 1 down vote favorite 1 I'm trying to download http://stackoverflow.com/questions/9586951/python-urllib-request-urlopen-returning-error-10061 the HTML of a page (http://www.google.com in this case) but I'm getting back an error. Here is my interactive prompt session: Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib >>> import urllib.request >>> html = urllib.request.urlopen("http://www.google.com") Traceback (most recent call last): File "\\****.****.org\myhome\python\lib\urllib\request.py", line 1136, in do_open h.request(req.get_method(), req.selector, req.data, headers) File "\\****.****.org\myhome\python\lib\http\client.py", line 964, in req uest self._send_request(method, url, body, headers) File "\\****.****.org\myhome\python\lib\http\client.py", line 1002, in _s end_request self.endheaders(body) File "\\****.****.org\myhome\python\lib\http\client.py", line 960, in end headers self._send_output(message_body) File "\\****.****.org\myhome\python\lib\http\client.py", line 805, in _se nd_output self.send(msg) File "\\****.****.org\myhome\python\lib\http\client.py", line 743, in sen d self.connect() File "\\****.****.org\myhome\python\lib\http\client.py", line 721, in con nect self.timeout, self.source_address) File "\\****.****.org\myhome\python\lib\socket.py", line 404, in create_c onnection raise err File "\\****.****.org\myhome\python\lib\socket.py", line 395, in create_c onnection sock.connect(sa) socket.
Sign in Pricing Blog Support Search GitHub This repository Watch 49 Star 1,221 Fork 133 DamnWidget/anaconda Code Issues 71 Pull requests 4 Projects 1 Wiki Pulse Graphs New issue [Python 2.6 problem] Connection error on Windows #12 https://github.com/DamnWidget/anaconda/issues/12 Closed daniele-niero opened this Issue Aug 10, 2013 · 16 comments Projects None yet Labels bug resolved Milestone No milestone Assignees No one assigned 3 participants daniele-niero commented Aug 10, 2013 Hello, I tried to use Anaconda but whatever I do I got this error multiple times per action: [WinError 10061] No connection could be made because the target machine actively refused it I have no idea what I have to error 10061 do here. Thanks, Dan Owner DamnWidget commented Aug 10, 2013 There can be two possible sources for this error: 1) The anaconda json server can't be started 2) Your firewall is blocking connections to the anaconda json server Possible workaround: Make sure you are not filtering connections for localhost in your firewall settings If the problme persist, look at C:\Users