Seaf-cli...unable to start daemon at ubuntu start


#1

Hi guys! I’m trying to set my seaf-cli to sync also locally one of the libraries within my headless server. If I start it manually from the normal ubuntu user (seaf-cli start), then it works as expected, but I don’t seem to be able to configure it as a service. Whenever I try to run it, I get:

$ sudo service seafile-client start
Warning: seafile-client.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Job for seafile-client.service failed because the control process exited with error code.
See "systemctl  status seafile-client.service" and "journalctl  -xe" for details.

$ systemctl status seafile-client.service
Warning: seafile-client.service changed on disk. Run ‘systemctl daemon-reload’ to reload units.
● seafile-client.service - Seafile client
Loaded: loaded (/etc/systemd/system/seafile-client.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-06-13 10:14:32 HKT; 30s ago
Process: 25903 ExecStart=/usr/bin/seaf-cli start (code=exited, status=217/USER)
Main PID: 25903 (code=exited, status=217/USER)
CPU: 0

Jun 13 10:14:32 SeafileServer systemd[1]: Starting Seafile client…
Jun 13 10:14:32 SeafileServer systemd[1]: seafile-client.service: Main process exited, code=exited, status=217/USER
Jun 13 10:14:32 SeafileServer systemd[1]: Failed to start Seafile client.
Jun 13 10:14:32 SeafileServer systemd[1]: seafile-client.service: Unit entered failed state.
Jun 13 10:14:32 SeafileServer systemd[1]: seafile-client.service: Failed with result ‘exit-code’.


#2

Please post your systemd service file: systemctl cat seafile-client.service


#3

Sure! Here you go:

/etc/systemd/system/seafile-client.service

[Unit]
Description=Seafile client

Uncomment the next line you are running seafile client on the same computer as server

After=seafile.service

Or the next one in other case

After=network.target

[Service]
Type=oneshot
ExecStart=/usr/bin/seaf-cli start
ExecStop=/usr/bin/seaf-cli stop
RemainAfterExit=yes
User=my_user
Group=my_user

[Install]
WantedBy=multi-user.target

I changed the user and group from initial seafile, but to no avail, still will fail.