Port Issues

Every time I restart the server I get the following error, Restarting the VPS fixes it but I checked using netstat and the port is not in use.

Listening on socket failed - libuv error address already in use.
net-tcp-server failed to create server: couldn’t listenCould not bind MultiplexTcpServer to 0.0.0.0:30120.
Could not bind on 0.0.0.0:30120 - is this address valid and not already in use?

2 Likes

Why not just change the port to something else then?

EDIT: you’re making sure to close out of the current session before “restarting” right?

1 Like

because we have auto restarts (not turning them off as we need them) and it does it on the new port as well, it only started happening a few hours ago

The auto restart is killing the previous FXServer task before starting a new one, right?

If not, it’ll just keep opening FXServer tasks and never killing the previous one, therefore, the port would still be in use by the previous task.

1 Like

yes, even if i stop the server and manually start it the issue still exists

Did you set the server up as a service?

I might be forgetting something here but that’s the only other reason I could think it would say the port is already in use.

nope, it’s worked fine for months. Like I said only started happening a few hours ago

And just checking, I assume you only have one server running, correct?

1 Like

multiple, its not the other servers tho cos they have worked fine also and are all on different ports

even tho the same issue happens to them

Odd…

How’re you killing the task when restarting? Or how is the auto restart set up to kill the task?

1 Like

it runs taskkill, i’m pretty sure its not the killing of the task. Cos nothing has been edited around the time it started happening

I think it might be FiveM issues? As it is now online but nobody can connect. they keep getting timed out

I just couldn’t see any other reason for this other than the tasks aren’t being killed correctly…?

I’m a bit puzzled. Maybe someone else will have a suggestion? I’m interested to see lol

1 Like

Server API ping is also pretty high at the moment

All of my servers are running, and restarting, fine… I doubt it’s an issue with FiveM

1 Like

I doubt it’s an issue of ours cos it only started happening like 7 hrs ago and we have not changed anything

Maybe sleep a little after killing the task before starting the server again

It’s been fine for months, it even happens when manually restarting sometimes so it’s not the auto restart

so when you restart the machine, and do netstat -an | findstr “30120” (i’m assuming you are on windows?), you don’t get a response? Is this running as a registered service or is the shortcut in the Windows startup folder?

Then when you attempt to start, you get…

Listening on socket failed - libuv error address already in use.
net-tcp-server failed to create server: couldn’t listenCould not bind MultiplexTcpServer to 0.0.0.0:30120.
Could not bind on 0.0.0.0:30120 - is this address valid and not already in use?