Error WARN: Cannot add or update a child row: a foreign key constraint fails

cperaltap9 years ago

Error 2015-07-01 23:58:03 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)
2015-07-01 23:58:11 DEBUG: [88A5037D: 5005 <- 190.44.65.143] - HEX: 2454524343522c32303135303730323033353530372e3030302c412c2d31382e3438393532322c2d37302e3238333031342c302e30302c302e30302c2d3237312e30302c34302c2a31310d0a
2015-07-01 23:58:21 DEBUG: [88A5037D: 5005 <- 190.44.65.143] - HEX: 2454524343522c32303135303730323034353732322e3732392c412c2d31382e3438383730322c2d37302e3238333237382c302e30302c302e30302c302e30302c34302c2a33660d0a
2015-07-01 23:58:31 DEBUG: [88A5037D: 5005 <- 190.44.65.143] - HEX: 2454524343522c32303135303730323033353530372e3030302c412c2d31382e3438393532322c2d37302e3238333031342c302e30302c302e30302c2d3237312e30302c34302c2a31310d0a
2015-07-01 23:58:33 DEBUG: [17E7E335: 5005 <- 190.163.92.55] - HEX: 2454524343522c32303135303730323033353832372e3030302c412c2d31382e3438323535362c2d37302e3237373738352c302e30302c302e30302c3131392e30302c31372c2a33300d0a
2015-07-01 23:58:33 INFO: device: 1, time: Wed Jul 01 23:58:27 EDT 2015, lat: -18.482556, lon: -70.277785

traccar 2.12 ubuntu mysql

Anton Tananaev9 years ago

Looks like you have removed or re-created the device and server hasn't synced up yet. Note that Traccar Client sends identification info only once after establishing connection, so you need to restart the server or client for changes to take effect.

cperaltap9 years ago

thanks. solved