Traccar will not start, the port is already in use

jimmyman6 years ago

Hello,

Traccar has been working well for us for a long time now. Now, the Traccar Service running on our server will not start. I reached out to Support@ my hosting company and they told me to edit C:\Program Files (x86)\Traccar\conf\traccar.xml and change the following line to a port not already in use.

entry key='osmand.port'>5555 entry

I don't mind doing that but it seems kind of strange to me because it's been working great for quite some time and nothing has changed on my server. Any help would be much appreciated.

-Jim

Anton Tananaev6 years ago

I would recommend to check what process causes the conflict.

jimmyman6 years ago

Ok thanks for the help Anton.

-Jim

LoadManager6 years ago

Thanks Anton. I work with Jim and we tried restarting the server and now it is working. :-)

khechiba kamel6 years ago

hello i'm new with your server i tray to log on the server but always its impossible what can i do ?
i install the Chrom and Firefox browser but it dosen't work

LoadManager6 years ago

@khechiba, you need to post your own question. Reply to my question is not accepted practice on support forums.

LoadManager6 years ago

@Anton, it stopped working again. It seems if we restart the server it will run without any problem however if we restart the Traccar service in the middle of the day it will fail to restart. Please let me know if you have any idea on the issue. Thank you Anton.

Anton Tananaev6 years ago

If it's the port conflict then you need to find out why some other process uses the port.

LoadManager6 years ago

It is not a port, that port is ok. Is there I log I can check?

Anton Tananaev6 years ago

Of course there are logs that you need to check first.

Andy Barnard6 years ago

I have this issue. On windows 7 (64-bit virtual machine) I type 'netstat -a -b' on the command line to find the process using the port in question (in my case 5001 amongst others), and it always says it is javaw.exe using the port. I have no other programs - as far as I know - using java other than traccar.

The logs (traccar) say there is a port conflict.

If I start the server from scratch, it starts OK, if I make change to the config file and then just restart the traccar service, I always get this error.

In my case the solution is always to restart the whole server. YMMV.

Anton Tananaev6 years ago

Try to stop service and see if it was actually successfully stopped.

Andy Barnard6 years ago

By 'restart the traccar service' I should have said 'stop the traccar service, wait for windows to tell me its stopped, then try to start the service'.

After windows reports the traccar service stopped it can be started again, and at this point the traccar log files show port conflicts.

When the traccar service is stopped, netstat -a -b shows that java.exe still has multiple open ports on port 5001, although it should be said, not as many open ports as when the service is running - so stopping the service seems to close some of the ports but not all of them. In case it is relevant to my case, I have chosen "gps103.timeout=14400", and as my devices typically change IP address a few times in 4 hours a number of old sockets are left open on port 5001.

Anyway, its not an issue for me as traccar is run in a VM with only one job, so I just restart the VM rather than restart the traccar service. Takes a bit longer, but doesn't have to be done very often...