CoD4x_Server icon indicating copy to clipboard operation
CoD4x_Server copied to clipboard

kill then start server causes "Warning: NET_IP4Socket: bind: Address already in use"

Open bbashy opened this issue 1 year ago • 3 comments

Getting an issue where it thinks the port is still in-use when restarting servers.

I use kill -15 <pid> and then start it back up 30 seconds later. When it starts it crashes and has the following;

Opening IP socket: 45.282.361.513:28960 UDP
[1;33mWarning: NET_IP4Socket: bind: Address already in use
---- Network shutdown ----
--------------------------

Sys_Error: Could not bind to a IPv4 network socket

Is there a solution to gracefully kill it? I don't get the same issue with CoD4 1.7 servers.

bbashy avatar Apr 05 '24 16:04 bbashy

try fuser -k 28960/udp

https://stackoverflow.com/a/11596144

D4edalus avatar Apr 06 '24 09:04 D4edalus

Comment says port will still be unavailable for 60 seconds. Might just wait 60 seconds instead just for CoD4x servers.

bbashy avatar Apr 06 '24 09:04 bbashy

pkill -f

K-Faktor avatar Apr 06 '24 16:04 K-Faktor