Broadcast Question

matli3 months ago

Hi all,
I have setup a boardcast between two traccar servers using one single SQL database. I added the following code to the configuration of both servers and opened port 7001 on both instances.

[object Object]

As I could not find any further information in the documentation and the forum, let me ask here.

1.) Does this config make any sense?
2.) What to look for in the log file to see whether the multicasting is working or how else can I validate that the multcasting is working as it should?
3.) When a device sends data to server 1 is server 2 updating the device as well (e.g. live routes?) without refreshing the page?

I am using a loadbalancer to balance the traffic between both servers. The devices are sending their data to either server 1 or server 2. At the moment it appears that when device 1 sends data to server 1, server 2 only updates the device on page refresh. Is this correct or am I missing something.

Thanks,
Chris

Anton Tananaev3 months ago

This config doesn't make sense. You have to use a multicast address.

matli3 months ago

Hi Anton,

Thanks, yes, that was not correct. My bad. Made changes as follows. I retrieved the address running the command ip maddr show.

[object Object]
[object Object]
Anton Tananaev3 months ago

That is better, but I think that address is reserved for system use, so I wouldn't recommend using it.

matli3 months ago

Thanks Anton. I was doing some research on how to add / use a multicast address on a specific multicast enabled interface on Ubuntu. Stuck at this point. Can I just pick any address from the wide multicast range or do I need to config the interface to use a specific multicast address?

Anton Tananaev3 months ago

I think you can just pick any address.

matli3 months ago

Hi again Anton. Not sure what I might be missing. I'll continue tomorrow with my testing. At this moment server 2 does not get any push from server 1 once a device status changes. Server 2 needs a page refresh to see the latest device updates.

Both servers now use:

[object Object]

But no success right now.

Server two private IP: 172.26.4.143
Server one private IP: 172.26.13.192

Could that be an issue that both are not in the same IP range?

matli3 months ago

Well, on the other hand both servers actually do use the same broadcast IP.

[object Object]
Anton Tananaev3 months ago

What's the network mask?

matli3 months ago
[object Object]
Anton Tananaev3 months ago

Looks like they're in the same network range then.

matli3 months ago

Is there any other way to investigate the root cause as I am still not able to get multicast to work. Here a complete set-up overview.

Server 1 interface seems fine:

[object Object]

Server 2 interface seems in the same range:

[object Object]

Both interfaces are multicast enabled ->> UP,BROADCAST,RUNNING,MULTICAST

The corresponding config entry in the traccar config file (server 1 and server 2 both use the same):

[object Object]

Further:

1.) Firewall port 7001 UDP is open (TCP too just for debugging)
2.) Both servers connect to the same mySQL database on a managed mySQL server on AWS

Besides the config in the traccar.xml file, is there any other setting I might be missing? Seems like the current configuration should work but in fact it actually does not appear to perform as it should. Any further hints? Can the log help?

Thanks,
Chris

Anton Tananaev3 months ago

The config looks correct.

matli3 months ago

Hi Anton. Thanks for validating the config. What else may I need to look for?

Anton Tananaev3 months ago

If you don't see any warnings in logs, it means that synchronization messages are sent successfully. Maybe you have some network issues? You can probably use Wireshark or something like that to verify that data is sent and/or received.