Python Connection Refused Error 61
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions socket.error errno 61 connection refused python email you might have Meta Discuss the workings and policies of
Errno:61 Connection Refused Mongodb
this site About Us Learn more about Stack Overflow the company Business Learn more about hiring
Errno 61 Connection Refused Django
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is
Openssl Connect:errno=61
a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up connection refused up vote 0 down vote favorite What causes the folowing problem: >>> s = socket(AF_INET, SOCK_STREAM) >>> s
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 errno 61 connection refused ironport about Stack Overflow the company Business Learn more about hiring developers or posting ads socket.error errno 61 connection refused selenium with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow socket error errno 61 connection refused smtplib is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Python socket.error: [Errno 61] Connection refused up vote 1 down vote favorite http://stackoverflow.com/questions/12394950/connection-refused I am very new to socket programming. I am trying to connect to a power supply over ethernet. My Mac (OS X) is connected to an ethernet switch and the power supply is also connected to the switch. I have some code written in python to send/receive commands/messages to/from the power supply. The switch interface allows me to assign a static IP to the supply. It is this same IP http://stackoverflow.com/questions/34299809/python-socket-error-errno-61-connection-refused that I use as the target IP in the following code: def __init__( self, IP_TARGET ): IP = IP_TARGET PORT = 8080 self.supply = socket.socket( socket.AF_INET, socket.SOCK_DGRAM ) self.supply.connect( (IP, PORT) ) This code runs without any issues. My next goal is communicate with the device using the following code: def getDeviceInfo( self ): self.supply.send('some command ') self.supply.recv(10) Using some print statements I have narrowed the issue down to the recv() command. The send() throws no errors. I get the following error ...in getDeviceInfo self.supply.recv(10) socket.error: [Errno 61] Connection refused I am able to ping the device using the IP that I assigned it using the ethernet switch. I have firewall off. I have searched the www for clues as to how I might resolve this error, but to no avail. Any thoughts? python sockets share|improve this question asked Dec 15 '15 at 21:33 resident 63 Are you on TCP or UDP protocol?...try changing socket.SOCK_DGRAM to socket.SOCK_STREAM instead. –Iron Fist Dec 15 '15 at 21:47 @Iron Fist As I understand UPD = socket.SOCK_DGRAM and TCP = socket.SOCK_STREAM. I tried making the suggested change and got the following terminal error: getDeviceInfo self.supply.send('some command ') socket.error: [Errno 32] Broken pipe –resident Dec 15
»PythoncommentsWant to join? Log in or sign up in seconds.|Englishlimit my search to /r/Pythonuse the following search parameters to narrow your results:subreddit:subredditfind submissions in "subreddit"author:usernamefind submissions by https://www.reddit.com/r/Python/comments/2etkih/socketerror_errno_61_connection_refused/ "username"site:example.comfind submissions from "example.com"url:textsearch for "text" in urlselftext:textsearch for "text" in self post contentsself:yes (or self:no)include (or exclude) self postsnsfw:yes (or nsfw:no)include (or exclude) results marked as NSFWe.g. subreddit:aww site:imgur.com connection refused dogsee the search faq for details.advanced search: by author, subreddit...this post was submitted on 28 Aug 20140 points (36% upvoted)shortlink: remember mereset passwordloginSubmit a new linkSubmit a new text postPythonsubscribeunsubscribe140,387 readers157 users here 61 connection refused nownews about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python If you are about to ask a question, please consider r/learnpython. Homework-style questions will be removed, and you'll be encouraged to post there instead. Please don't use URL shorteners Posting code to this subreddit: Add 4 extra spaces before each line of code def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b Online Books and Resources Think Python Dive into Python 3 Automate the Boring