Product: Synergy 1
Operating system: macOS
If your Mac client was connecting to the server by name and then stopped, and the Synergy log shows this line repeating once a second, the name has stopped resolving on the Mac:
failed to connect to server: unknown error for: my-server:24800
Your router may show the name with an ending such as .lan or .home. The steps below are the same either way.
The name itself is fine and the server is fine. macOS has stopped looking the name up properly. Rebooting the Mac clears it, but the steps below fix it without a reboot and stop it coming back.
Check that this is the problem
Open Terminal (Applications, then Utilities, then Terminal) and run these two commands, replacing my-server with the name you typed into Synergy:
ping my-server host my-server
If ping says it cannot resolve the name but host prints an IP address, this article applies. Your router still knows the name; your Mac is not asking it. If both commands fail, the problem is elsewhere: Basic troubleshooting steps
Fix 1: use the .local name
This is the best fix. It keeps a name that survives your server getting a new IP address, and it uses a different lookup mechanism from the one that has stopped working.
Two things to check first:
- The
.localname is the one the server announces over Bonjour, which can differ from the name you were using. On a Mac server it is the Local hostname under System Settings, General, Sharing. On a Linux server it is the hostname, and Avahi must be running. A Windows server answers for its hostname without any setup. - Both computers must be on the same network segment. A
.localname does not work across subnets or VLANs, and some office networks block it.
If either of those rules you out, go to fix 2.
- On the client, open Synergy.
- In the Server IP address or hostname field, add
.localto the end of the name. For example,my-serverbecomesmy-server.local. If the name already has an ending such as.lan, replace that ending with.local. - Click Apply.
Fix 2: add the server to the hosts file
Use this if the .local name does not work on your network. First give the server a fixed address on your router (usually called a DHCP reservation or static lease), so the entry you add cannot go stale.
- Find the server's IP address. In Synergy on the server, it is shown near the top of the window.
- On the Mac, open Terminal and run
sudo nano /etc/hosts, then enter your password. - Add a line at the end with the server's IP address, a space, and the server's name. For example:
192.168.1.20 my-server - Press Control+O to save, Enter to confirm, then Control+X to exit.
- Restart Synergy on the client.
Fix 3: restart the macOS resolver
This clears the fault right now without a reboot, but it can come back later. Use it on its own if you just need to get going, or together with fix 1 or fix 2.
- Open Terminal and run
sudo killall -HUP mDNSResponder, then enter your password. - Restart Synergy on the client.
Fix 4: use the IP address instead
As a last resort, replace the name in Synergy with the server's IP address. This works, but if the server ever gets a new IP address from your router, you will need to type the new one in.
What does not work
Flushing the DNS cache with dscacheutil -flushcache is the first suggestion you will find elsewhere, but on its own it does not fix this. Skip it.
If none of these help, please get in touch with us and send your log file.