TRACCAR EVENTS PROBLEM

Tjibbe Spoelstra6 years ago

Hi Anton,

I am currently working on implementing HTTP and SMPP SMS notifications. I can connect to the SMPP server successfully. My config file is in 2 parts, the config that I commented OUT gives me websocket connection error and no events ever fires off. I have linked the devices to the Notifications and went through all the documentation. The config that is active in the file (Meaning it is the config that I did NOT comment out) does not give me the "Web Socket Connection" error anymore but still my events does not fire, not even when I set it up to only use web notifications. The report does show me the log of events from the devices I have but the left panel, souds, or popup notifications of the web does not work. With this I have added a new user 2x new levels to Traccar named "Group Admin" and "Notifications Manager", I also added a new menu option "Sites/Fleets" for the "Group Admins". How can I share the code? I also added the login details of the current logged in user and Traccar version number in the top bar of the Map. Big issue seems to be with notifications. Below is a paste of my config file I am using UBUNTU 18 LTS, (THANK YOU IN ADVANCE):

<?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='notificator.types'>web,mail,sms</entry>
    <entry key='notificator.sms.manager.class'>org.traccar.smpp.SmppClient</entry>
    <entry key='sms.smpp.host'>192.168.8.11</entry>
    <entry key='sms.smpp.port'>2755</entry>
    <entry key='sms.smpp.username'></entry>
    <entry key='sms.smpp.password'></entry>
    <entry key='sms.smpp.notificationsCharset'>GSM</entry>
    <entry key='sms.smpp.notificationsDataCoding'>0</entry>
    <entry key='sms.smpp.sourceAddress'>+27768236097</entry>
    <entry key='status.timeout'>259200</entry>
    <entry key='web.timeout'>30</entry>
    <entry key='event.enable'>true</entry>
    <entry key='event.overspeed.notRepeat'>true</entry>
    <entry key='filter.enable'>true</entry>
    <entry key='filter.zero'>true</entry>
    <entry key='filter.invalid'>true</entry>
    <entry key='filter.duplicate'>true</entry>
    <entry key='coordinates.filter'>2</entry>
    <entry key='coordinates.minError'>12</entry>
    <entry key='deviceManager.lookupGroupsAttribute'>true</entry>
    <entry key='coordinates.filter'>5</entry>
    <entry key='coordinates.minError'>5</entry>
    <entry key='geocoder.reuseDistance'>100</entry>
    <entry key='geolocation.enable'>true</entry>
    <entry key='event.motionHandler'>true</entry>
    <entry key='event.geofenceHandler'>true</entry>
    <entry key='geocoder.format'>%d, %t, %r, %h, %f</entry>
    <entry key='database.driver'>com.mysql.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://localhost:3306/TRACCAR?allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>****</entry>
    <entry key='database.password'>****</entry>
    <entry key='tk102.timeout'>240</entry>
    <entry key='tk103.timeout'>240</entry>
    <entry key='gps103.timeout'>240</entry>
    <entry key='osmand.timeout'>240</entry>
    <entry key='minifinder.timeout'>600</entry>
    <entry key='tk102.timeout'>240</entry>
    <entry key='gt02.timeout'>240</entry>
    <entry key='gt06.timeout'>240</entry>
    <entry key='watch.timeout'>240</entry> -->

    <entry key='web.timeout'>300000</entry>
    <entry key='geocoder.enable'>true</entry>
    <entry key='geocoder.type'>google</entry>
    <entry key='geocoder.processInvalidPositions'>false</entry>
    <entry key='geocoder.onRequest'>true</entry>
    <entry key='geocoder.ignorePositions'>true</entry>
    <entry key='filter.enable'>true</entry>
    <entry key='filter.zero'>true</entry>
    <entry key='filter.invalid'>true</entry>
    <entry key='filter.duplicate'>true</entry>
    <entry key='coordinates.filter'>true</entry>
    <entry key='coordinates.minError'>50</entry>
    <entry key='coordinates.maxError'>100</entry>
    <entry key='geocoder.reuseDistance'>200</entry>
    <entry key='status.timeout'>259200</entry>
    <entry key='deviceManager.lookupGroupsAttribute'>true</entry>
    <entry key='event.enable'>true</entry>
    <entry key='event.overspeed.notRepeat'>true</entry>
    <entry key='geolocation.enable'>true</entry>
    <entry key='geocoder.format'>%d, %t, %r, %h, %f</entry>
    <entry key='event.motionHandler'>true</entry>
    <entry key='event.geofenceHandler'>true</entry>
    <entry key='database.driver'>com.mysql.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://localhost:3306/TRACCAR?allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''&amp;useSSL=False</entry>
    <entry key='database.user'>****</entry>
    <entry key='database.password'>****</entry>
    <entry key='gps103.timeout'>800</entry>
    <entry key='tk102.timeout'>6800</entry>
    <entry key='tk103.timeout'>6800</entry>
    <entry key='osmand.timeout'>6800</entry>
    <entry key='minifinder.timeout'>60000</entry>

