Emperor Servers

Issue of ports not getting released after server restarts

I’m running version 2.1.2 in Docker.
After we restart the server the “UDP Plugin Local Port” (also “UDP Port”) doesn’t get releaased sometimes.

I have to restart the Docker container to get the ports released everytime this happens, restarting/stopping the server from the ACSM GUI doesn’t help.

Server settings:

logs:

time=“2021-08-07T17:07:00Z” level=info msg=“Car 1 entered the pit lane”
2021/08/07 17:08:20 http: response.WriteHeader on hijacked connection from github.com/go-chi/chi/v5/middleware.(*compressResponseWriter).WriteHeader (compress.go:315)
time=“2021-08-07T17:15:05Z” level=info msg=“Car 7 entered the pit lane”
time=“2021-08-07T17:15:07Z” level=info msg=“Car 7 exited the pit lane”
2021/08/07 17:16:50 http: response.WriteHeader on hijacked connection from github.com/go-chi/chi/v5/middleware.(*compressResponseWriter).WriteHeader (compress.go:315)
time=“2021-08-07T17:18:35Z” level=info msg=“Terminating command: stracker [pid: 17745]…”
2021/08/07 17:18:36 http: proxy error: context canceled
2021/08/07 17:18:37 http: proxy error: context canceled
time=“2021-08-07T17:18:40Z” level=info msg=“Starting Server Process with event: 1 sessions with 25 entrants at ks_brands_hatch (indy_osrw)”
time=“2021-08-07T17:18:40Z” level=info msg=“Started sTracker. Listening for pTracker connections on port 50042”
time=“2021-08-07T17:18:40Z” level=error msg=“Unable to load template: custom-race/index.html” error=“write tcp 127.0.0.1:44855->127.0.0.1:48060: write: broken pipe”
2021/08/07 17:18:40 http: superfluous response.WriteHeader call from github.com/prometheus/client_golang/prometheus/promhttp.(*responseWriterDelegator).WriteHeader (delegator.go:65)
time=“2021-08-07T17:19:04Z” level=error msg=“Unable to handle event: 101” error=“racecontrol: client changed tyres without ever being connected: XXX xxxx (76xxxxxxxxxxxxxx)”
time=“2021-08-07T17:19:11Z” level=info msg=“Terminating command: stracker [pid: 18483]…”
time=“2021-08-07T17:19:21Z” level=error msg=“could not change Server status” error=“servermanager: server process did not stop even after manual kill. please check your server configuration”
time=“2021-08-07T17:19:26Z” level=warning msg=“Process 18483 did not terminate after 15 seconds. Killing…”
2021/08/07 17:19:26 http: response.WriteHeader on hijacked connection from github.com/go-chi/chi/v5/middleware.(*compressResponseWriter).WriteHeader (compress.go:315)
time=“2021-08-07T17:19:37Z” level=info msg=“Starting Server Process with event: 1 sessions with 25 entrants at ks_brands_hatch (indy_osrw)”
time=“2021-08-07T17:19:37Z” level=info msg=“Started sTracker. Listening for pTracker connections on port 50042”
time=“2021-08-07T17:20:14Z” level=warning msg=“acServer process ended with error. If everything seems fine, you can safely ignore this error.” error=“listen udp :11600: bind: address already in use”
time=“2021-08-07T17:20:14Z” level=info msg=“Terminating command: stracker [pid: 18531]…”
2021/08/07 17:31:53 http: response.WriteHeader on hijacked connection from github.com/go-chi/chi/v5/middleware.(*compressResponseWriter).WriteHeader (compress.go:315)
time=“2021-08-07T17:32:05Z” level=info msg=“Starting Server Process with event: 1 sessions with 25 entrants at ks_brands_hatch (indy_osrw)”
time=“2021-08-07T17:32:05Z” level=info msg=“Started sTracker. Listening for pTracker connections on port 50042”
time=“2021-08-07T17:32:38Z” level=warning msg=“acServer process ended with error. If everything seems fine, you can safely ignore this error.” error=“listen udp :11600: bind: address already in use”
time=“2021-08-07T17:32:38Z” level=info msg=“Terminating command: stracker [pid: 18772]…”
2021/08/07 17:33:36 http: response.WriteHeader on hijacked connection from github.com/go-chi/chi/v5/middleware.(*compressResponseWriter).WriteHeader (compress.go:315)
time=“2021-08-07T17:33:47Z” level=info msg=“Starting Server Process with event: 3 sessions with 24 entrants at ks_laguna_seca ()”
time=“2021-08-07T17:33:47Z” level=info msg=“Started sTracker. Listening for pTracker connections on port 50042”
2021/08/07 17:33:57 http: response.WriteHeader on hijacked connection from github.com/go-chi/chi/v5/middleware.(*compressResponseWriter).WriteHeader (compress.go:315)
2021/08/07 17:34:14 http: response.WriteHeader on hijacked connection from github.com/go-chi/chi/v5/middleware.(*compressResponseWriter).WriteHeader (compress.go:315)
time=“2021-08-07T17:34:23Z” level=error msg=“Could not forcibly kill server” error=“listen tcp 0.0.0.0:9600: bind: address already in use”
time=“2021-08-07T17:34:23Z” level=warning msg=“acServer process ended with error. If everything seems fine, you can safely ignore this error.” error=“listen udp :11600: bind: address already in use”
time=“2021-08-07T17:34:23Z” level=info msg=“Terminating command: stracker [pid: 18828]…”
2021/08/07 17:34:24 http: response.WriteHeader on hijacked connection from github.com/go-chi/chi/v5/middleware.(*compressResponseWriter).WriteHeader (compress.go:315)
2021/08/07 17:49:00 http: proxy error: context canceled

Hey,

Could you explain a bit more about your docker setup? Are you using a docker-compose file? If so could you post it here? If not can you share your port bindings in docker? I haven’t seen this issue before!

If you try running server manager outside of docker, does the issue persist?

Thanks