New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug : Latest updates from device not reflecting on remote nodes #4882
Comments
Can you please try with this change (95ba344) to see if you actually receive broadcasts. |
Sure, will test and provide updates. Thank you very much |
Are you sure multicast is working on your network? I tried it only locally so far and it worked fine. Maybe you can also try two local instances. |
I did some further digging. I am using Ubuntu 20,04 with 2 interfaces, eth0 is the public interface, and eth1 is the local interface for the private/local network. Do you think Traccar will need to be aware of the interface to broadcast on? Attached is a screenshot of the Broadcast with netcat from Node X and seeing the packet arrive on Node Y using tcpdump. |
I'm not too sure. I thought it should be able to figure it out. And listening should happen on all interfaces. |
My understanding is that applications need to be aware of the interface to listen and broadcast on if there are multiple network interfaces on the node. Found a writeup on Multicast please refer to a section: "Interface selection" on the following link. |
We don't specify it, so I guess OS will select the default. |
I will try to capture some TCP dump data to see if I am able to figure out what is happening when Traccar broadcasts. |
Have you checked logs? Nothing there? |
Yes, Nothing in the logs related to broadcast, nor osmand. |
I guess receiving broadcast is not working for some reason. The code is pretty trivial though, so I'm not sure why it's not working: |
Yes, it should work from what I can understand of the code. Give me some time, I will try to make some changes in the receiving broadcast code and test to see if I can figure out something. |
After a few checks, something after line 157 felt odd, hardcoded a log entry there yet it did not capture it in the log. So I commented the I do not know the exact reason behind this, but was hoping you may be able to shed some light on this.
|
Without |
There was no other change in the build except for the I compiled a new build with only 4 lines of addition as shown in the screenshot, and no other changes. Please correct me, I may be totally wrong, What I notice is that after the |
Yeah, seems like it gets stuck. |
Hello, With the Did some search and found this: https://stackoverflow.com/questions/33946043/java-net-socketexception-not-a-multicast-address
Ran the following command on ubuntu command line:
Tested it and received broadcast, Do you think this is the correct cause and solution? the broadcast address is not the same as the multicast address. |
Broadcast and multicast are different. We use multicast. So does everything work now? |
I think I now get what went wrong, I configured the broadcast address instead of the multicast address in the config file. Although you had mentioned it in the forum to use the multicast address the config key confused me. Sorry about that. Yes it works now. To verify I re-built with the original code and only updated my config file the Thank you very much Anton for the support. I think we can close this issue. |
Thanks for testing it. |
Just FIY the code has been updated and you need to explicitly specify |
Bug Description:
With 2 nodes deployed and 1 device connected to Node X sending data at interval 10 seconds on (OSMand) protocol.
On Node Y The latest position data is not reflected on the web app.
Broadcast/Multicast is working and enabled on all interfaces.
Websocket is open on both Nodes
Node Y receives an empty array every minute
Steps to reproduce the behavior:
Connect Traccar Client to One Server
Check the Second Server web app for updates
Node X:
Node Y:
The text was updated successfully, but these errors were encountered: