Forward URL not working

Sai Reddy8 years ago

Hello

This is my traccar.xml
forward.url is not working. please help

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <entry key='config.default'>./conf/default.xml</entry>

<entry key='forward.enable'>true</entry>
<entry key='forward.url'>http://{myipaddress}:3000/v1/user/traccer?id={uniqueId}</entry>

<entry key='database.driver'>com.mysql.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://localhost:3306/traccar?useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>user</entry>
    <entry key='database.password'>password</entry>
</properties>
Anton Tananaev8 years ago

It should be working. The only recommendation I have is to debug the code and see what the problem is. Most likely it's on your receiving side.

Sai Reddy8 years ago

This is my log

id: 228254, time: 2018-01-09 10:58:05, lat: 17.44838, lon: 78.39200, speed: 0.0, course: 0.0
2018-01-09 10:58:20 DEBUG: [612849DA: 5055 < {ip}] HEX: 504f5354202f3f69643d3232383235342674696d657374616d703d31353135343935353030266c61743d31372e343438333832266c6f6e3d37382e3339323030312673706565643d302662656172696e673d3026616c7469747564653d3537302e3530323932393638373526626174743d33302e303030303031393037333438363320485454502f312e310d0a486f73743a2031332e3132372e32352e3138393a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a4163636570743a202a2f2a0d0a557365722d4167656e743a2054726163636172436c69656e742f34392043464e6574776f726b2f3839332e31342e322044617277696e2f31372e332e300d0a4163636570742d4c616e67756167653a20656e2d75730d0a436f6e74656e742d4c656e6774683a20300d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174650d0a0d0a
2018-01-09 10:58:20 DEBUG: [612849DA: 5055 > {ip}] HEX: 485454502f312e3120323030204f4b0d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
2018-01-09 10:58:20  INFO: [612849DA] id: 228254, time: 2018-01-09 10:58:20, lat: 17.44838, lon: 78.39200, speed: 0.0, course: 0.0
.
.
.

Data is getting pushed into mysql database but forward.url is not working

Should we change anything on default.xml?

Anton Tananaev8 years ago

Your config looks fine to me.

visiondrive8 years ago

Did you mean for the difference in spelling for your URL to show traccer rather than traccar?

<entry key='forward.url'>http://{myipaddress}:3000/v1/user/traccer