sync regularly fails with temp files

It shows Syncthing being told to shut down immediately after being started, without any indication why. The only code path I found that causes Syncthing to shut down without logging is if the child process gets a signal. Unfortunately we don’t have debug logging to check that.

How do you start Syncthing (service manager or something)? Check their logs to see if it stops/restarts Syncthing. And/or check general system logs for anything weird while Syncthing is restarting.

Thanks so much!

I am using systemd following docs.syncthing. net/users/autostart.html#linux and running syncthing as a user service. OK, maybe better to do as system service, but that is not it (it was all working until recently)

sorry lots of logs, first systemd and then syslog

systemd just reports

Jan 31 09:59:41 Siggi systemd[370]: syncthing.service: Main process exited, code=exited, status=1/FAILURE Jan 31 09:59:41 Siggi systemd[370]: syncthing.service: Failed with result ‘exit-code’.

and it cycles like

Jan 31 09:58:28 Siggi syncthing[32733]: [MFCUD] 2021/01/31 09:58:28 INFO: Hashing performance is 286.17 MB/s
Jan 31 09:58:28 Siggi syncthing[32733]: [MFCUD] 2021/01/31 09:58:28 WARNING: Database schema: database is closed
Jan 31 09:58:28 Siggi systemd[32721]: syncthing.service: Main process exited, code=exited, status=1/FAILURE
Jan 31 09:58:28 Siggi systemd[32721]: syncthing.service: Failed with result 'exit-code'.
Jan 31 09:58:28 Siggi systemd[32721]: Stopped Syncthing - Open Source Continuous File Synchronization.
Jan 31 09:59:40 Siggi systemd[370]: Started Syncthing - Open Source Continuous File Synchronization.
Jan 31 09:59:40 Siggi syncthing[382]: [monitor] 2021/01/31 09:59:40 INFO: Log output saved to file "/home/jond/syncthing.txt"
Jan 31 09:59:40 Siggi syncthing[382]: [start] 2021/01/31 09:59:40 INFO: syncthing v1.12.1 "Fermium Flea" (go1.15.6 linux-amd64) deb@build . 
syncthing . net 2020-12-06 12:46:27 UTC [noupgrade]
Jan 31 09:59:40 Siggi syncthing[382]: [MFCUD] 2021/01/31 09:59:40 INFO: My ID: MFCUDRN-4NYRKDN-S7RFTCN-UWSY3PO-7YXDFOT-7CRGLB6-HDZFG3O-LKT3JQB
Jan 31 09:59:41 Siggi systemd[370]: Stopping Syncthing - Open Source Continuous File Synchronization...
Jan 31 09:59:41 Siggi syncthing[382]: [monitor] 2021/01/31 09:59:41 INFO: Signal 15 received; exiting
Jan 31 09:59:41 Siggi syncthing[382]: [MFCUD] 2021/01/31 09:59:41 INFO: Exiting
Jan 31 09:59:41 Siggi syncthing[382]: [MFCUD] 2021/01/31 09:59:41 INFO: Single thread SHA256 performance is 379 MB/s using minio/sha256-simd (266 MB/s using crypto/sha256).
Jan 31 09:59:41 Siggi syncthing[382]: [MFCUD] 2021/01/31 09:59:41 INFO: Hashing performance is 320.74 MB/s
Jan 31 09:59:41 Siggi syncthing[382]: [MFCUD] 2021/01/31 09:59:41 WARNING: Database schema: database is closed
Jan 31 09:59:41 Siggi systemd[370]: syncthing.service: Main process exited, code=exited, status=1/FAILURE
Jan 31 09:59:41 Siggi systemd[370]: syncthing.service: Failed with result 'exit-code'.
Jan 31 09:59:41 Siggi systemd[370]: Stopped Syncthing - Open Source Continuous File Synchronization.

and syslog

2964 Jan 31 09:58:28 Siggi syncthing[32733]: [MFCUD] 2021/01/31 09:58:28 INFO: Exiting
2965 Jan 31 09:58:28 Siggi systemd[32721]: Stopping Syncthing - Open Source Continuous File Synchronization...
2966 Jan 31 09:58:28 Siggi syncthing[32733]: [MFCUD] 2021/01/31 09:58:28 INFO: Single thread SHA256 performance is 276 MB/s using crypto/sha256 (263 MB/s using minio/sha256-simd).
2967 Jan 31 09:58:28 Siggi syncthing[32733]: [MFCUD] 2021/01/31 09:58:28 INFO: Hashing performance is 286.17 MB/s
2968 Jan 31 09:58:28 Siggi syncthing[32733]: [MFCUD] 2021/01/31 09:58:28 WARNING: Database schema: database is closed
2969 Jan 31 09:58:28 Siggi systemd[32721]: syncthing.service: Main process exited, code=exited, status=1/FAILURE
2970 Jan 31 09:58:28 Siggi systemd[32721]: syncthing.service: Failed with result 'exit-code'.
2971 Jan 31 09:58:28 Siggi systemd[32721]: Stopped Syncthing - Open Source Continuous File Synchronization.
2972 Jan 31 09:58:28 Siggi systemd[32721]: Stopped target Basic System.
2973 Jan 31 09:58:28 Siggi systemd[32721]: Stopped target Paths.
2974 Jan 31 09:58:28 Siggi systemd[32721]: Stopped target Sockets.
2975 Jan 31 09:58:28 Siggi systemd[32721]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
2976 Jan 31 09:58:28 Siggi systemd[32721]: Closed GnuPG network certificate management daemon.
2977 Jan 31 09:58:28 Siggi systemd[32721]: Closed GnuPG cryptographic agent (ssh-agent emulation).
2978 Jan 31 09:58:28 Siggi systemd[32721]: Closed REST API socket for snapd user session agent.
2979 Jan 31 09:58:28 Siggi systemd[32721]: Closed D-Bus User Message Bus Socket.
2980 Jan 31 09:58:28 Siggi systemd[32721]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
2981 Jan 31 09:58:28 Siggi systemd[32721]: Closed GnuPG cryptographic agent and passphrase cache.
2982 Jan 31 09:58:28 Siggi systemd[32721]: Reached target Shutdown.
2983 Jan 31 09:58:28 Siggi systemd[32721]: Starting Exit the Session...
2984 Jan 31 09:58:28 Siggi systemd[32721]: Stopped target Timers.
2985 Jan 31 09:58:28 Siggi systemd[32721]: Received SIGRTMIN+24 from PID 366 (kill).
2986 Jan 31 09:58:28 Siggi systemd[1]: Stopped User Manager for UID 1001.
2987 Jan 31 09:58:28 Siggi systemd[1]: Removed slice User Slice of jond.
2988 Jan 31 09:59:40 Siggi systemd[1]: Created slice User Slice of jond.
2989 Jan 31 09:59:40 Siggi systemd[1]: Starting User Manager for UID 1001...
2990 Jan 31 09:59:40 Siggi systemd[1]: Started Session 1906 of user jond.
2991 Jan 31 09:59:40 Siggi systemd[370]: Reached target Timers.
2992 Jan 31 09:59:40 Siggi systemd[370]: Listening on REST API socket for snapd user session agent.
2993 Jan 31 09:59:40 Siggi systemd[370]: Listening on GnuPG cryptographic agent and passphrase cache.
2994 Jan 31 09:59:40 Siggi systemd[370]: Reached target Paths.
2995 Jan 31 09:59:40 Siggi systemd[370]: Listening on GnuPG network certificate management daemon.
2996 Jan 31 09:59:40 Siggi systemd[370]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
2997 Jan 31 09:59:40 Siggi systemd[370]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
2998 Jan 31 09:59:40 Siggi systemd[370]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
2999 Jan 31 09:59:40 Siggi systemd[370]: Starting D-Bus User Message Bus Socket.
3000 Jan 31 09:59:40 Siggi systemd[370]: Listening on D-Bus User Message Bus Socket.
3001 Jan 31 09:59:40 Siggi systemd[370]: Reached target Sockets.
3002 Jan 31 09:59:40 Siggi systemd[370]: Reached target Basic System.
3003 Jan 31 09:59:40 Siggi systemd[1]: Started User Manager for UID 1001.
3004 Jan 31 09:59:40 Siggi systemd[370]: Started Syncthing - Open Source Continuous File Synchronization.
3005 Jan 31 09:59:40 Siggi systemd[370]: Reached target Default.
3006 Jan 31 09:59:40 Siggi systemd[370]: Startup finished in 36ms.
3007 Jan 31 09:59:40 Siggi syncthing[382]: [monitor] 2021/01/31 09:59:40 INFO: Log output saved to file "/home/jond/syncthing.txt"
3008 Jan 31 09:59:40 Siggi syncthing[382]: [start] 2021/01/31 09:59:40 INFO: syncthing v1.12.1 "Fermium Flea" (go1.15.6 linux-amd64) deb@ build. syncthing.  net 2020-12-06 12:46:27 UTC [noupgrade]
3009 Jan 31 09:59:40 Siggi syncthing[382]: [MFCUD] 2021/01/31 09:59:40 INFO: My ID: MFCUDRN-4NYRKDN-S7RFTCN-UWSY3PO-7YXDFOT-7CRGLB6-HDZFG3O-LKT3JQB
3010 Jan 31 09:59:41 Siggi systemd[1]: Stopping User Manager for UID 1001...
3011 Jan 31 09:59:41 Siggi systemd[370]: Stopped target Default.
3012 Jan 31 09:59:41 Siggi systemd[370]: Stopping Syncthing - Open Source Continuous File Synchronization...
3013 Jan 31 09:59:41 Siggi syncthing[382]: [monitor] 2021/01/31 09:59:41 INFO: Signal 15 received; exiting
3014 Jan 31 09:59:41 Siggi syncthing[382]: [MFCUD] 2021/01/31 09:59:41 INFO: Exiting
3015 Jan 31 09:59:41 Siggi syncthing[382]: [MFCUD] 2021/01/31 09:59:41 INFO: Single thread SHA256 performance is 379 MB/s using minio/sha256-simd (266 MB/s using crypto/sha256).
3016 Jan 31 09:59:41 Siggi syncthing[382]: [MFCUD] 2021/01/31 09:59:41 INFO: Hashing performance is 320.74 MB/s
3017 Jan 31 09:59:41 Siggi syncthing[382]: [MFCUD] 2021/01/31 09:59:41 WARNING: Database schema: database is closed
3018 Jan 31 09:59:41 Siggi systemd[370]: syncthing.service: Main process exited, code=exited, status=1/FAILURE
3019 Jan 31 09:59:41 Siggi systemd[370]: syncthing.service: Failed with result 'exit-code'.

The log shows user sessions (logins) being started and stopped, and syncthing being started/stopped as part of that, as expected when running a user service. You need to either make the user session persist, make the user service persist regardless of logout or run syncthing as a system service.

wonderful, thanks a lot!

I just got it working as a system service, fingers crossed, no more problems. So far, it may take a few days for my syncing problems to surface, thanks to you I know where to look, hopefully all works now

all the best, j

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