positions not saved in tc_positions table

Fadi2 years ago

Hi All

I installed traccar 5 with mysql and everything working fine, i can see routes in web and all positions without any issue

when check mysql database all tables have data but tc_positions table is empty

can anyone help me to let positions get saved in tc_positions table

Thank you

Anton Tananaev2 years ago

Anything in the logs?

Anton Tananaev2 years ago

Do you have any customization or changes to the config file that we need to be aware of?

Fadi2 years ago

nothing not normal in log

no any customization or any modify

But i notice when using mysql status of any object is always offline

when not using mysql its back working

any suggestions ?

Anton Tananaev2 years ago

Nothing in the logs? Not even data from devices? Then it probably has nothing to do with version 5.

Fadi2 years ago

There is data from devices in the log, i mean no errors in log

see this example

2022-05-25 20:05:00  INFO: [T3fdaf1f7] connected
2022-05-25 20:05:00  INFO: [T3fdaf1f7: teltonika < 37.121.25.252] 000f333537303733323933313035383237
2022-05-25 20:05:00  INFO: [T3fdaf1f7: teltonika > 37.121.25.252] 01
2022-05-25 20:05:00  INFO: [T198b346a] connected
2022-05-25 20:05:00  INFO: [T198b346a: teltonika < 37.121.25.252] 000f333537303733323933313035383237
2022-05-25 20:05:00  INFO: [T198b346a: teltonika > 37.121.25.252] 01
2022-05-25 20:05:01  INFO: [T3fdaf1f7: teltonika < 37.121.25.252] 000000000000003d8e0100000180fc36bb58001a7a89350a7b2d8e04cc010a12000000000005000200ef0100715b0002004232eb0018000000010010003246c10000000001000071bf
2022-05-25 20:05:01  INFO: [T3fdaf1f7: teltonika > 37.121.25.252] 00000001
2022-05-25 20:05:01  INFO: [T3fdaf1f7] id: 357073293105827, time: 2022-05-25 20:14:47, lat: 17.58448, lon: 44.42381, course: 266.0
2022-05-25 20:05:02  INFO: [T198b346a: teltonika < 37.121.25.252] 000000000000003d8e0100000180fc36bb58001a7a89350a7b2d8e04cc010a12000000000005000200ef0100715b0002004232eb0018000000010010003246c10000000001000071bf
2022-05-25 20:05:02  INFO: [T198b346a: teltonika > 37.121.25.252] 00000001
2022-05-25 20:05:02  INFO: [T198b346a] id: 357073293105827, time: 2022-05-25 20:14:47, lat: 17.58448, lon: 44.42381, course: 266.0
Anton Tananaev2 years ago

If there are no errors, it should be written in the database. Are you sure you're looking at the right database?

Fadi2 years ago

yes i am sure, i checked it again

Fadi2 years ago

I think the issue with its not able to get device online when using mysql, once remove connection with mysql the devices got online

strange

Anton Tananaev2 years ago

Does everything else work? Like if you add a new device does it show up in the database table?

Fadi2 years ago

Yes everything working

Fadi2 years ago

Add, modify devices, groups, settings , all works and saved in database but positions table is NOT, its empty, and all devices gone offline

Anton Tananaev2 years ago

Well, it works for all our servers. We use MySQL and Traccar 5.0. So I suspect we're missing some context.

Fadi2 years ago

Its fresh installation
centos 7 dedicated server
device for test is Teltonika FMB120
ports are open in firewall

positions not working once change traccar.xml to use mysql (devices gone offline, positions table is empty, all other functions are working well and saved in database

this is mysql configuration

<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://localhost:3306/db_name?serverTimezone=UTC&amp;allowPublicKeyRetrieval=true&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
<entry key='database.user'>db_user</entry>
<entry key='database.password'>db_pass</entry>
Marcin2 years ago

Maybe you changed the DB? Sometimes its just one letter and everything targets somewhere else.
Or you have had another configuration with local storage?
But without storing somewhere there could be no data in UI :)