forward.url not working with Opengts intergated

billy 4 years ago

Hello,

I want to post data from traccar to my own custom php script.knowing that I have opengts intergated

I added the next lines to the traccar.xml

<entry key='forward.enable'>true</entry>
<entry key='forward.url'>http://localhost:8000/notifications/test.php</entry>

but I dont receive anything at the server side :(

I tested the same thing without Opengts integrated and it worked ,but in my case i need to keep opengts :(
Am I doing something wrong ?

billy 4 years ago

this is what i get in the log file :

2021-09-01 11:17:13  INFO: Query not provided: database.updateDeviceExtended
2021-09-01 11:17:13  WARN: [bac7c901] error - NullPointerException (... < WebDataHandler:140 < *:197 < *:288 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObj$
2021-09-01 11:17:13  WARN: [bac7c901] error - NullPointerException (... < WebDataHandler:140 < *:197 < *:288 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObj$
2021-09-01 11:17:13  WARN: [bac7c901] error - NullPointerException (... < WebDataHandler:140 < *:197 < *:288 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObj$
2021-09-01 11:17:13  WARN: [bac7c901] error - NullPointerException (... < WebDataHandler:140 < *:197 < *:288 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObj$
2021-09-01 11:17:13  WARN: [bac7c901] error - NullPointerException (... < WebDataHandler:140 < *:197 < *:288 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObj$
2021-09-01 11:17:13  WARN: [bac7c901] error - NullPointerException (... < WebDataHandler:140 < *:197 < *:288 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObj$
2021-09-01 11:17:13  WARN: [bac7c901] error - NullPointerException (... < WebDataHandler:140 < *:197 < *:288 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObj$
2021-09-01 11:17:13  WARN: [bac7c901] error - NullPointerException (... < WebDataHandler:140 < *:197 < *:288 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObj$
2021-09-01 11:17:13  WARN: [bac7c901] error - NullPointerException (... < WebDataHandler:140 < *:197 < *:288 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObj$
2021-09-01 11:17:13  WARN: [bac7c901] error - NullPointerException (... < WebDataHandler:140 < *:197 < *:288 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObj$
2021-09-01 11:17:13  WARN: [bac7c901] error - NullPointerException (... < WebDataHandler:140 < *:197 < *:288 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObj$
2021-09-01 11:17:13  WARN: [bac7c901] error - NullPointerException (... < WebDataHandler:140 < *:197 < *:288 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObj$
2021-09-01 11:17:13  INFO: [bac7c901] disconnected
Anton Tananaev 4 years ago

The error seems to indicate that device is missing.

Your forwarding config doesn't really make sense. It looks like you are not forwarding any useful data.

billy 4 years ago

this url is just for testing purposes,it actually should create a file in case if it works ...

<entry key='forward.url'>http://localhost:8000/notifications/test.php</entry>

I tried to forward attributes and the unique id before (without opengts integrated) and it works !! but now I dont receive anything.

I am using opengts database as i added all the device into the DB.

I dont know why it doent work now :( is it correct forwarding data this way even with opengts intergated ?
any way to solve this ? :(

Anton Tananaev 4 years ago

I don't know if it's going to work with OpenGTS integration. Never tested it together, but I think it should be ok.

billy 4 years ago

I just found that i cannot use 'forward.url' since i had set web.enable to false.

also ,From this doc :
https://www.traccar.org/opengts/

its says that I should Remove all event.* entries from the config
then 'event.forward.url' should be removed also :(

I will keep testing and update in case if someone have the same problem ...

Thank you Anton ,

Anton Tananaev 4 years ago

I just found that i cannot use 'forward.url' since i had set web.enable to false.

This part doesn't make sense to me. Where did you get this information from?