Re: socket object, connection refused ...

From: Diez B. Roggisch (deets_noospaam_at_web.de)
Date: 11/17/03


Date: Mon, 17 Nov 2003 21:52:23 +0100

Hi,

> using 'localhost' or '127.0.0.1' always works, using my actual machine's
> ip or its hostname does not!!

I had the exact problem last week - I think there should be an update to the
docs, as these say:

<quote from socket example>
# Echo server program
import socket

HOST = '' # Symbolic name meaning the local host

</quote from socket example>

Unfortunately, this is not right - what happens wheny you bind localhost or
127.0.0.1, the socket _only_ listens on your local loop back device. When
binging to '', this means "bind to all IPs of this machine" - and thats
exactly what you are looking for.

So try to either explictely bind to your IP, or '' - that will help.

Regards,

Diez



Relevant Pages

  • BIND 9.5.2rc1 is now available.
    ... BIND 9.5.2rc1 is now available. ... triggering an assertion failure in ... API and glibc hides parts of the IPv6 Advanced Socket ... need to tweak ISC_SOCKET_MAXSOCKETS at compilation time ...
    (comp.protocols.dns.bind)
  • BIND 9.5.2 is now available.
    ... BIND 9.5.2 is now available. ... triggering an assertion failure in ... API and glibc hides parts of the IPv6 Advanced Socket ... need to tweak ISC_SOCKET_MAXSOCKETS at compilation time ...
    (comp.protocols.dns.bind)
  • BIND 9.5.2b1 is now available.
    ... BIND 9.5.2b1 is a maintenance release for BIND 9.5. ... triggering an assertion failure in ... API and glibc hides parts of the IPv6 Advanced Socket ... need to tweak ISC_SOCKET_MAXSOCKETS at compilation time ...
    (comp.protocols.dns.bind)
  • Re: Java Socket Constructor
    ... bind() simply binds a socket to an interface/port locally for both client ... After that you can connectto a server. ...
    (comp.lang.java.programmer)
  • Re: How to listen to more a specific IP and specific ports
    ... I have read this long time ago in the textbook Unix Network Programming ... service and connect our socket to INADDR_ANY and then listen for incoming ... Its clear to me on how to bind with ... port numbers. ...
    (microsoft.public.win32.programmer.networks)