Telegram notification not working correct in Traccar 5.0

HJvD2 years ago

My Telegram notification is not working as before after updating to 5.0. The rules in the config file are as they were before.

<entry key="notificator.types">web,mail,telegram</entry>
<entry key="notificator.telegram.key">aaaaaaa:bbbbbb</entry>
<entry key="notificator.telegram.chatId">7cccccc</entry>

However, the dropdownlist in the UI only shows 'web' and 'mail' as choices to be made. That said, I do get notifications sometimes (in my case when leaving a geofence), but not always.

In the documentation I see that Telegram as a way to make a notification has no (longer) explanation how to configure. How can I troubleshoot this problem, or do I just wait for the next release for improvement?

HJvD2 years ago

That said, I also would like to thank you guys and girls for the UI improvement. I really like it!

Anton Tananaev2 years ago

Are you sure you don't have another notificator.types entry somewhere in the config? We haven't really changed much notifications, so it should be working as before.

P.S. nice to hear that someone likes the new UI :)

HJvD2 years ago

This is the rest of my config Anton. And I am running my Traccar on Win10 as a service.

<entry key="config.default">./conf/default.xml</entry>
<entry key="event.geofenceHandler">true</entry>
<entry key="huasheng.timeout">35</entry>
<entry key="filter.enable">true</entry>
<entry key="filter.invalid">true</entry>
<entry key="filter.zero">true</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"/>
Anton Tananaev2 years ago

What of you try to remove mail for example. Does it disappear from the options list?

HJvD2 years ago

Yes Anton, after removing 'mail' from the config it does not appear in the dropdownlist. Then there is only 'web'. No 'telegram', that's the same as before removing 'mail' from the config.

Anton Tananaev2 years ago

Do you have any warnings in the log?

HJvD2 years ago

Where can I look Anton? Took a look in the windows log system, tried to find wrapper.log or any server log but no luck.

Anton Tananaev2 years ago
HJvD2 years ago

OK. Looked myself in this guide before and I found that this is for troubleshooting the relation between Traccar and Tracking devices. So if you wounder if there are warnings in C:\Program Files\Traccar\logs, well there is none. But I have the feeling that only data from devices are stored. For the record, my devices work fine and accurate and are shown in Traccar UI. The only thing not working is the Telegram notification.

Anton Tananaev2 years ago

Logs are for everything, not just device-related stuff. If there are no warning, then I don't know why it doesn't work. Something doesn't add up. If it's present in notificator.types, it should show up in the app or you should we a warning in the logs.

HJvD2 years ago

Ok. Did found something after looking at the right place (thanks Anton). The first warning is seen several times in the last eight days, The two below only once.

WARN: JAXBContext implementation could not be found. WADL feature is disabled.
WARN: hotmail-com.olc.protection.outlook.com:25 - NullPointerException (...)
WARN: IP adress here:80 - NullPointerException (...)
Anton Tananaev2 years ago

Those look suspicious. Please enable full stack traces and check again.

HJvD2 years ago

Here's some more after restarting the service. Now looking how to enable --stacktrace when starting Traccar as a Windows service. One moment please.

2022-06-01 20:24:13  INFO: HikariPool-1 - Starting...
2022-06-01 20:24:14  INFO: HikariPool-1 - Added connection conn0: url=jdbc:h2:./data/database user=SA
2022-06-01 20:24:14  INFO: HikariPool-1 - Start completed.
2022-06-01 20:24:14  INFO: Set default schema name to PUBLIC
2022-06-01 20:24:14  INFO: Clearing database change log checksums
2022-06-01 20:24:14  INFO: Successfully acquired change log lock
2022-06-01 20:24:14  INFO: Successfully released change log lock
2022-06-01 20:24:14  INFO: Successfully acquired change log lock
2022-06-01 20:24:14  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.json.JsonChangeLogParser Unable to get public no-arg constructor
2022-06-01 20:24:15  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.yaml.YamlChangeLogParser Unable to get public no-arg constructor
2022-06-01 20:24:16  INFO: Reading from PUBLIC.DATABASECHANGELOG
2022-06-01 20:24:16  INFO: Reading from PUBLIC.DATABASECHANGELOG
2022-06-01 20:24:16  INFO: Cannot load service: liquibase.hub.HubService: Provider liquibase.hub.core.StandardHubService could not be instantiated
2022-06-01 20:24:16  INFO: Successfully released change log lock
2022-06-01 20:24:18  INFO: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
2022-06-01 20:24:18  INFO: Operating system name: Windows 10 version: 10.0 architecture: amd64
2022-06-01 20:24:18  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: ojdkbuild version: 11.0.13+8-LTS
2022-06-01 20:24:18  INFO: Memory limit heap: 4070mb non-heap: 0mb
2022-06-01 20:24:18  INFO: Character encoding: Cp1252 charset: windows-1252
2022-06-01 20:24:18  INFO: Version: 5.0
2022-06-01 20:24:18  INFO: Starting server...
2022-06-01 20:24:19  INFO: jetty-10.0.7; built: 2021-10-06T19:34:02.766Z; git: da8a4553af9dd84080931fa0f8c678cd2d60f3d9; jvm 11.0.13+8-LTS
2022-06-01 20:24:20  INFO: Started o.t.w.@7a8eb5e6{/,null,AVAILABLE}
2022-06-01 20:24:20  INFO: Session workerName=node0
2022-06-01 20:24:20  WARN: JAXBContext implementation could not be found. WADL feature is disabled.
2022-06-01 20:24:21  INFO: Started o.e.j.s.ServletContextHandler@116b6dd6{/,null,AVAILABLE}
2022-06-01 20:24:21  INFO: Started ServerConnector@3391b883{HTTP/1.1, (http/1.1)}{0.0.0.0:8082}
2022-06-01 20:24:21  INFO: Started Server@4753d9a0{STARTING}[10.0.7,sto=0] @10439ms
2022-06-01 20:24:28  INFO: [T64d587df] connected
2022-06-01 20:24:28  INFO: [T64d587df: osmand < 192.168.1.1] 504f5354202f3f69643d3835323735302674696d657374616d703d31363534313037373534266c61743d35322e35353136373931266c6f6e3d352e383838353436342673706565643d302e302662656
Anton Tananaev2 years ago

Looks like those warnings disappeared.