</properties>
Anton Tananaev6 years ago

I would recommend you to carefully read documentation for all parameters that you use:

https://www.traccar.org/configuration-file/

You are trying to set timeout to 30 MILLISECONDS, which is obviously way too low.

Tjibbe Spoelstra6 years ago

Hi Anton, thank you for the quick reply. I have set <entry key='web.timeout'>300000</entry> and then I still dont see any notifications however the "Websocket Connection Error" does not appear.

Tjibbe Spoelstra6 years ago

Hi Anton,

I got the Web notifications working, the Websocket connection error is also not appearing anymore, the SMPP connection connects to my Android SMPP server (https://play.google.com/store/apps/details?id=com.icecoldapps.serversultimate&hl=en). The following config is currently in use now:

<entry key='notificator.types'>web,mail,sms</entry>
<entry key='sms.enable'>true</entry>
<entry key='web.timeout'>600000</entry>
<entry key='event.enable'>true</entry>
<entry key='geocoder.type'>google</entry>
<entry key='sms.smpp.host'>192.168.8.11</entry>
<entry key='sms.smpp.port'>2755</entry>
<entry key='sms.smpp.username'></entry>
<entry key='sms.smpp.password'></entry>
<entry key='sms.smpp.notificationsCharset'>GSM</entry>
<entry key='sms.smpp.notificationsDataCoding'>0</entry>
<entry key='database.driver'>org.h2.Driver</entry>
<entry key='database.url'>jdbc:h2:./data/database</entry>
<entry key='database.user'>sa</entry>
<entry key='database.password'></entry>

Everything now works fine, except the SMSes are not being actually sent. Logs do show on the App and server that SMPP channel is opened. I did send an email to the App developers regarding the configuration parameters the App might need (If there are any). I will post the feedback I get from them in this thread (Summarised obviously). I also started working on the Android SMPP server you have here: https://github.com/tananaev/smpp-server-android and I managed to at least get a successful build/compile using Android Studio on the first go which made me very happy. Are there any know issues with the current Android app I use as an SMPP server?

Thank you for your time, I can only assume you are a very busy person.

Tjibbe Spoelstra6 years ago

Just a quick update: The following config also works but gives the same results:

    <entry key='notificator.types'>web,mail,sms</entry>
    <entry key='sms.enable'>true</entry>
    <entry key='web.timeout'>600000</entry>
    <entry key='event.enable'>true</entry>
    <entry key='geocoder.type'>google</entry>
    <entry key='sms.smpp.host'>192.168.8.11</entry>
    <entry key='sms.smpp.port'>2755</entry>
    <entry key='sms.smpp.username'></entry>
    <entry key='sms.smpp.password'></entry>
    <entry key='sms.smpp.notificationsCharset'>GSM</entry>
    <entry key='sms.smpp.notificationsDataCoding'>0</entry>
    <entry key='database.driver'>org.h2.Driver</entry>
    <entry key='database.url'>jdbc:h2:./data/database</entry>
    <entry key='database.user'>sa</entry>
    <entry key='database.password'></entry>
Tjibbe Spoelstra6 years ago

Logs of the wrapper shows SMPP connection without any errors and now the config point to my localhost MySQL:

FINEST|27673/0|Service traccar|18-09-12 13:07:07|[main] INFO liquibase.lockservice.StandardLockService - Successfully released change log lock
FINEST|27673/0|Service traccar|18-09-12 13:07:07|[main] INFO org.eclipse.jetty.util.log - Logging initialized @128023ms
FINEST|27673/0|Service traccar|18-09-12 13:07:08|[main] INFO org.eclipse.jetty.server.Server - jetty-9.2.24.v20180105
FINEST|27673/0|Service traccar|18-09-12 13:07:10|[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@3c19592c{/api,null,AVAILABLE}
FINEST|27673/0|Service traccar|18-09-12 13:07:10|[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.t.w.@2dfeb141{/,null,AVAILABLE}
FINEST|27673/0|Service traccar|18-09-12 13:07:10|[main] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@16ee9aa7{HTTP/1.1}{0.0.0.0:8082}
FINEST|27673/0|Service traccar|18-09-12 13:07:10|[main] INFO org.eclipse.jetty.server.Server - Started @130848ms
FINEST|27673/0|Service traccar|18-09-12 13:07:18|[Reconnection-Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - sync send PDU: (bind_transceiver: 0x00000017 0x00000009 0x00000000 0x00000001) (body: systemId [] password [] systemType [] interfaceVersion [0x34] addressRange (0x00 0x00 [])) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:07:18|[Reconnection-Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - sync send PDU: (bind_transceiver: 0x00000017 0x00000009 0x00000000 0x00000001) (body: systemId [] password [] systemType [] interfaceVersion [0x34] addressRange (0x00 0x00 [])) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:07:18|[Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - received PDU: (bind_transceiver_resp: 0x0000001A 0x80000009 0x00000000 0x00000001 result: "OK") (body: systemId [SMPP]) (opts: (sc_interface_version: 0x0210 0x0001 [34]))
FINEST|27673/0|Service traccar|18-09-12 13:07:18|[Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - received PDU: (bind_transceiver_resp: 0x0000001A 0x80000009 0x00000000 0x00000001 result: "OK") (body: systemId [SMPP]) (opts: (sc_interface_version: 0x0210 0x0001 [34]))
FINEST|27673/0|Service traccar|18-09-12 13:08:18|[EnquireLink-Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - sync send PDU: (enquire_link: 0x00000010 0x00000015 0x00000000 0x00000002) (body: ) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:08:18|[EnquireLink-Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - sync send PDU: (enquire_link: 0x00000010 0x00000015 0x00000000 0x00000002) (body: ) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:08:18|[Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - received PDU: (enquire_link_resp: 0x00000010 0x80000015 0x00000000 0x00000002 result: "OK") (body: ) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:08:18|[Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - received PDU: (enquire_link_resp: 0x00000010 0x80000015 0x00000000 0x00000002 result: "OK") (body: ) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:09:18|[EnquireLink-Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - sync send PDU: (enquire_link: 0x00000010 0x00000015 0x00000000 0x00000003) (body: ) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:09:18|[EnquireLink-Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - sync send PDU: (enquire_link: 0x00000010 0x00000015 0x00000000 0x00000003) (body: ) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:09:18|[Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - received PDU: (enquire_link_resp: 0x00000010 0x80000015 0x00000000 0x00000003 result: "OK") (body: ) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:09:18|[Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - received PDU: (enquire_link_resp: 0x00000010 0x80000015 0x00000000 0x00000003 result: "OK") (body: ) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:10:15|[pool-3-thread-1] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - sync send PDU: (submit_sm: 0x00000060 0x00000004 0x00000000 0x00000004) (body: (serviceType [] sourceAddr [0x05 0x00 [localhost]] destAddr [0x01 0x01 [+27768236097]] esmCls [0x00] regDlvry [0x00] dcs [0x00] message [546A696262652043656C6C206F6E6C696E6520617420323031382D30392D31322031333A31303A31350A])) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:10:15|[Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - received PDU: (submit_sm_resp: 0x00000011 0x80000004 0x00000000 0x00000004 result: "OK") (body: (messageId [])) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:10:18|[EnquireLink-Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - sync send PDU: (enquire_link: 0x00000010 0x00000015 0x00000000 0x00000005) (body: ) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:10:18|[EnquireLink-Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - sync send PDU: (enquire_link: 0x00000010 0x00000015 0x00000000 0x00000004) (body: ) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:10:18|[Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - received PDU: (enquire_link_resp: 0x00000010 0x80000015 0x00000000 0x00000004 result: "OK") (body: ) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:10:18|[Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - received PDU: (enquire_link_resp: 0x00000010 0x80000015 0x00000000 0x00000005 result: "OK") (body: ) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:10:28|[pool-3-thread-1] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - sync send PDU: (submit_sm: 0x00000060 0x00000004 0x00000000 0x00000006) (body: (serviceType [] sourceAddr [0x05 0x00 [localhost]] destAddr [0x01 0x01 [+277***36097]] esmCls [0x00] regDlvry [0x00] dcs [0x00] message [416E616469612043656C6C206F6E6C696E6520617420323031382D30392D31322031333A31303A32380A])) (opts: )
FINEST|27673/0|Service traccar|18-09-12 13:10:28|[Traccar.smppSession] INFO com.cloudhopper.smpp.impl.DefaultSmppSession - received PDU: (submit_sm_resp: 0x00000011 0x80000004 0x00000000 0x00000006 result: "OK") (body: (messageId [])) (opts: )