Author Topic: 3.9.0: LAN server connects to other computer(s) on local network and freezes  (Read 1569 times)

ctz

  • Summoner
  • **
  • Posts: 46
  • aka cathaur, formerly lyra
    • View Profile
This could be related to my current local network, but I am not sure.

I hosted a game with publish disabled.
After waiting a few seconds, I clicked "Return"; the game froze on this screen: http://i.imgur.com/9PwLTdk.png

I opened a terminal and ran netstat -pant; this was the output:
(note: command for starting megaglest was megaglest-3.9.0/megaglest)
Code: [Select]
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 127.0.0.1:61355         0.0.0.0:*               LISTEN      3666/megaglest-3.9.
tcp        0      0 0.0.0.0:61357           0.0.0.0:*               LISTEN      3666/megaglest-3.9.
tcp        0      0 0.0.0.0:61358           0.0.0.0:*               LISTEN      3666/megaglest-3.9.
tcp        0      0 172.16.1.38:46767       172.16.1.35:2869        FIN_WAIT2   -                   
tcp        0      0 172.16.1.38:32881       86.65.39.15:6697        ESTABLISHED 3807/irssi         
tcp        0      0 172.16.1.38:46770       172.16.1.35:2869        FIN_WAIT2   -                   
tcp        0      0 172.16.1.38:46772       172.16.1.35:2869        FIN_WAIT2   -                   
tcp        0      0 172.16.1.38:46775       172.16.1.35:2869        FIN_WAIT2   -                   
tcp        0      0 172.16.1.38:46771       172.16.1.35:2869        FIN_WAIT2   -                   
tcp        0      0 172.16.1.38:46769       172.16.1.35:2869        FIN_WAIT2   -                   
tcp        0      0 172.16.1.38:46773       172.16.1.35:2869        FIN_WAIT2   -                   
tcp        0      0 172.16.1.38:46768       172.16.1.35:2869        FIN_WAIT2   -                   
tcp        0      0 172.16.1.38:46777       172.16.1.35:2869        ESTABLISHED 3666/megaglest-3.9.
tcp        0      0 172.16.1.38:46766       172.16.1.35:2869        FIN_WAIT2   -                   
tcp        0      0 172.16.1.38:46774       172.16.1.35:2869        FIN_WAIT2   -                   
tcp        0      0 172.16.1.38:46765       172.16.1.35:2869        TIME_WAIT   -                   
tcp        0      0 172.16.1.38:46776       172.16.1.35:2869        FIN_WAIT2   -                   

172.16.1.38 is the computer I ran MG on; OS is Gentoo GNU/Linux; it is a laptop, connected by wifi.  The binary was compiled from megaglest-source-3.9.0.3.tar.xz.
172.16.1.35 is a desktop computer running Windows 7, connected by ethernet.  It does not have MG installed.  I do not know what is listening for connections on 2689 on that computer, or why MG tries to connect to it.

MG froze for a few minutes before it returned to the menu.  I also tried it again for more testing; it would not respond to ^C (SIGINT) on the command line, but did close as a result of closing the terminal window (SIGHUP).

When I ran with megaglest-3.9.0/megaglest --headless-server-mode=lan, I also saw connections to 172.16.1.35:2869.  I opened some MG clients and joined (on 127.0.0.1:61357), and then started the game; the clients were stuck waiting for the server for some 160 seconds before the game started.

When left alone, the headless server stopped connecting to 172.16.1.35 a few minutes after starting.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Not entirely sure but port #:2869 is usually used for UPNP (telling your router to allow connections to a published game). This might be the libminiupnpc library we use for allowing hosting games to be easier via the UPNP protocol. I believe this code is not executed if the published checkbox was never enabled (which is the case when you come in from the Internet lobby to host a game).

http://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol

Apart from upnp, Megaglest does not directly use that port.