Can't invoke the daemon

Hi,

After using syncthing for a few weeks I’m suddenly getting the error “Failed to start Syncthing Daemon. Error message: Daemon exits too fast”. The dialog box also asks that I check the installation or set a new path to the Syncthing binary. The path is correct though I reset it anyway. Nothing I do including completely uninstalling and reinstalling Syncthing and the GTK interface will get this error to go away.

I’m on Ubuntu/Gnome 16.0.4 on the computer where this problem is occurring. Any help is appreciated!

Try starting Syncthing yourself. Does it start successfully?

Thanks for your response. It does not appear to. When I attempt to start it at the command line I get a long list of options but the process does not seem to be running. Suggestions? Like I said I uninstalled and reinstalled but I can’t get it to run again after a couple of weeks of operation without problems. Thanks!

I suggest you paste the “long list of options” in here so we can see what’s going on.

:~$ syncthing start Usage: syncthing [options]

Options: -audit Write events to audit file -auditfile="" Specify audit file (use “-” for stdout, “–” for stderr) -browser-only Open GUI in browser -generate="" Generate key and config in specified dir, then exit -gui-address="" Override GUI address (e.g. “http://192.0.2.42:8443”) -gui-apikey="" Override GUI API key -home="" Set configuration directory -logfile="-" Log file name (use “-” for stdout) -logflags=“2” Select information in log line prefix (see below) -no-browser Do not start browser -no-restart Disable monitor process, managed restarts and log file writing -paths Show configuration paths -paused Start with all devices and folders paused -reset-database Reset the database, forcing a full rescan and resync -reset-deltas Reset delta index IDs, forcing a full index exchange -unpaused Start with all devices and folders unpaused -upgrade Perform upgrade -upgrade-check Check for available upgrade -upgrade-to="" Force upgrade directly from specified URL -verbose Print verbose log output -version Show version

The -logflags value is a sum of the following:

1 Date 2 Time 4 Microsecond time 8 Long filename 16 Short filename

I.e. to prefix each log line with date and time, set -logflags=3 (1 + 2 from above). The value 0 is used to disable all of the above. The default is to show time only (2).

Development Settings

The following environment variables modify Syncthing’s behavior in ways that are mostly useful for developers. Use with care.

STNODEFAULTFOLDER Don’t create a default folder when starting for the first time. This variable will be ignored anytime after the first run.

STGUIASSETS Directory to load GUI assets from. Overrides compiled in assets.

STTRACE A comma separated string of facilities to trace. The valid facility strings listed below.

STPROFILER Set to a listen address such as “127.0.0.1:9090” to start the profiler with HTTP access.

STCPUPROFILE Write a CPU profile to cpu-$pid.pprof on exit.

STHEAPPROFILE Write heap profiles to heap-$pid-$timestamp.pprof each time heap usage increases.

STBLOCKPROFILE Write block profiles to block-$pid-$timestamp.pprof every 20 seconds.

STPERFSTATS Write running performance statistics to perf-$pid.csv. Not supported on Windows.

STDEADLOCK Used for debugging internal deadlocks. Use only under direction of a developer.

STDEADLOCKTIMEOUT Used for debugging internal deadlocks; sets debug sensitivity. Use only under direction of a developer.

STDEADLOCKTHRESHOLD Used for debugging internal deadlocks; sets debug sensitivity. Use only under direction of a developer.

STNORESTART Equivalent to the -no-restart argument. Disable the Syncthing monitor process which handles restarts for some configuration changes, upgrades, crashes and also log file writing (stdout is still written).

STNOUPGRADE Disable automatic upgrades.

STHASHING Select the SHA256 hashing package to use. Possible values are “standard” for the Go standard library implementation, “minio” for the github.com/minio/sha256-simd implementation, and blank (the default) for auto detection.

GOMAXPROCS Set the maximum number of CPU cores to use. Defaults to all available CPU cores.

GOGC Percentage of heap growth at which to trigger GC. Default is 100. Lower numbers keep peak memory usage down, at the price of CPU usage (i.e. performance).

Debugging Facilities

The following are valid values for the STTRACE variable:

beacon - Multicast and broadcast discovery config - Configuration loading and saving connections - Connection handling db - The database layer dialer - Dialing connections discover - Remote device discovery events - Event generation and logging http - REST API main - Main package model - The root hub nat - NAT discovery and port mapping pmp - NAT-PMP discovery and port mapping protocol - The BEP protocol scanner - File change detection and hashing sha256 - SHA256 hashing package stats - Persistent device and folder statistics sync - Mutexes upgrade - Binary upgrades upnp - UPnP discovery and port mapping versioner - File versioning

Right, so you start it with just /path/to/syncthing. No start.

Thanks. I thought I had tried that but apparently I hadn’t. Regardless, this is now the message I’m getting repeated 4 times: [monitor] 17:46:53 INFO: Syncthing exited: exit status 2 [monitor] 17:46:54 INFO: Starting syncthing [5O7UQ] 17:46:54 INFO: syncthing v0.14.23 “Dysprosium Dragonfly” (go1.8rc3 linux-amd64) jenkins@build.syncthing.net 2017-02-07 20:25:33 UTC [5O7UQ] 17:46:54 INFO: My ID: 5O7UQSP-EFYRYB2-FIJDZMO-SUSE57B-TSPWIJZ-C4SZ6ZF-LUYOHN2-IM3UQQF [5O7UQ] 17:46:55 INFO: Single thread SHA256 performance is 149 MB/s using minio/sha256-simd (122 MB/s using crypto/sha256). [5O7UQ] 17:46:56 INFO: Hashing performance with weak hash is 127.10 MB/s [5O7UQ] 17:46:56 INFO: Hashing performance without weak hash is 145.25 MB/s [5O7UQ] 17:46:56 INFO: Weak hash enabled, as it has an acceptable performance impact. panic: leveldb/table: corruption on data-block (pos=799469): checksum mismatch, want=0x8427dfd4 got=0x13248f56 [file=000151.ldb] [monitor] 17:46:56 WARNING: Panic detected, writing to “/home/gke/.config/syncthing/panic-20170222-174656.log” [monitor] 17:46:56 WARNING:


  • Crash due to corrupt database. *
  •                                                                           *
    
  • This crash usually occurs due to one of the following reasons: *
    • Syncthing being stopped abruptly (killed/loss of power) *
    • Bad hardware (memory/disk issues) *
    • Software that affects disk writes (SSD caching software and simillar) *
  •                                                                           *
    
  • Please see the following URL for instructions on how to recover: *
  • https://docs.syncthing.net/users/faq.html#my-syncthing-database-is-corrupt *

[monitor] 17:46:56 INFO: Syncthing exited: exit status 2 [monitor] 17:46:57 WARNING: 4 restarts in 12.839226152s; not retrying further

I’m going to try reinstalling again but double checking for files left behind before doing so.

You don’t need to reinstall, just do what the linked FAQ entry says: Go to ~/.config/syncthing and delete the database files (*.db). Also if you didn’t have a power loss and/or this appears again, you should probably check your hard drive, it might be failing.

Thanks for the response. I already uninstalled before I saw it. I can’t find that db file so I’m assuming it went with the uninstall? Regardless, I have a feeling this might be a hard drive issue as you mentioned. This computer is a Mac-mini that was having troubles with OSX that I thought might be drive related. I put Ubuntu/ GNOME on it a couple of months ago and it’s been great up until this point but I cannot get Syncthing to run no matter what I do. Thanks anyway! Much appreciated!

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