Connection to Server Failed, Returning to Main Menu. Running local server - OSX 10.7

Discussion in 'Mac and Linux' started by opiate987, December 4, 2014.

  1. opiate987

    opiate987 New Member

    Messages:
    15
    Likes Received:
    1
    Hi there,

    been trying to fix this for a while now. Basically, I am unable to play any games that run on a local server on my machine. The log says:

    [02:49:59.185] INFO Connect to 127.0.0.1:20545 failed: Refused
    [02:49:59.684] INFO Connect to 127.0.0.1:20545 failed: Refused
    [02:50:00.185] INFO Connect to 127.0.0.1:20545 failed: Refused
    [02:50:00.686] INFO Connect to 127.0.0.1:20545 failed: Refused
    [02:50:01.187] INFO Connect to 127.0.0.1:20545 failed: Refused
    [02:50:01.187] INFO Could not connect to server at 127.0.0.1:20545: Refused
    [02:50:01.188] INFO connection_ConnectionFailed

    However, when I turn off the local server option, everything works fine.

    I would like to get this working on the local server. I have my firewall turned off and the ports in my router's firewall opened correctly. When I do a port scan of port 20545 with Network Utility it does not come up as open. I have tried enabling/disabling web sharing & file sharing and opening the port with ipfw command in Terminal.

    I have also tried running it on my OSX 10.9 partition on the same machine, which works fine so this seems to be a 10.7 issue (I can't fully upgrade to 10.9 for now, so that can't be a solution).

    I'm sure there is a simple solution to this that I am missing.

    Thanks in advanced for any help!

    B
  2. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    It seems like the server executable isn't starting. You shouldn't have to mess with the firewall, since it's supposed to run on localhost as you can see from the trying-to-connect message. Can you try starting the server executable directly using the Terminal? You can find the executable in "~/Library/Application Support/Uber Entertainment/Planetary Annihilation/data/streams/stable/PA.app/Contents/MacOS". Does it produce any error?

    It should open a black screen saying "No sim". You can then start PA and start an AI Skirmish. Make sure the local server is turned on. Does it work then or do you still get connection refused?
    SXX likes this.
  3. opiate987

    opiate987 New Member

    Messages:
    15
    Likes Received:
    1
    Hi there,

    Yes I have tried running both the server and the application in the terminal with sudo "sudo ./server" etc.

    there are no visible/obvious errors in the terminal when I run the server, I do get the black window with 'no sim' in the corner.

    I still get connection refused
  4. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    So when you have the local server running, can you check the Network Utility again? What does it say about port 20545 when you do a port scan of localhost? The same as before? I.e. not open? And what if you port scan your local IP address, such as 192.168.x.x or 10.x.x.x. (It should show under the info tab in the Network Utility.)
    SXX likes this.
  5. opiate987

    opiate987 New Member

    Messages:
    15
    Likes Received:
    1
    Tried most of this before, the network utility does not show the port is open, it just scans and returns no results. I'll switch back to my 10.7 partition now and try scanning 192.168. etc.
  6. opiate987

    opiate987 New Member

    Messages:
    15
    Likes Received:
    1
    Okay ran the server and scanned local host and static ip address both do not show any open port at 20545.

    Here's the output of running the server in Terminal:


    2014-12-04 14:54:13.698 server[215:507] INFO SDL: Built w/ v2.0.4, linked w/ v2.0.4
    2014-12-04 14:54:13.732 server[215:507] INFO Loaded buildID 2014120375740
    2014-12-04 14:54:13.733 server[215:507] WARN Crash reporting disabled.
    2014-12-04 14:54:14.444 server[215:507] INFO Successfully created context with configuration 7/8: v3.2 (core)
    2014-12-04 14:54:14.445 server[215:507] WARN Unable to enable Apple MTGL Afterburner, error code: 10019
    2014-12-04 14:54:14.445 server[215:507] WARN Unable to enable Apple MTGL, error code: 10019
    2014-12-04 14:54:14.446 server[215:507] INFO HAL initializing...
    2014-12-04 14:54:14.446 server[215:507] INFO OpenGL Vendor: ATI Technologies Inc.
    2014-12-04 14:54:14.446 server[215:507] INFO OpenGL Renderer: AMD Radeon HD 6750M OpenGL Engine
    2014-12-04 14:54:14.447 server[215:507] INFO OpenGL Version: 3.2 ATI-7.32.12
    2014-12-04 14:54:14.447 server[215:507] INFO OpenGL Shader Language Version: 1.50
    2014-12-04 14:54:14.448 server[215:507] INFO Vendor flag set to AMD/ATI
    2014-12-04 14:54:14.448 server[215:507] INFO Supported rasterizer capabilities: Advanced instancing
    2014-12-04 14:54:14.448 server[215:507] INFO Unsupported rasterizer capabilities: Gamma correct pipeline, Ranged mapping, Advanced shaders, Compute shaders, Persistent buffer mapping
    2014-12-04 14:54:14.449 server[215:507] INFO Buffer textures enabled.
    2014-12-04 14:54:14.449 server[215:507] INFO initial size 1280x720
    2014-12-04 14:54:14.460 server[215:507] INFO Starting async parallel for driver with 6 threads
    2014-12-04 14:54:14.485 server[215:507] INFO Loading effects from file /shaders/post.json
    2014-12-04 14:54:14.555 server[215:507] INFO Loading effects from file /shaders/content.json
    2014-12-04 14:54:14.735 server[215:507] INFO Loading effects from file /shaders/impostors.json
    2014-12-04 14:54:14.745 server[215:507] INFO Loading effects from file /shaders/misc.json
    2014-12-04 14:54:14.768 server[215:507] INFO Loading effects from file /shaders/particle.json
    2014-12-04 14:54:14.805 server[215:507] INFO Failed to link shader program: vertex shader particle_quad_velocity.vs and pixel shader particle_soft.fs
    2014-12-04 14:54:14.805 server[215:507] INFO ERROR: Input of fragment shader 'v_Forward' not written by vertex shader
    ERROR: Input of fragment shader 'v_Push' not written by vertex shader
    2014-12-04 14:54:14.806 server[215:507] INFO Failed to link shader program for technique velocity
    2014-12-04 14:54:14.807 server[215:507] INFO Failed to link shader program: vertex shader particle_quad_velocity_color.vs and pixel shader particle_soft.fs
    2014-12-04 14:54:14.808 server[215:507] INFO ERROR: Input of fragment shader 'v_Forward' not written by vertex shader
    ERROR: Input of fragment shader 'v_Push' not written by vertex shader
    2014-12-04 14:54:14.808 server[215:507] INFO Failed to link shader program for technique colorvelocity
    2014-12-04 14:54:14.815 server[215:507] INFO Failed to link shader program: vertex shader particle_quad_velocity_color.vs and pixel shader particle_soft.fs
    2014-12-04 14:54:14.815 server[215:507] INFO ERROR: Input of fragment shader 'v_Forward' not written by vertex shader
    ERROR: Input of fragment shader 'v_Push' not written by vertex shader
    2014-12-04 14:54:14.816 server[215:507] INFO Failed to link shader program for technique colorvelocity
    2014-12-04 14:54:14.817 server[215:507] INFO Failed to link shader program: vertex shader particle_quad_color_flip.vs and pixel shader particle_soft.fs
    2014-12-04 14:54:14.818 server[215:507] INFO ERROR: Input of fragment shader 'v_Forward' not written by vertex shader
    ERROR: Input of fragment shader 'v_Push' not written by vertex shader
    2014-12-04 14:54:14.818 server[215:507] INFO Failed to link shader program for technique colorFlipbook
    2014-12-04 14:54:14.819 server[215:507] INFO Failed to link shader program: vertex shader particle_string.vs and pixel shader particle_soft.fs
    2014-12-04 14:54:14.820 server[215:507] INFO ERROR: Input of fragment shader 'v_Forward' not written by vertex shader
    ERROR: Input of fragment shader 'v_Push' not written by vertex shader
    2014-12-04 14:54:14.820 server[215:507] INFO Failed to link shader program for technique string
    2014-12-04 14:54:14.864 server[215:507] INFO Failed to link shader program: vertex shader particle_quad_velocity.vs and pixel shader particle_soft.fs
    2014-12-04 14:54:14.865 server[215:507] INFO ERROR: Input of fragment shader 'v_Forward' not written by vertex shader
    ERROR: Input of fragment shader 'v_Push' not written by vertex shader
    2014-12-04 14:54:14.865 server[215:507] INFO Failed to link shader program for technique velocity
    2014-12-04 14:54:14.867 server[215:507] INFO Failed to link shader program: vertex shader particle_quad_velocity_color.vs and pixel shader particle_soft.fs
    2014-12-04 14:54:14.867 server[215:507] INFO ERROR: Input of fragment shader 'v_Forward' not written by vertex shader
    ERROR: Input of fragment shader 'v_Push' not written by vertex shader
    2014-12-04 14:54:14.868 server[215:507] INFO Failed to link shader program for technique colorvelocity
    2014-12-04 14:54:14.975 server[215:507] INFO Loading effects from file /shaders/scene.json
    2014-12-04 14:54:15.029 server[215:507] INFO Loading effects from file /shaders/vtex.json
    2014-12-04 14:54:15.107 server[215:507] INFO Starting background thread pool with 6 threads
    2014-12-04 14:54:15.156 server[215:507] INFO GameServerImpl::resetModUpdateAuthToken: Auth token reset to "31a21ade-5d79-4567-8a6f-3706d4220dce"
  7. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Yeah, that looks fine.

    I was just wondering on with IP the local server is listening (127.0.0.1, 127.0.1.1 or 192.168.x.x). Since it didn't report an error on the command line, then it means it must be listening somewhere.

    By the way, what happens when (while having the local server running) you open the Terminal and type
    Code:
    telnet localhost 20545
    Does that connect? It really should... How about the other IPs?
    SXX likes this.
  8. opiate987

    opiate987 New Member

    Messages:
    15
    Likes Received:
    1
    Connection refused :/
  9. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Well, this is getting weirder and weirder. I'm sorry it's being such a pain to you.

    Ok, next idea. It's possible to change the port on which the server is listening. I forget the exact command-line parameter, but I think it's --port. You can check by running the server with --help (or -h maybe).

    Run the server as
    Code:
    ./server --port 61243
    (61243 is just a random number I chose)
    Then try to connect using
    Code:
    telnet localhost 61243
    If that works, then something odd is going on with port 20545 specifically. If that also doesn't work, then something is just blocking the server program entirely for some reason.
  10. opiate987

    opiate987 New Member

    Messages:
    15
    Likes Received:
    1
    Tried a few different ports and telnet responds:


    Trying 127.0.0.1...
    telnet: connect to address 127.0.0.1: Connection refused

    Every time. How can something be blocking the server?
  11. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    I have no idea, since you've turned the firewall completely off...

    One last test by the way: Start the server again (without the --port stuff) and in the Terminal type
    Code:
    netstat -na | grep 20545
    Does anything show there?
  12. opiate987

    opiate987 New Member

    Messages:
    15
    Likes Received:
    1
    Nope, nothing.
  13. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Huh, that means that the server isn't opening the port after all? But why would there be no error then? I'm not sure what's going on...
    @jorgenpt , @SXX : Any ideas on this one?
  14. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Unfortunately I have no idea what can be wrong on OS X so I hoped there some other OS X 10.7 user who can test that. :rolleyes:
  15. lokiCML

    lokiCML Post Master General

    Messages:
    1,973
    Likes Received:
    953
    Is the server starting when you click start game? You're looking for a process called server in top. Also what are your local server settings? How much RAM do you have? Quad core CPU?

    - http://support.uberent.com/kb/faq.php?id=82
  16. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Has the local server ever run?

    Is there a 'server' process in Activity Monitor?

    Reason: I had the server freeze up. It doesn't accept connections and prevents the game from starting more servers.
    lokiCML likes this.
  17. opiate987

    opiate987 New Member

    Messages:
    15
    Likes Received:
    1
    yep the server definitely runs, that's how i found its executable location, through the activity monitor.
    I have an intel i7 quad core and 8GB of RAM. Also got a 1GB dedicated graphics card.

    Cheers
  18. ukd1

    ukd1 New Member

    Messages:
    1
    Likes Received:
    0
    I'm getting this too. Being invited also attempts to connect to localhost, even though the server is on another computer. This _was_ working, so I think it's related to the latest patch?
  19. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    I don't think invites work for local games yet. If you're running game over LAN host need to make it public and you need to connect it via "Multiplayer" tab.
  20. opiate987

    opiate987 New Member

    Messages:
    15
    Likes Received:
    1
    So any other ideas to get this working? I feel like i've tried everything :(

Share This Page