• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Server is throwing me an error

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to client server program using python. Below is the code which I found online. but it's throwing me an error at s.bind((host, port))  




Below is the error which I got.

Traceback (most recent call last):
 File "python", line 52, in <module>
socket.gaierror: [Errno -3] Temporary failure in name resolution

Let me know where I am doing wrong.

FYI I don't have any python set up in my local. I am practicing it online (https://repl.it )
 
Ranch Hand
Posts: 271
15
Android Angular Framework Spring AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Somashaker:
I have not done much with Python or Jython (only a little).  But If I were you, I would try printing the host name provided.  Also, I would concentrate on that error message "Temporary failure in name resolution".  This sounds superficially like a DNS problem (deeper research might yield something different).  The kinds of things that can affect DNS lookups (to my own knowledge) are:

* No DNS available at all. You can check that by just pinging a well-known host that would have to be looked up by name.
* Proxy server.  Do you have a proxy you have to go through?
* /etc/hosts file.

If you are convinced this downloaded code is OK (no idea, here), then this is probably something to do with the server setup.

HTH
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried this code on my local machine and it appears to work fine:





My wild guess is that repl.it blocks server functions like binding to a socket, which makes sense to prevent malicious exploits
 
reply
    Bookmark Topic Watch Topic
  • New Topic