Force-bind Sync to specific network adapter?


David.P

Recommended Posts

Hi forum,

when I installed Sync a few months ago in the office and at home, it would connect instantly and syncing would work perfect.

However, in the meantime Sync has stopped working for unknown reasons. The only ports that were open and still are in the Office are the following: 25 443 5080 5081.

Sync does not connect anymore and does not show Peers as online.

In the office there is also a Wi-Fi network. If I unplug the LAN cable, and thus I am online over Wi-Fi instead of over LAN-cable, then Sync instantly connects and shows all Peers as online.

Therefore the question is, is there a way to bind Sync such that it only connects over the Wi-Fi network adapter?

This used to be possible using ForceBindIP, but it seems that ForceBindIP does not work anymore on Windows 10.

Is there a setting in Sync that makes Sync connect only over a manually specified network adapter?

Thanks for help
David

Link to post
Share on other sites

Thank you for the information.

I have set the respective preference to the Mac address of my Wi-Fi adapter using the syntax 00:80:41:ae:fd:7e

However, Sync still only connects if I unplug the LAN cable first and then start Sync. If afterwards Sync is connected, I can re-plug the LAN cable, and Sync stays connected over WiFi.

So is there something else that can be done in order to make sync directly connect using the Wi-Fi adapter, without having to unplug the LAN cable first?

Additionally, I changed "Connection Port" in the advanced preferences to "5081" (because this is one of the four ports  25, 443, 5080 and 5081 that are open in the Office LAN here).

Should I change this setting back, and if yes, to which port?

Link to post
Share on other sites

We have checked that in the lab, works as expected - Sync (v.2.4.4.) binds on the specified interface. 

So in your case:
1) MAC address is incorrect, try interface name instead.
2) the socket is already in use, port 5081 is being used by another app. Check with "lsof -i :5081" in Terminal. 
You can check the debug log for errors about 'bind' or send the logs to support team for them to analyse. 

Link to post
Share on other sites

sorry, somehow I missed that. 
On Windows that will be "netstat -ano | findstr 5081". See the last column - it's the PID of the process. You can check that PID in task manager. 

 

20 minutes ago, David.P said:

What port would be the default Sync "Connection Port" in the advanced preferences?

You mean Listening port? It's randomized on first run, and then saved in settings and used afterward until manually changed. 

Link to post
Share on other sites
45 minutes ago, Helen said:

sorry, somehow I missed that. 
On Windows that will be "netstat -ano | findstr 5081". See the last column - it's the PID of the process. You can check that PID in task manager.

OK thank you. There, I get:

C:\Windows\system32>netstat -ano | findstr 5081

  TCP    0.0.0.0:5081           0.0.0.0:0              ABHÖREN [LISTEN]         7460

  UDP    0.0.0.0:5081           *:*                                             7460

So it seems that port 5081 is not used, right?

45 minutes ago, Helen said:

You mean Listening port? It's randomized on first run, and then saved in settings and used afterward until manually changed. 

Yes, Listening port. Should I leave that at port 5081 (this is one of the only four ports 25, 443, 5080, 5081 that are open here at the office LAN).

Link to post
Share on other sites
2 hours ago, David.P said:

So it seems that port 5081 is not used, right?

On the contrary - it's used by a process with PID 7460.  See the last column - it's the PID of the process. You can check that PID in task manager. 

>Should I leave that at port 5081
If that port is not used by any other app on the PC you can leave it for Sync. 

Link to post
Share on other sites
35 minutes ago, Helen said:

On the contrary - it's used by a process with PID 7460.  See the last column - it's the PID of the process. You can check that PID in task manager.

Ahh I see...

Thank you. The process with PID 7460 using the open port 5081 actually is...

...Sync!

35 minutes ago, Helen said:

On the contrary - it's used by a process with PID 7460.  See the last column - it's the PID of the process. You can check that PID in task manager. 

>Should I leave that at port 5081
If that port is not used by any other app on the PC you can leave it for Sync. 

OK I'll leave it there.

