Android and Mac on local network only connect by relay

Devices are:

  • macOS 13.5.2 running Syncthing v1.23.2, at 192.168.1.8
  • Android 13 running Syncthing v1.23.7, at 192.168.1.15
  • Spectrum WiFi 6 Router (sax1v1s)

Both devices are connected to the router (on the same subnet). I opened port 22000 on the router, but the devices insist on using relays to transfer data. I tried manually adding “listen addresses” in both directions, and hard-coding IP addresses into the device configurations, with no luck. Here is a sample from the log on the mac (edited for brevity and privacy):

2023-09-17 12:00:03 ...
2023-09-17 12:00:03 Listen (BEP/tcp): listen tcp 192.168.1.15:22000: bind: can't assign requested address
2023-09-17 12:00:03 listenerSupervisor@tcp://192.168.1.15:22000: service tcp://192.168.1.15:22000 failed: listen tcp 192.168.1.15:22000: bind: can't assign requested address
2023-09-17 12:00:03 Listen (BEP/tcp): listen tcp 192.168.1.15:22000: bind: can't assign requested address
2023-09-17 12:00:03 listenerSupervisor@tcp://192.168.1.15:22000: service tcp://192.168.1.15:22000 failed: listen tcp 192.168.1.15:22000: bind: can't assign requested address
2023-09-17 12:00:03 Listen (BEP/tcp): listen tcp 192.168.1.15:22000: bind: can't assign requested address
2023-09-17 12:00:03 listenerSupervisor@tcp://192.168.1.15:22000: service tcp://192.168.1.15:22000 failed: listen tcp 192.168.1.15:22000: bind: can't assign requested address
2023-09-17 12:00:03 Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
2023-09-17 12:00:03 TCP listener ([::]:22000) starting
2023-09-17 12:00:03 QUIC listener ([::]:22000) starting
2023-09-17 12:00:03 My name is "redacted.local"
2023-09-17 12:00:03 Device REDACTED is "Pixel 4a" at [tcp://192.168.1.15:22000 dynamic]
2023-09-17 12:00:03 Ready to synchronize "Pixel 4a transfer" (redacted) (receiveonly)
2023-09-17 12:00:03 Completed initial scan of receiveonly folder "Pixel 4a transfer" (redacted)
2023-09-17 12:00:13 quic://0.0.0.0:22000 detected NAT type: Symmetric NAT
2023-09-17 12:00:19 Established secure connection to REDACTED at 192.168.1.8:51244-199.195.251.28:22067/relay-client/TLS1.3-TLS_AES_128_GCM_SHA256
2023-09-17 12:00:19 Device REDACTED client is "syncthing v1.23.7" named "Pixel 4a" at 192.168.1.8:51244-199.195.251.28:22067/relay-client/TLS1.3-TLS_AES_128_GCM_SHA256
2023-09-17 12:00:20 Detected 1 NAT service
2023-09-17 12:00:58 Joined relay relay://66.198.70.78:443
2023-09-17 12:01:14 Listen (BEP/tcp): listen tcp 192.168.1.15:22000: bind: can't assign requested address
2023-09-17 12:01:14 listenerSupervisor@tcp://192.168.1.15:22000: service tcp://192.168.1.15:22000 failed: listen tcp 192.168.1.15:22000: bind: can't assign requested address

The thing that obviously jumps out to me here is listen tcp 192.168.1.15:22000: bind: can't assign requested address – but I don’t know how to interpret it.

Have the logs been taken with the default settings or after doing these tweaks? If the latter, then I’d recommend to try bringing back everything to the default and then taking the logs again just to have an overview on what the situation looks like in a clean installation.

This applies to all devices. Especially on Android, you must not disable global discovery as local discovery is still broken there (the fix has landed in the code very recently but has not been released yet).

You’ve inadvertently set the listen address on your mac to the address of your phone. That won’t work. Revert the listening addresses to default.

Thanks for your replies. I reset the listen addresses back to just “default” and device addresses to just “dynamic”. However, the devices are still only connecting to each other by relay:

2023-09-17 12:45:15 Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
2023-09-17 12:45:15 Using discovery mechanism: global discovery server https://discovery.syncthing.net/v2/?noannounce&id=REDACTED
2023-09-17 12:45:15 Using discovery mechanism: global discovery server https://discovery-v4.syncthing.net/v2/?nolookup&id=REDACTED
2023-09-17 12:45:15 Using discovery mechanism: global discovery server https://discovery-v6.syncthing.net/v2/?nolookup&id=REDACTED
2023-09-17 12:45:15 Using discovery mechanism: IPv4 local broadcast discovery on port 21027
2023-09-17 12:45:15 Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027
2023-09-17 12:45:15 ...
2023-09-17 12:45:15 Ready to synchronize "Default Folder" (default) (sendreceive)
2023-09-17 12:45:15 TCP listener ([::]:22000) starting
2023-09-17 12:45:15 QUIC listener ([::]:22000) starting
2023-09-17 12:45:15 Completed initial scan of sendreceive folder "Default Folder" (default)
2023-09-17 12:45:15 GUI and API listening on 127.0.0.1:8384
2023-09-17 12:45:15 Access the GUI via the following URL: http://127.0.0.1:8384/
2023-09-17 12:45:15 My name is "mbpro.local"
2023-09-17 12:45:15 Device ANDROID_REDACTED is "Pixel 4a" at [dynamic]
2023-09-17 12:45:15 Ready to synchronize "Pixel 4a transfer" (redacted) (receiveonly)
2023-09-17 12:45:15 Completed initial scan of receiveonly folder "Pixel 4a transfer" (redacted)
2023-09-17 12:45:21 Established secure connection to ANDROID_REDACTED at 192.168.1.8:51937-66.198.164.254:443/relay-client/TLS1.3-TLS_AES_128_GCM_SHA256
2023-09-17 12:45:21 Device ANDROID_REDACTED client is "syncthing v1.23.7" named "Pixel 4a" at 192.168.1.8:51937-66.198.164.254:443/relay-client/TLS1.3-TLS_AES_128_GCM_SHA256
2023-09-17 12:45:31 Detected 1 NAT service
2023-09-17 12:45:34 quic://0.0.0.0:22000 detected NAT type: Port restricted NAT
2023-09-17 12:45:34 quic://0.0.0.0:22000 resolved external address quic://74.70.78.84:1024 (via stun.syncthing.net:3478)
2023-09-17 12:46:10 Joined relay relay://5.161.229.93:22067

– that’s the log from my mac. You can see it connected to the phone via relay (66.198.164.254).

If your Mac is also connected to the router via Wi-Fi, check the router settings to see if it’s restricting direct connections between wireless devices. The setting might have the label “isolation”, “privacy”, or something related as such. A lot of routers include the feature as an extra level of security.

If the router isn’t restricting connections between wireless devices, then the next likely cause is a firewall on the Mac (with global discovery enabled on the Android side, it would have picked up the Mac’s IP address).

The router may be doing this, but there’s no setting to disable it. The router, provided by my ISP, has an extremely limited admin interface:

Those are the “advanced” settings!

According to my mac’s System Preferences app, firewall is disabled.

What about the Android side? Can you post a screenshot from the Syncthing Web GUI there, specifically the part under “This Device”? You can access the Web GUI from the left slide-out menu in the Syncthing app.

Great, so it’s pretty much down to the router unless you’ve got some unusual Android network settings.

What options are available under the “Spectrum Mobile Access Point” section?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.