can't store positions

zmitya9 years ago

Hi Anton,

How is this possible ?

2015-06-03 17:09:52 INFO: device: 6, time: Thu Jun 04 01:09:52 CEST 2015, lat: 47.xxxx, lon: 19.xxxx
2015-06-03 17:09:52 WARN: Cannot add or update a child row: a foreign key constraint fails (traccar.positions, CONSTRAINT FK65C08C6ADB0C3B8A FOREIGN KEY (device_id) REFERENCES devices (id)) - com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException (null:-1)

mysql> select id, name from devices;
+----+--------------+
| id | name |
+----+--------------+
| 1 | CRF |
| 3 | GT06-N-sajat |
| 5 | GT03A |
| 8 | GT100 |
| 9 | CRX1 |
| 13 | TR02 |
+----+--------------+
6 rows in set (0.00 sec)

So as you can see, there is no device with ID=6. How is it possible ?

Thanks,
Mitya

Anton Tananaev9 years ago

Try to restart Traccar service and see if it fixes the problem.

zmitya9 years ago

well, I think that might solve the problem.. I just testing the stuff and I am curious about the reasons. Is this because you do have a cache ? If yes, how long does the server keeps it in the cache ?

Anton Tananaev9 years ago

Yes, there is a cache, but it should be cleared every 5 minutes.