BTW, it syncs now via WiFi. For some reason, it seems that the MAC address that I set it to had not been saved in the settings.

I'll report if it continues to work after a reboot.

Link to post
Share on other sites

OK it seems to work now. However, Sync does not save the

  • Sync Prefs -> advanced -> power_user option "bind_interface" -> 00:80:41:ae:fd:7e (example)

...setting. After a reboot, the setting is always set back to default (i.e., no interface binding)!

 

Link to post
Share on other sites
  • 4 weeks later...

The setting seems to remain if I just relaunch Sync. But not always. I just had to change the adapter bind setting three times until it was saved.

Also, the setting had remained active for a couple of weeks. However, today suddenly I had no connection anymore and sure enough, the setting was gone (i.e. reset to default).

Link to post
Share on other sites
  • 4 months later...

After weeks of working perfectly, I found that I had no connection today. Sure enough, that bind_interface setting had been gone again. Additionally, when starting sync (via Windows Start Menu), I was asked for a user name as if I had never previously set up and used Sync.

So why is it that Sync can't just save and keep its settings? It is hard enough to set up anyway, but it is a nuisance having to do it over and over.

Link to post
Share on other sites

Apparently cause Sync did not quit correctly, or the settings were deleted, or they got corrupt, or Sync was reinstalled, or launched with a new storage, or if it's a service, Log On account was changed and thus new storage was used, or disk sector got damaged, etc. A number of reasons. 

 

On 1/13/2017 at 1:38 PM, Helen said:

So if you notice it, just send the logs to support.

Can you please do that? Thanks. 

Link to post
Share on other sites
  • 4 months later...

Hi,

the problem has unfortunately reappeared. Sync is not connecting via the WiFi adapter MAC address as set in the adapter bind setting.

This is the adapter:

Quote

Wireless LAN Adapter WLAN 3:

   Connection-specific DNS suffix: [our.domain] .de
   Description. . . . . . . . . . . : Broadcom 802.11ac Network Adapter
   Physical address. . . . . . . . : 1C-87-2C-XY-ED-71
   DHCP enabled. . . . . . . . . . : Yes
   Autoconfiguration enabled. . . : Yes
   Connection location IPv6 address. : xxxx :: xxxx: xxxx: xxxx: xxxx% xx (Preferred)
   IPv4 address. . . . . . . . . . : xxx.xx.xx.xx (Preferred)
   Subnet mask. . . . . . . . . . : 255.255.255.0
   Lease. . . . . . . . . . : Thursday. October 19. 2017 09:12:24
   Lease runs off. . . . . . . . . . : Thursday. October 19. 2017 21:34:38
   Standard gateway. . . . . . . . . : xxx.xx.xx.xx
   DHCP server. . . . . . . . . . . : xxx.xx.xx.xx
   DHCPv6-IAID. . . . . . . . . . . : 123456789
   DNS server. . . . . . . . . . . : xxx.xx.xx.xx
   NetBIOS over TCP / IP. . . . . . . : Activated

I am hesitant to send the entire log file because it contains lots of private data like file names and real names etc.

The bind interface setting is active and set to 1c:87:2c:XY:ed:71

In the log, I can find things like this:

Quote

