Results 1 to 4 of 4
  1. #1

    errno 111 connection refused

    Im having problems setting up a TCP connection with python. whenever I try to connect the socket to the localhost or I get an errno 111 connection refused message. I tried to run some blend files here on the forum that use socket and who are supposed to work but I get the same message there. I'm running the newest ubuntu version. Any idea what's happening? I'm thinking the port gets blocked, but I haven't installed any firewall, and I can't find a way to open ports.
    I've already lost a day trying to figure this one out and I'm getting a bit desperate

  2. #2
    Member Chaser's Avatar
    Join Date
    Nov 2004
    BC, Canada
    If you're behind a router, you'll need to set up some port forwarding.
    The router is what decides which messages go where, so you need to set all incoming connections on certain ports to a specific internal IP address (the serving computer).

    You can find lots of information about port forwarding on the internet.
    Basically, you need to browse to your router settings page (served by the router at an address that typically looks something similar to ""), then find a way to forward either individual ports, or more conveniently, large ranges of ports.

    If you'd like to check out a good example of networking in game blender, take a poke at Nanoshooter, which is me and Gomer's online multiplayer game. Right now, the server is down for maintenance until we fix some shenanigans.

    Good luck,

  3. #3
    how do other multiplayer games work around this then? I don't have problems on other online games, do they run a port check first to see which one is forwarded to the client? And is it doable to do this in python?
    Thanks for your quick response anyway, I'll take a look at your project. Good luck developing it!

  4. #4
    I found the problem. My server was connecting to socket.gethostname, while my client was searching for the localhost. Apparently these are not the same. changing the socket.gethostname to 'localhost' solved the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts