Server keeps switching ports.

Post here if you need help setting up your server, etc.
Post Reply
Moofie
Core Dumper
Posts: 125
Joined: Fri Jan 27, 2012 1:36 am
Location: Ohio
Contact:

Server keeps switching ports.

Post by Moofie »

Well this is really confusing me. It's been going on for weeks now, but its going to start to be a problem soon as I host more servers. The server keeps switching ports, I have in the everytime.cfg server_port 4534, I have that in the server_info, etc, but it still does it and I have absolutely no idea why as there is no reason it should. Here is the console output when it does it:

Code: Select all

[2] Phoenix left the game.
[2] Killing user 2, ping 0.0950243, IP 70.124.35.49:56898: You logged out regularly.
[0] Closing socket bound to *.*.*.*:4534
[0] Closing socket bound to *.*.*.*:47497
[0] Soul'sNoob left AI team.
[0] Moofie-Bot left AI team.
[0] LaTeX left the game.
[0] Bound socket to *.*.*.*:58741.
[0] sn_SetNetState: Unable to open accept socket on desired port 4534, Trying next ports...
[0] Bound socket to *.*.*.*:4535.
[0] Setting CYCLE_WALL_TIME (Group: Bumpy) deviates from its default value; clients older than 0.2.8_alpha20060414 will not be allowed in.
[0] Setting CYCLE_DELAY_DOUBLEBIND_BONUS (Group: Bumpy) deviates from its default value; clients older than 0.2.8.3_alpha will not be allowed in.
[0] Connecting to Master Server 1...
[0] Login information sent. Waiting for reply...
[0] Got address 24.92.143.5:4535.
[0] Login Succeeded. User Nr. 1
[0] Syncing with server...
[0] Relabeling NetObjects...
[0] Syncing again...
[0] Done!
[0] Sending my server info...
[0] Logging out...
[0] Done!
[0] Closing socket bound to *.*.*.*:4535
[0] Bound socket to *.*.*.*:4535.
[0] Setting CYCLE_WALL_TIME (Group: Bumpy) deviates from its default value; clients older than 0.2.8_alpha20060414 will not be allowed in.
[0] Setting CYCLE_DELAY_DOUBLEBIND_BONUS (Group: Bumpy) deviates from its default value; clients older than 0.2.8.3_alpha will not be allowed in.
[0] Connecting to Master Server 2...
[0] Login information sent. Waiting for reply...
[0] Login Succeeded. User Nr. 1
User avatar
AI-team
Shutout Match Winner
Posts: 1020
Joined: Tue Jun 23, 2009 6:17 pm
Location: Germany/Munich
Contact:

Re: Server keeps switching ports.

Post by AI-team »

The server didn't switch ports. Not even a single time

Code: Select all

[0] Closing socket bound to *.*.*.*:4534
[0] Bound socket to *.*.*.*:4535.
[0] Got address 24.92.143.5:4535.
[0] Closing socket bound to *.*.*.*:4535
[0] Bound socket to *.*.*.*:4535.
...but its going to start to be a problem soon as I host more servers
Don't worry about that, tron will just pick the next avaible port
Last edited by AI-team on Mon May 07, 2012 3:22 pm, edited 1 time in total.
  
 
"95% of people believe in every quote you post on the internet" ~ Abraham Lincoln
 
 
Moofie
Core Dumper
Posts: 125
Joined: Fri Jan 27, 2012 1:36 am
Location: Ohio
Contact:

Re: Server keeps switching ports.

Post by Moofie »

Heh,
[0] sn_SetNetState: Unable to open accept socket on desired port 4534, Trying next ports...
snake
Average Program
Posts: 59
Joined: Thu Oct 13, 2011 6:24 am

Re: Server keeps switching ports.

Post by snake »

Maybe you didnt open your ports correctly ? Anyway i have errors like that to, useually they solve themselve. If not i have to restart the server.
snake
Average Program
Posts: 59
Joined: Thu Oct 13, 2011 6:24 am

Re: Server keeps switching ports.

Post by snake »

P.S. wtf hapened to my last post 0.o ?

EDIT: seems to be better now :)
Last edited by snake on Tue May 08, 2012 6:28 am, edited 1 time in total.
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1897
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Server keeps switching ports.

Post by kyle »

how are you running the server, is there any sort of killing and restarting of it?
Image
Moofie
Core Dumper
Posts: 125
Joined: Fri Jan 27, 2012 1:36 am
Location: Ohio
Contact:

Re: Server keeps switching ports.

Post by Moofie »

Running it with what it has in this article. http://wiki.armagetronad.org/index.php/ ... u_Computer
Starting with ./start.sh server1, killing with CTRL+C.
User avatar
Z-Man
God & Project Admin
Posts: 11624
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Server keeps switching ports.

Post by Z-Man »

Yeah, we had this before. For some unknown reason, when you close port 4534 and try to open it again right away (as we do), it fails on some systems. Giving your server a dedicated_idle setting so it reboots itself when everybody has quit may help, but the last report of this mysterious behaviour was during the master server communication phase, which meant the server wasn't correctly advertised.
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Re: Server keeps switching ports.

Post by dlh »

I actually ran into this issue the other day, but I was starting the server directly. However my computer died yesterday, and I haven't been able to reproduce the error on a different computer.

Edit: TALK_TO_MASTER was 0.
Edit2: If it isn't obvious from the log Moofie posted—the server opens a different port after the last client disconnects. Also, when you re-enter and leave the server the port just keeps increasing (4534 -> 4535 -> 4536 -> etc…).
Last edited by dlh on Mon May 07, 2012 6:09 pm, edited 2 times in total.
Moofie
Core Dumper
Posts: 125
Joined: Fri Jan 27, 2012 1:36 am
Location: Ohio
Contact:

Re: Server keeps switching ports.

Post by Moofie »

Hmm, weird. Well thanks, I'll probably use dedicated_idle, weird problem though.
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1897
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Server keeps switching ports.

Post by kyle »

When i ran into this it was because when i killed the screen it sent a SIGHUP which restarted the server, but it was no longer attached to that screen anymore. So I had to make a little script to send SIGTERM to each process the screen produced to terminate the servers. That is why i aked how it was started/stopped incase something like that may be affecting it. but based on those scripts if it does restart the server should be dead.
Image
Post Reply