History from logs

Ensmer2 years ago

Hi,
Crying for help:
Is there any option to get history from only logs ? there are gps location, device id etc.

Btw. how to deal with error from update, due the port conflict ?

Thanks !

Anton Tananaev2 years ago

By default logs should have the device and basic location info.

What kind of port conflict are you getting from an update? There shouldn't be any.

Ensmer2 years ago

In logs after update there is "WARN: Port disabled due to conflict - Address already in use: bind - BindException (...)" and doesn't recive any data from devices.

Is there any way to make old database present history from newest logs ? ex. log from today with those data could be show on traccar menager with database from days before today.

Thanks for answer :)

Anton Tananaev2 years ago

You have to figure out the process that causes the port conflict. It has nothing to do with the update.

Not sure I understand the question about logs.

Ensmer2 years ago

About port conflict - there was no confict rigth before update, now it is. how/where can i check what port is conflicted ?

Back do log history. Manager doesn't see history. ex. ive got database backup from week ago, and i have logs with data from yesterday - can it work together this way ?

Anton Tananaev2 years ago

As I said, you have to investigate the conflict. Which process what ports etc.

As for getting history from logs, Traccar can't read it for you from logs, but you can write a script that would read logs and re-send the data.

Anton Tananaev2 years ago

You can try this script:

https://github.com/traccar/traccar/blob/master/tools/recover.py

Note that it is probably outdated, so you probably need to update it, but should give you an idea.

Ensmer2 years ago

Sorry, but im pretty green here. Is there a simple way to check what ports are in conflict ?
Something like this script to re-send data is hard to make, or maybe you can help me ? i'm really pushed against the wall...

Ensmer2 years ago

I will check it : ) Thanks for fast responds : )

Ensmer2 years ago

One more thing about the script from link from you - where i need to put it/run it to make it work to re-send data from logs ?

About ports, i'll try to check it, and i think a few of ports that traccar uses are occupated by windows processes, whare can i try to change traccar ports ?

Thank you very much for helping me

Ensmer2 years ago

OK ! i just solved port conflict problem !

  • Shut down traccar server process
  • CMD
  • "-netstat -a -b"
  • in default.xml compare ports with -netstat ports in use
  • change in default.xml occupate port to free one
    No WARN anymore !

Now i would be glad if someone can help me how to re-send data from logs to database ; ) trying to work with script from Anton gave me