Python Forum
socket.gaierror: [Errno -2] Name or Service not known
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
socket.gaierror: [Errno -2] Name or Service not known
#2
http_Server = socketserver.TCPServer((" ", 4444), HTTPHandler)
That empty string is your problem. You need to give the server a hostname or interface for it to "listen" for incoming connections. If you are doing all of this local to your computer, you can specify "localhost" or "127.0.0.1", if you want to access it from another computer, you can specify "0.0.0.0" which means accept connections on any network interface.
Reply


Messages In This Thread
RE: socket.gaierror: [Errno -2] Name or Service not known - by mpd - Mar-02-2018, 07:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  socket.gaierror: [Errno 11001] Johnygo 4 10,826 Nov-03-2019, 08:52 PM
Last Post: nemat
  socket.gaierror: [Errno -2] Name or service not known seokangwoo99 5 15,948 May-25-2019, 02:36 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020