- Installed traccar and Configured to My Database everything is ok
- Added a device in my DB
This is my traccar.xml file
<entry key='web.enable'>true</entry>
<entry key='web.port'>8082</entry>
<entry key='web.path'>/opt/traccar/web</entry>
<entry key='geocoder.enable'>false</entry>
<entry key='geocoder.type'>google</entry>
<entry key='logger.enable'>true</entry>
<entry key='logger.level'>all</entry>
<entry key='logger.file'>/opt/traccar/logs/tracker-server.log</entry>
<entry key='database.driver'>com.mysql.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/DBNAME?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=ANSI_QUOTES</entry>
<entry key='database.user'>XXXXXXXXXX</entry>
<entry key='database.password'>XXXXXXXXXX</entry>
<entry key='forward.enable'>true</entry>
<entry key='forward.url'>http://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX?data={uniqueId},{latitude},{longitude},{fixTime},{speed},{course},{valid},{attributes}</entry>
<entry key='database.selectDevicesAll'>
select id, '' as name, device_id as uniqueid from TB_NAME where status=1;
</entry>
<entry key='gt06.port'>5023</entry>
<entry key='gl200.port'>5004</entry>
- Opening the traccar-server.log getting this message
2018-07-31 11:22:40 DEBUG: [F49ABD4C: 5023 < 106.76.194.176] HEX: 78781101035151009028970680002121008365d40d0a
2018-07-31 11:22:40 INFO: Query not provided: database.selectDevices
2018-07-31 11:22:40 WARN: Unknown device - 351510090289706 (106.76.194.176)
May i know what's the reason behind this
thank you
I think log messages are pretty self-explanatory. You are missing an SQL query.
solved..
By Chnaging the selectDevicesAll to selectDevices for selecting the device from the database
Thank you Anton
This is my traccar.xml file
<entry key='web.enable'>true</entry> <entry key='web.port'>8082</entry> <entry key='web.path'>/opt/traccar/web</entry> <entry key='geocoder.enable'>false</entry> <entry key='geocoder.type'>google</entry> <entry key='logger.enable'>true</entry> <entry key='logger.level'>all</entry> <entry key='logger.file'>/opt/traccar/logs/tracker-server.log</entry> <!-- DATABASE CONFIG --> <entry key='database.driver'>com.mysql.jdbc.Driver</entry> <entry key='database.url'>jdbc:mysql://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/DBNAME?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=ANSI_QUOTES</entry> <entry key='database.user'>XXXXXXXXXX</entry> <entry key='database.password'>XXXXXXXXXX</entry> <entry key='forward.enable'>true</entry> <entry key='forward.url'>http://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX?data={uniqueId},{latitude},{longitude},{fixTime},{speed},{course},{valid},{attributes}</entry> <entry key='database.selectDevicesAll'> select id, '' as name, device_id as uniqueid from TB_NAME where status=1; </entry> <!-- PROTOCOL CONFIG --> <entry key='gt06.port'>5023</entry> <entry key='gl200.port'>5004</entry>
May i know what's the reason behind this
thank you