This isn’t a duplicate of Starting syncthing from systemd
So far, I am loving syncthing!
syncthing runs on the command line just fine, under my user:
$ syncthing
[monitor] 2015/05/24 21:13:18.466954 monitor.go:94: INFO: Starting syncthing
[XUBPK] 2015/05/24 21:13:18.751851 main.go:466: INFO: syncthing v0.11.5 (go1.4.2 linux-amd64 default) builduser@jara 2015-05-15 08:46:47 UTC
[XUBPK] 2015/05/24 21:13:18.751952 main.go:467: INFO: My ID: (...snip...)
[XUBPK] 2015/05/24 21:13:18.752439 main.go:740: INFO: Database block cache capacity 63778 KiB
[XUBPK] 2015/05/24 21:13:18.758490 main.go:795: INFO: Starting web GUI on http://127.0.0.1:8384/
[XUBPK] 2015/05/24 21:13:19.064706 main.go:870: INFO: Starting local discovery announcements
[XUBPK] 2015/05/24 21:13:19.065967 main.go:875: INFO: Starting global discovery announcements
I am trying to simply start syncthing as my user from systemd, as I do my other services. I’m using i3wm on Arch.
$ cp /usr/lib/systemd/system/syncthing* ~/.config/systemd/user
$ systemctl --user enable syncthing@eric.service
Created symlink from /home/eric/.config/systemd/user/multi-user.target.wants/syncthing@eric.service to /home/eric/.config/systemd/user/syncthing@.service.
$ systemctl --user start syncthing@eric.service
$ systemctl --user status syncthing@eric.service
● syncthing@eric.service - Syncthing - Open Source Continuous File Synchronization for eric
Loaded: loaded (/home/eric/.config/systemd/user/syncthing@.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit) since Sun 2015-05-24 21:17:25 EDT; 5s ago
Docs: https://github.com/syncthing/syncthing/wiki
Process: 20791 ExecStart=/usr/bin/syncthing -no-browser -logflags=0 (code=exited, status=216/GROUP)
Main PID: 20791 (code=exited, status=216/GROUP)
May 24 21:17:24 wash systemd[3748]: Unit syncthing@eric.service entered failed state.
May 24 21:17:24 wash systemd[3748]: syncthing@eric.service failed.
May 24 21:17:25 wash systemd[3748]: syncthing@eric.service holdoff time over, scheduling restart.
May 24 21:17:25 wash systemd[3748]: start request repeated too quickly for syncthing@eric.service
May 24 21:17:25 wash systemd[3748]: Failed to start Syncthing - Open Source Continuous File Synchronization for eric.
May 24 21:17:25 wash systemd[3748]: Unit syncthing@eric.service entered failed state.
May 24 21:17:25 wash systemd[3748]: syncthing@eric.service failed.
And the systemctl file:
$ cat ~/.config/systemd/user/syncthing@.service
[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Documentation=https://github.com/syncthing/syncthing/wiki
After=network.target
[Service]
User=%i
Environment=STNORESTART=yes
ExecStart=/usr/bin/syncthing -no-browser -logflags=0
Restart=on-failure
SuccessExitStatus=2 3 4
RestartForceExitStatus=3 4
[Install]
WantedBy=multi-user.target
I believe I have the latest of everything:
$ syncthing -version
syncthing v0.11.5 (go1.4.2 linux-amd64 default) builduser@jara 2015-05-15 08:46:47 UTC
$ cat /proc/version
Linux version 4.0.4-2-ARCH (builduser@foutrelis) (gcc version 5.1.0 (GCC) ) #1 SMP PREEMPT Fri May 22 03:05:23 UTC 2015
EDIT: ps returns nada:
$ sudo ps aux | grep syncthing