Traccar 5.1 preview

Anton Tananaev2 years ago

Are you sure the broadcast is working and you have WebSocket open?

Sanjay Shah2 years ago

Though I haven't tested, wanted to check can the websocket work on one server and the device get connected on other server in 5.1.

Anton Tananaev2 years ago

Yes, it should already work, but as I said, we haven't done much testing on that yet.

Oluwatobi2 years ago

I installed the new software on my main server at midnight just to run through the stability.
immediately after installing it, i realised all my client started receiving notifications on vehicle within or outside of their account. I also received notification on all vehicles not within my user account.

To recreate it, i will suggest create two vehicle and two user, set the different notifications and see if notification will break through user's boundaries.

Below is a screenshot from one of my user's account the next morning.
https://uploaddeimagens.com.br/imagens/zNeDiAw
https://uploaddeimagens.com.br/imagens/96NGVfk

Anton Tananaev2 years ago

Found one problem where duplicated notifications were sent, but I'm not able to reproduce the issue where you get notifications from wrong users. Can you please create a ticket and provide all the details to reproduce it from scratch. I have tried what you suggested, but it works fine.

SwayDev2 years ago

Hello Anton,

Yes, broadcast and multicast on the interfaces are on, also verified WebSocket is open on both nodes.

Created a Github issue: Issue 4882

Do you think it would be a good idea to implement a very basic level of configurable logging for activity/broadcast between each node for future troubleshooting use-cases?

SwayDev2 years ago

Correction: The Github issue link in the last post need to be corrected to issue # 4882, please as the edit feature is not available for the post any longer.

SwayDev2 years ago

Hello, Sharing a few questions hoping to understand and deploy the solution with its full potential. Hoping the answers would also help other users.

  1. With multiple nodes connected to the same DB if a newer version of Traccar with DB schema changes is introduced into the cluster, is there a possibility of conflict?

  2. Will each node have a unique identifier? I noticed every few minutes the tc_servers table is queried what is the purpose of that?

  3. What is the best approach to load balance for both device-facing and user-facing interfaces?

  • Would it be to deploy as many nodes as needed and point devices and users to any 1 single node public interface?

or is there another recommended way?

Anton Tananaev2 years ago
  1. Database migration is done using Liquibase, which has a lock, so there shouldn't be any conflicts. Basically the first node that acquires the lock will do the migration. Others will wait.
  2. Not really. Request to tc_servers should only happen when you do some API requests. It's part of user permission check.
  3. There should be no difference. The idea is that users and devices can connect to any random node and work well.
Anton Tananaev2 years ago

Does anyone else have issues with notifications delivered to wrong users? It seems like a serious issue if it does actually happen. I'm not able to reproduce it and I don't see any other reports.

Oluwatobi2 years ago

HI Anton, I am not sure how to reproduce this, as i have this loaded on an active / live deployment server. I am connected to sql database and i have both firebase and traccar notification on.

Below is my traccar xml file that can help see my configuration.

<?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>

    <!--

    This is the main configuration file. All your configuration parameters should be placed in this file.

    Default configuration parameters are located in the "default.xml" file. You should not modify it to avoid issues
    with upgrading to a new version. Parameters in the main config file override values in the default file. Do not
    remove "config.default" parameter from this file unless you know what you are doing.

    For list of available parameters see following page: https://www.traccar.org/configuration-file/

    -->
    
<!--    SQL Server Cofiguration-->
    <!--
        <entry key='database.driver'>com.mysql.jdbc.Driver</entry> 
    <entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://localhost:3306/traccardb?useSSL=false&amp;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='database.historyDays'>120</entry>
    -->
    
    <!-- New SQL Connection Settings-->
    <entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://localhost:3306/traccardb?serverTimezone=UTC&amp;useSSL=false&amp;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='database.historyDays'>120</entry>
    
<!--    Geocoder Notification and Geolocation Optimization. -->
    
    <entry key='geocoder.enable'>true</entry>
    <entry key='geocoder.ignorePositions'>false</entry>
    <entry key='geocoder.type'>nominatim</entry>
    <entry key='geocoder.url'>*******/nominatim/reverse</entry>
    <entry key='geocoder.cacheSize'>2000</entry>
    <entry key='geocoder.reuseDistance'>100</entry>
    
<!--    Configuration for the web-->
    <entry key='mail.smtp.host'>smtp.gmail.com</entry>
    <entry key='mail.smtp.port'>587</entry>
    <entry key='mail.smtp.starttls.enable'>true</entry>
    <entry key='mail.smtp.from'>Tracker_Notification</entry>
    <entry key='mail.smtp.auth'>true</entry>
    <entry key='mail.smtp.username'>***********</entry>
    <entry key='mail.smtp.password'>***********</entry>
    
<!--    Configuration for Push Notification-->
    
    <entry key='notificator.types'>web,mail,traccar,firebase</entry>
    <entry key='notificator.traccar.key'>*********</entry>
    <entry key='notificator.firebase.key'>*********</entry>
    
    
<!-- Configuration for specific filtering -->
    <entry key='filter.enable'>true</entry>
    <entry key='filter.invalid'>true</entry>
    <entry key='filter.zero'>true</entry>
    <entry key='web.url'>*********:8082</entry>
    <entry key='processing.copyAttributes.enable'>true</entry>
    <entry key='processing.copyAttributes'>power,ignition,battery,batteryLevel,motion</entry>


<!--Configuration for report filtering-->
<entry key='report.trip.useIgnition'>true</entry>

</properties>
Anton Tananaev2 years ago

Is it consistently reproducible for you? Maybe we can get a database dump for testing?

Luiz Kill2 years ago

Hi Anton, how are you? Is this 5.1 version focused on the new UI?

Anton Tananaev2 years ago

There are many updates in the modern UI, but even more changes on the backend.

clendenes2 years ago

hola Anton, una pregunta porque en el app de traccar manager sale siempre fuera de linea y no envia notificaciones