I have a problem with a server, the devices go into an unknown state

mrchala2 months ago

I have a problem with a server, the devices go into unknown state, to ensure I reinstalled a new server and used postgres as a database, previously I had used mysql. I can't find the reason anymore. The traccar version is 5.12. Could someone give me their help or opinion.. thanks
Captura de pantalla 2024-09-23 a la(s) 5.31.12 p. m..png

Track-trace2 months ago

Well you only see Device unknow in the log right ?

So devices that are unknown in you server do not have the same device ID ?

Because there is no data from known devices in your log.

Anton Tananaev2 months ago

Unknown status means that your device hasn't reported anything for 10 minutes (default configuration). So you need to figure out why devices are not sending any data. We have a troubleshooting guide for that.

mrchala2 months ago

Exactly these devices in unknown status are reporting without problem, when restarting the server they all come back online.

Anton Tananaev2 months ago

Have you followed the troubleshooting guide?

Cristian2 months ago

After restarting the server, the devices from being online go to unknown?

Do you use any API to send notifications to e.g. WhatsApp?

mrchala2 months ago

if I am using API to send notifications via WhatsApp.

mrchala2 months ago

Anton, yes I have followed them.

Anton Tananaev2 months ago

Are you going to share results?

mrchala2 months ago

When I installed this particular server, I did it with a static IP and already had about 50 computers that reported to another IP with another TracCar, I exchanged the IPs so as not to reconfigure the computers, when I killed the old server it started to have that problem, what I did was create a new database and load the devices and the problem was solved, I understand that the IP change was the cause. Now it is working without problems.

mrchala2 months ago

I am seeing that when I activate notifications, I start to have the problem that the devices go into an unknown state. I have the traccar.xml configured in the following way.

<!-- ActivaciĆ³n de diferentes notificadores -->
<entry key='notificator.types'>web,sms,mail</entry>


<!--NOTIFICACIONES POR WHATSAPP -->
<entry key='sms.enable'>true</entry>
<entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
<entry key='sms.http.url'>http://xx.xx.xx.xx:3001/lead</entry>
<entry key='sms.http.template'>
    {
       "phone": "{phone}",
       "message": "{message}"
    }
</entry>
Cristian2 months ago

api whatsapp

Probable causes

1.- you are sending a notification to a user that has the phone field blank.
2.- you are sending a notification to a user that has not sent you the message to be authorized in your whatsapp api.

mrchala2 months ago

thanks.. i will check