Title says something about moving database, but the description is about ports. Can you please clarify the question. What exactly do you need help with?
Hello Anton,
Thanks for the reply and sorry for not being clear. Let me list the questions:
Thanks in advance.
Another question, can I disable some of the ports that traccar is listening to, but I am not using? If so, how? For example when I use the command in Linux netstat -a I get many ports that traccar listens to (5001 - 5220) , but I do not need traccar to listen to all of them.
You can remove unused ports from default.xml
.
Oh okay, that is pretty easy then to remove unused ports.
Thank you for your help.
Meaby you could switch off all other devices that are working. And then only switch on those devices that do not connect. Then check traccar log if those devices actually connect. With working devices switched off it will be easier to check.
I was also thinking, if you have changed server, meaby also server ip changed. Did you check those two devices actually connect to your new server ip and port and have the correct ID set in traccar server.
I think the devices do connect, but the HEXs are not being decoded. I may have to disconnect all of the other devices, which is something that I am not looking forwards to, and check the logs again.
The devices are pointing to the correct IP of the new server.
I think the devices do connect, but the HEXs are not being decoded
Logs to support this statement?
Here is the HEX log line for one of the troubled devices:
...
h02 < 172.58.184.13] HEX: 23232c696d65693a3335393731303034373836333234372c413b
connected
h02 < 172.58.184.13] HEX: 23232c696d65693a3335393731303034373836333234372c413b
connected
...
You are using wrong port for those devices.
I have used ports 5001, 5002, and 5013 on the new linux server. None of these ports seem to work.
On the windows server, I used port 5001 and they worked fine.
On the traccar demo I used ports 5001 and 5013 and also worked fine.
Do you know which port I should be using?
You should be using the same port - 5001. Why would the port change? Each port is mapped to a single protocol. Changing your OS won't change the protocol that device uses.
Originally, I tried port 5001 on the new linux server which did not work. Then I started playing around with other ports based on some forum discussions, but no luck.
I think (not sure) these Chinese clones use the h20 protocol which is mapped to port 5013, but again port 5001 was working fine on the old server.
So I installed Traccar Linux 64 version 4.13 on a Linux Ubuntu 20.04 server according to the official instructions (https://www.traccar.org/linux/). I decided to move the windows 10 databases of my previous Traccar installation (version 4.12) and move them to the Linux 20.04 installation.
After making sure the devices point to the new sever, everything seems to work well except two devices which do not connect to the new server.
One of this device is a tk103B and the other a G303 device.
I change the communication ports (from 5001 to 5002 to 5013) but no luck. By the way another device works on port 5013.
I reset the devices and went through the configuration again, but no luck.
However when I pointed the two devices to the Traccar demo server, they work just fine.
Is moving the databases not such a good idea or there is something else going on? Again all devices except 2 work on the new server with the copied databases.
Thank you in advance.