Server doesn't update tracker id automatically

Chris10014 7 years ago

Hello,

when I insert a new device with its id into the database the server doesn't write the positiondata into it. Only after restart of the traccar server all works fine. Could anyone give me a hint what I can do?
In the log files I see this error messages:

Traccar for iOS (unclear for me what this means)

2018-08-24 08:30:34  INFO: [3634D4C3] connected
2018-08-24 08:30:34 DEBUG: [3634D4C3: 5055 < 80.187.80.128] HEX: 16030100d8010000d40303b41f3d0dfe1cd99e93463a47e35d23c574a82acc18423dc39c1a485380ca499800002ec02cc02bc024c023c00ac009cca9c030c02fc028c027c014c013cca8c008c012009d009c003d003c0035002f000a0100007dff0100010000000014001200000f74726163656d79726163652e636f6d00170000000d0014001204030804040105030805050108060601020100050005010000000033740000001200000010001b001908737064792f332e3106737064792f3308687474702f312e31000b00020100000a000a0008001d001700180019
2018-08-24 08:30:34  WARN: [3634D4C3] error - invalid version format: ▒~Y▒~^▒~SF:G ̄]#▒~ETᄄ*▒~L^XB=▒~C▒~\^ZHS▒~@▒~JI▒~X^@^@.▒~@,▒~@+▒~@$▒~@#▒~@ - IllegalArgumentException (...)
2018-08-24 08:30:34  INFO: [3634D4C3] disconnected
2018-08-24 08:30:34  WARN: [3634D4C3] error - invalid version format: ▒~Y▒~^▒~SF:G ̄]#▒~ETᄄ*▒~L^XB=▒~C▒~\^ZHS▒~@▒~JI▒~X^@^@.▒~@,▒~@+▒~@$▒~@#▒~@ - IllegalArgumentException (... < MM
ainEventHandler:120 < *:109 < ... < GeocoderHandler:43 < ... < ExtendedObjectDecoder:52 < ...)
2018-08-24 08:30:35  INFO: [08F4D7D8] connected
2018-08-24 08:30:35 DEBUG: [08F4D7D8: 5055 < 80.187.80.128] HEX: 16030100a4010000a0030197eefbdf67f6f5c7ace54031a46b5c21dc7edc4b7677d3c2829ae658b6b4184f000012002f003300350039c009c00ac013c014560001000065ff0100010000000014001200000f74726163656d79726163652e636f6d0017000000050005010000000033740000001200000010001b001908737064792f332e3106737064792f3308687474702f312e31000b00020100000a000a0008001d001700180019
2018-08-24 08:30:35  WARN: [08F4D7D8] error - empty text - IllegalArgumentException (...)
2018-08-24 08:30:35  INFO: [08F4D7D8] disconnected
2018-08-24 08:30:35  WARN: [08F4D7D8] error - empty text - IllegalArgumentException (... < MainEventHandler:120 < *:109 < ... < GeocoderHandler:43 < ... < ExtendedObjectDecoder:52 < ...)
2018-08-24 08:31:08  INFO: [E0C14151] connected
2018-08-24 08:31:08 DEBUG: [E0C14151: 5055 < 80.187.80.128] HEX: 16030100d2010000ce03035f93b954829f95664c34168fdb4c14473246449381aa82cb7e5ab82cdf4433c8000028c02cc02bc024c023c00ac009cca9c030c02fc028c027c014c013cca8009d009c003d003c0035002f0100007dff0100010000000014001200000f74726163656d79726163652e636f6d00170000000d0014001204030804040105030805050108060601020100050005010000000033740000001200000010001b001908737064792f332e3106737064792f3308687474702f312e31000b00020100000a000a0008001d001700180019
2018-08-24 08:31:08  WARN: [E0C14151] error - empty text - IllegalArgumentException (...)
2018-08-24 08:31:08  INFO: [E0C14151] disconnected

TKStart LK109 (this the error messages are clear. After restart the server knows the device)

2018-08-18 21:13:18 DEBUG: [137A9BF5: 5013 < 80.187.100.216] HEX: 2a48512c343130363033393531372c56312c3136303130322c562c353030352e303137312c4e2c30303832352e393037382c452c3030302e30302c3030302c3135303831382c46464646464246462c3236322c30312c302c302c3423
2018-08-18 21:13:18  WARN: Unknown device - 4106039517 (80.187.100.216)
2018-08-18 21:13:18 DEBUG: [137A9BF5: 5013 < 80.187.100.216] HEX: 2a48512c343130363033393531372c23

B.R.
Christoph

Anton Tananaev 7 years ago

You need to use API instead of changing database directly. As for Traccar Client issue, it looks like you are using HTTPS instead of HTTP.

Chris10014 7 years ago

Thanks for your support. I understood that I can't insert devices diretly to my db. That's what I'm currently doing.
I'm a rookie to api technologies and I don't know how to use it. Do you know a page where I can find more detailed information and help how to implement it and doing the http calls?

Anton Tananaev 7 years ago

It's a pretty standard REST API. There is plenty of information online. You can also just check what official web app sends.

Chris10014 7 years ago

One more, hopefully not a stupid question. Which username and password must be used for the REST call? E-Mail address and password of a user with admin permission?

Anton Tananaev 7 years ago

Any user that has access to the data that you want to change.