I’m seeing this in my syslog after starting syncthing:
Nov 23 10:12:50 vesuvius syncthing-inotify[9167]: [WARNING] Cannot connect to Syncthing: Get http://192.168.200.105:8384/rest/404: dial tcp 192.168.200.105:8384: getsockopt: connection refused
Nov 23 10:12:52 vesuvius syncthing-inotify[9167]: [WARNING] Cannot connect to Syncthing: Get http://192.168.200.105:8384/rest/404: dial tcp 192.168.200.105:8384: getsockopt: connection refused
Nov 23 10:12:53 vesuvius syncthing-inotify[9167]: [WARNING] Cannot connect to Syncthing: Get http://192.168.200.105:8384/rest/404: dial tcp 192.168.200.105:8384: getsockopt: connection refused
Nov 23 10:12:55 vesuvius syncthing-inotify[9167]: [WARNING] Cannot connect to Syncthing: Get http://192.168.200.105:8384/rest/404: dial tcp 192.168.200.105:8384: getsockopt: connection refused
Nov 23 10:13:00 vesuvius syncthing-inotify[9167]: [WARNING] Cannot connect to Syncthing: Get http://192.168.200.105:8384/rest/404: dial tcp 192.168.200.105:8384: getsockopt: connection refused
Some background:
I recently upgraded from Debian wheezy to jessie, after which my init.d startup script stopped working. I decided to remove it and switch to systemd, which I did by following instructions here:
However, the service wouldn’t start without syncthing-inotify, which I had not been using up until now. I installed syncthing-inotify from the apt.syncthing.net repository and removed and enabled and started the systemd service.
Syncthing startup and is running, but I suspect without syncthing-inotify working.
The syncthing-inotify repository also has a systemd service script which I have not set up, since it was not included in the above instructions, and the syncthing system service seems to run syncthing-inotify already.
Looking more closely at the syslog, the errors occur before the API is up and running:
Nov 23 11:37:16 vesuvius syncthing-inotify[12730]: [WARNING] Cannot connect to Syncthing: Get http://192.168.200.105:8384/rest/404: dial tcp 192.168.200.105:8384: getsockopt: connection refused
Nov 23 11:37:25 vesuvius syncthing[12729]: [6PB6Z] INFO: GUI and API listening on 192.168.200.105:8384
Nov 23 11:37:27 vesuvius syncthing-inotify[12730]: [OK] Watching Company_Files: /home/sync/compsync
syncthing-inotify is running, so I think everything is working and that I’m seeing the warnings until it is finally able to connect to syncthing. Is there a way to confirm that syncthing-inotify is working properly?
Changing a file results in the syslog being updated within about 1 second and remote peer has the file synced in about 3 seconds, so it’s definitely working.
Sorry to waste your time. Syncthing is awesome. I’m just an idiot.
FYI:
You should be able to set an after line in the unit selection of the inotify service script.
After=name_of_syncthing_service
This should stop the unnecessary logging.
The startup of syncthing-inotify is faster than the startup of syncthing. So, as the author of that service file crap, I decided to live with these errors…