Beginning my day I noted that, for no apparent reason, syncthing suddenly stopped working on 1 of the 4 devices I use. I tried uninstalling and reinstalling without benefit. Please advise.
journalctl -eu syncthing@mel
will have more information as to why syncthing exits after startup. The systemctl status
output only shows the last few journal log lines, which in this case is too little to see the reason for the failed status.
Sep 03 07:22:25 Schmetterling systemd[1]: Started Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:22:25 Schmetterling syncthing[40237]: [start] INFO: syncthing v1.18.0-ds1 "Fermium Flea" (go1.18.1 linux-amd64) debian@debian 2023-05-03 08:38:45 UTC
Sep 03 07:22:25 Schmetterling syncthing[40237]: [start] WARNING: Error opening database: resource temporarily unavailable (is another instance of Syncthing running?)
Sep 03 07:22:25 Schmetterling systemd[1]: syncthing@mel.service: Main process exited, code=exited, status=1/FAILURE
Sep 03 07:22:25 Schmetterling systemd[1]: syncthing@mel.service: Failed with result 'exit-code'.
Sep 03 07:22:26 Schmetterling systemd[1]: syncthing@mel.service: Scheduled restart job, restart counter is at 1.
Sep 03 07:22:26 Schmetterling systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:22:26 Schmetterling systemd[1]: Started Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:22:26 Schmetterling syncthing[40254]: [start] INFO: syncthing v1.18.0-ds1 "Fermium Flea" (go1.18.1 linux-amd64) debian@debian 2023-05-03 08:38:45 UTC
Sep 03 07:22:26 Schmetterling syncthing[40254]: [start] WARNING: Error opening database: resource temporarily unavailable (is another instance of Syncthing running?)
Sep 03 07:22:26 Schmetterling systemd[1]: syncthing@mel.service: Main process exited, code=exited, status=1/FAILURE
Sep 03 07:22:26 Schmetterling systemd[1]: syncthing@mel.service: Failed with result 'exit-code'.
Sep 03 07:22:27 Schmetterling systemd[1]: syncthing@mel.service: Scheduled restart job, restart counter is at 2.
Sep 03 07:22:27 Schmetterling systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:22:27 Schmetterling systemd[1]: Started Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:22:27 Schmetterling syncthing[40270]: [start] INFO: syncthing v1.18.0-ds1 "Fermium Flea" (go1.18.1 linux-amd64) debian@debian 2023-05-03 08:38:45 UTC
Sep 03 07:22:27 Schmetterling syncthing[40270]: [start] WARNING: Error opening database: resource temporarily unavailable (is another instance of Syncthing running?)
Sep 03 07:22:27 Schmetterling systemd[1]: syncthing@mel.service: Main process exited, code=exited, status=1/FAILURE
Sep 03 07:22:27 Schmetterling systemd[1]: syncthing@mel.service: Failed with result 'exit-code'.
Sep 03 07:22:29 Schmetterling systemd[1]: syncthing@mel.service: Scheduled restart job, restart counter is at 3.
Sep 03 07:22:29 Schmetterling systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:22:29 Schmetterling systemd[1]: Started Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:22:29 Schmetterling syncthing[40288]: [start] INFO: syncthing v1.18.0-ds1 "Fermium Flea" (go1.18.1 linux-amd64) debian@debian 2023-05-03 08:38:45 UTC
Sep 03 07:22:29 Schmetterling syncthing[40288]: [start] WARNING: Error opening database: resource temporarily unavailable (is another instance of Syncthing running?)
Sep 03 07:22:29 Schmetterling systemd[1]: syncthing@mel.service: Main process exited, code=exited, status=1/FAILURE
Sep 03 07:22:29 Schmetterling systemd[1]: syncthing@mel.service: Failed with result 'exit-code'.
Sep 03 07:22:30 Schmetterling systemd[1]: syncthing@mel.service: Scheduled restart job, restart counter is at 4.
Sep 03 07:22:30 Schmetterling systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:22:30 Schmetterling systemd[1]: syncthing@mel.service: Start request repeated too quickly.
Sep 03 07:22:30 Schmetterling systemd[1]: syncthing@mel.service: Failed with result 'exit-code'.
Sep 03 07:22:30 Schmetterling systemd[1]: Failed to start Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:26:44 Schmetterling systemd[1]: Started Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:26:45 Schmetterling syncthing[41827]: [start] INFO: syncthing v1.18.0-ds1 "Fermium Flea" (go1.18.1 linux-amd64) debian@debian 2023-05-03 08:38:45 UTC
Sep 03 07:26:45 Schmetterling syncthing[41827]: [start] WARNING: Error opening database: resource temporarily unavailable (is another instance of Syncthing running?)
Sep 03 07:26:45 Schmetterling systemd[1]: syncthing@mel.service: Main process exited, code=exited, status=1/FAILURE
Sep 03 07:26:45 Schmetterling systemd[1]: syncthing@mel.service: Failed with result 'exit-code'.
Sep 03 07:26:46 Schmetterling systemd[1]: syncthing@mel.service: Scheduled restart job, restart counter is at 1.
Sep 03 07:26:46 Schmetterling systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:26:46 Schmetterling systemd[1]: Started Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:26:46 Schmetterling syncthing[41846]: [start] INFO: syncthing v1.18.0-ds1 "Fermium Flea" (go1.18.1 linux-amd64) debian@debian 2023-05-03 08:38:45 UTC
Sep 03 07:26:46 Schmetterling syncthing[41846]: [start] WARNING: Error opening database: resource temporarily unavailable (is another instance of Syncthing running?)
Sep 03 07:26:46 Schmetterling systemd[1]: syncthing@mel.service: Main process exited, code=exited, status=1/FAILURE
Sep 03 07:26:46 Schmetterling systemd[1]: syncthing@mel.service: Failed with result 'exit-code'.
Sep 03 07:26:47 Schmetterling systemd[1]: syncthing@mel.service: Scheduled restart job, restart counter is at 2.
Sep 03 07:26:47 Schmetterling systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:26:47 Schmetterling systemd[1]: Started Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:26:47 Schmetterling syncthing[41863]: [start] INFO: syncthing v1.18.0-ds1 "Fermium Flea" (go1.18.1 linux-amd64) debian@debian 2023-05-03 08:38:45 UTC
Sep 03 07:26:47 Schmetterling syncthing[41863]: [start] WARNING: Error opening database: resource temporarily unavailable (is another instance of Syncthing running?)
Sep 03 07:26:47 Schmetterling systemd[1]: syncthing@mel.service: Main process exited, code=exited, status=1/FAILURE
Sep 03 07:26:47 Schmetterling systemd[1]: syncthing@mel.service: Failed with result 'exit-code'.
Sep 03 07:26:48 Schmetterling systemd[1]: syncthing@mel.service: Scheduled restart job, restart counter is at 3.
Sep 03 07:26:48 Schmetterling systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:26:48 Schmetterling systemd[1]: Started Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:26:48 Schmetterling syncthing[41879]: [start] INFO: syncthing v1.18.0-ds1 "Fermium Flea" (go1.18.1 linux-amd64) debian@debian 2023-05-03 08:38:45 UTC
Sep 03 07:26:48 Schmetterling syncthing[41879]: [start] WARNING: Error opening database: resource temporarily unavailable (is another instance of Syncthing running?)
Sep 03 07:26:48 Schmetterling systemd[1]: syncthing@mel.service: Main process exited, code=exited, status=1/FAILURE
Sep 03 07:26:48 Schmetterling systemd[1]: syncthing@mel.service: Failed with result 'exit-code'.
Sep 03 07:26:49 Schmetterling systemd[1]: syncthing@mel.service: Scheduled restart job, restart counter is at 4.
Sep 03 07:26:49 Schmetterling systemd[1]: Stopped Syncthing - Open Source Continuous File Synchronization for mel.
Sep 03 07:26:49 Schmetterling systemd[1]: syncthing@mel.service: Start request repeated too quickly.
Sep 03 07:26:49 Schmetterling systemd[1]: syncthing@mel.service: Failed with result 'exit-code'.
Sep 03 07:26:49 Schmetterling systemd[1]: Failed to start Syncthing - Open Source Continuous File Synchronization for mel.
- This version of syncthing is a bit dated (it looks like the Debian-packaged version. It’s generally fine to run that if all your devices are on that version, but it isn’t recommended to mix that version with a recent install).
- Syncthing exits because it can’t open its database. Possibly another syncthing instance is running with that DB.
You can check the list of running syncthing processes with
ps aux | grep 'syncthing'
Just a wild guess, but possibly you’re trying to run syncthing as both a user and system service and now they’re conflicting?
If I am running Syncthing as both a user and system service I do not know that I am, nor do I know how I would do so. Here is the output of the running syncthing processes:
This is the same before and after I run the command:systemctl stop syncthing@mel.service
So, ps
confirms that you’re indeed running syncthing already, but with --logfile=default
, which doesn’t look like syncthing’s usual systemd services.
You could try rebooting to see if the rogue syncthing process restarts (which would indicate that you’ve set another syncthing instance to autostart somewhere), or if it doesn’t, maybe it was some one-off weirdness.
I will try this and get back. But just want to say how appreciative I am that you are there to help and so promptly. Syncthing is a really valuable and important software, but without such support it would not be.
Upon rebooting the computer the situation remains the same.
ps aux | grep 'syncthing'
also shows the same result, so there appears to be a “rogue”. I am not sure what to do now. Please advise.
Can you access this rogue syncthing’s UI? https://localhost:8384/ will get you there.
Yes. I am there.
If Syncthing’s UI is working and your folders, neighbors and local state work right, then I’m agreeing with Nummer378 – you tried to start Syncthing when it was already running, so it exited because it couldn’t open its database.
This is a great problem to have, because there’s nothing to fix :-).
I’m not smart enough with Debian to have an OS-specific opinion, but in general I’m in favor of running the current release version of Syncthing.
If there is nothing to fix then why am I not seeing the other devices with which it was and should be syncing?
What does the GUI show when you visit the above URL? Are there remote devices configured, or are there none?
This indicates that this syncthing instance is using a default/unconfigured config, but apparently locks the same database your other syncthing instance is using. At this point I’m also at a loss as to what’s going on.
I suppose I could clean out all versions and reinstall, but this was the introducer machine of the collection. Would I make the new install an introducer and re-connect all the other 3 devices?
I found 2 config files in my .config/syncthing folder: config.xml and config.xml.v0. They differ in this way:
Does this help? Did a new config file get installed when I reinstalled?
That definitely does not fit “…your folders, neighbors, and local state work right…”. Agreed with @Nummer378 that this Syncthing instance has your database but not your config.
I would first try to figure that out – it’s likely a function of your Syncthing command line switches or with the directory you’re starting Syncthing in. Look for every copy of “config.xml” on your system, confirm which ones of them belong to Syncthing (other software may create files named “config.xml”), stop Syncthing and get rid of the wrong one. Make sure that Syncthing is pointed to the right one when you start it again.
I think there’s another config.xml out there.
Those ps entries look like the desktop file. Looks like you or your packager enabled syncthing to autostart through the desktop environment. Check out your system settings for something related to autostart (in KDE/plasma it is literally autostart). If you can’t find such a menu, check ~/.config/autostart. If that doesn’t yield anything, you could also look at what process spawned syncthing with ps auxf | less
, which gives you a tree-like structure, and finding it’s parent.