[2017-10-17 19:55:15.151] API: <-- getmfdevices({ "status": 200, "value": [ { "defaultsynclevel": 1, "devicename": "", "devicetype": 2, "folders": [ { "added": true, "id": 5266150207677955083, "mode": 2 } ], "freespace": 181000000000, "id": "CDF2QZAKG4MOXJOTBJEAMWK3F43MK7XF", "ipaddress": "xxx.xxx.xxx.xxx:x", "lastseen": 0, "lastsynccompleted": 0, "macaddress": "90:2b:34:39:eb:54", "name": "BLUR-PC", "online": true, "self": true, "syncerr": 0, "syncerrmsg": "", "syncversion": "2.5.9", "totalspace": 255549566976, "usedbysync": 33800000000, "userid": "" }, { "defaultsynclevel": 1, "devicename": "", "devicetype": 2, "folders": [ { "added": true, "id": 5266150207677955083, "mode": 2 } ], "freespace": 170000000000, "id": "CCJO2XUU6I2VF5KTAAEVE7RBXHOYKMFW", "ipaddress": "xxx.xxx.xxx.xxx:x", "lastseen": 0, "lastsynccompleted": 0, "macaddress": "1c:87:2c:XY:ed:71", "name": "BLUR -PC", "online": false, "self": false, "syncerr": 0, "syncerrmsg": "", "syncversion": "2.5.9", "totalspace": 249563361280, "usedbysync": 33300000000, "userid": "" }, { "defaultsynclevel": 1, "devicename": "", "devicetype": 2, "folders": [ { "added": true, "id": 5266150207677955083, "mode": 2 } ], "freespace": 189000000000, "id": "CDVRCEEDKY2HKRCO6RLQWHERRNC67S6R", "ipaddress": "xxx.xxx.xxx.xxx:x", "lastseen": 0, "lastsynccompleted": 0, "macaddress": "f4:6d:04:61:7b:6b", "name": "BLUR-PC", "online": false, "self": false, "syncerr": 0, "syncerrmsg": "", "syncversion": "2.5.6", "totalspace": 250058108928, "usedbysync": 33300000000, "userid": "" } ] })

...or this:

Quote

[2017-10-17 19:54:39.680] API: <-- getstatuses({ "status": 200, "value": { "corestate": [ { "error": 11, "message": "There's no connection to tracker" } ], "loading": false, "speed": { "downspeed": 0, "upspeed": 0 } } })

[2017-10-17 22:41:51.916] Can't bind connecting socket 3248 to IP xxx.xxx.xxx.xxx:x - 0 No error

[2017-10-17 19:54:50.425] D! class TrackerTcpConn::TcpSocket::set_error[0x00000232fd51c500][-1] 10060 (offline (timed out))
[2017-10-17 19:54:50.425] Closing TCP tracker connection to 209.95.56.60:4000 - error 10060 (offline (timed out))
[2017-10-17 19:54:52.427] D! class TrackerTcpConn::TcpSocket::set_error[0x00000232fd51c2b0][-1] 3 (Das System kann den angegebenen Pfad nicht finden. )

Please advise what I could do, or what else you'd need from the log file.

Thank you.

[Above, I have crossed out some private data like IP addresses and names]

 

Link to post
Share on other sites

1) As user guide says:
The value is operating system-dependent. Correct syntax for MAC addresses is using lower case and colons: b8:27:eb:d2:00:3c

2) these log extracts don't show that "Sync is not connecting via the WiFi adapter".  I can only see that it cannot connect to tracker. 
Sorry, there's no such single log line that will tell you or me all the truth about the problem. This requires overall log analysis. Once you don't want to send the logs to support, check these yourself:
check that setting is saved (search for { "default_value": "", "name": "bind_interface", "type": "string", "value": "" } in the log), see which socket Sync actually binds to ( I can only see that it wasn't able to bind to some xxx.xxx.xxx.xxx:x , it tell me nothing) , see which socket traffic goes through, etc etc etc., what not...

use some network tools, like netstat, tcpdump, route print, etc

Link to post
Share on other sites

Thank you. I think I will edit clear names in the logfile then, and send it to you.

What else should I edit in the logfiles before sending them?

You can't connect to my sync devices using the logfile, can you?

Btw, I have used the correct syntax for MAC addresses in the Sync settings. I have only inserted "XY" into the MAC address above because I am not sure whether I could be located with the original MAC address.

Link to post
Share on other sites

- What else should I edit in the logfiles before sending them?
- try to hide as little as you can afford. Especially IP addresses - these are vital when debugging network. You can hide filenames.

- You can't connect to my sync devices using the logfile, can you?
- we can't! 

-I have used the correct syntax for MAC addresses in the Sync settings. 
- before sending the logs, open the window with power user settings again so that it's recorded to log for sure. 

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.