Results 1 to 4 of 4

Thread: Systemd Services Don't Work

  1. #1
    Join Date
    Aug 2005
    Location
    USA
    Beans
    378
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Systemd Services Don't Work

    I have a few usenet programs that I downloaded from GitHub and they didn't come with Systemd unit files so I grabbed a few from the net, even after modifying them with the correct arguments none of them work. The strange thing is that if I copy the ExecStart line and paste it into the terminal it runs as expected. They all complain about the same error since they all python scripts.

    Here's one for SickRage
    Code:
    [Unit]
    Description=SickRage Daemon
    
    [Service]
    User=root
    Group=wheel
    
    Type=forking
    GuessMainPID=no
    ExecStart=/usr/bin/python /opt/usenet/sickrage/SickBeard.py -q --daemon --nolaunch --datadir=/opt/usenet/sickrage
    
    [Install]
    WantedBy=multi-user.target
    Here's the error from journalctl -xe
    Code:
    Oct 06 09:54:50 odroid systemd[1]: Starting SickRage Daemon...
    -- Subject: Unit sickrage.service has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- 
    -- Unit sickrage.service has begun starting up.
    Oct 06 09:54:50 odroid systemd[9457]: Failed at step GROUP spawning /usr/bin/python: No such process
    -- Subject: Process /usr/bin/python could not be executed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- 
    -- The process /usr/bin/python could not be executed and failed.
    -- 
    -- The error number returned by this process is 3.
    Oct 06 09:54:50 odroid systemd[1]: sickrage.service: control process exited, code=exited status=216
    Oct 06 09:54:50 odroid systemd[1]: Failed to start SickRage Daemon.
    -- Subject: Unit sickrage.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- 
    -- Unit sickrage.service has failed.
    -- 
    -- The result is failed.
    Oct 06 09:54:50 odroid systemd[1]: Unit sickrage.service entered failed state.
    Oct 06 09:54:50 odroid systemd[1]: sickrage.service failed.
    Oct 06 09:54:50 odroid polkitd(authority=local)[589]: Unregistered Authentication Agent for unix-process:9452:3944808 (system bus name :1.47, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
    Code:
     [root@odroid /opt]# status sickrage
    ● sickrage.service - SickRage Daemon
       Loaded: loaded (/etc/systemd/system/sickrage.service; enabled; vendor preset: enabled)
       Active: failed (Result: exit-code) since Tue 2015-10-06 09:54:50 EDT; 2min 8s ago
      Process: 9457 ExecStart=/usr/bin/python /opt/usenet/sickrage/SickBeard.py -q --daemon --nolaunch --datadir=/opt/usenet/sickrage (code=exited, status=216/GROUP)
    
    Oct 06 09:54:50 odroid systemd[1]: Starting SickRage Daemon...
    Oct 06 09:54:50 odroid systemd[1]: sickrage.service: control process exited, code=exited status=216
    Oct 06 09:54:50 odroid systemd[1]: Failed to start SickRage Daemon.
    Oct 06 09:54:50 odroid systemd[1]: Unit sickrage.service entered failed state.
    Oct 06 09:54:50 odroid systemd[1]: sickrage.service failed.
    Python definitely exists and is executable so I have no idea why it's complaining
    Code:
     [root@odroid /opt]# ls -lh /usr/bin|grep python
    lrwxrwxrwx 1 root root       9 Mar 17  2015 python -> python2.7
    lrwxrwxrwx 1 root root       9 Mar 17  2015 python2 -> python2.7
    -rwxr-xr-x 1 root root    2.5M Apr  2  2015 python2.7
    Code:
     [root@odroid /opt]# python
    Python 2.7.9 (default, Apr  2 2015, 16:04:32) 
    [GCC 4.9.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>>

  2. #2
    Join Date
    Aug 2005
    Location
    USA
    Beans
    378
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: Systemd Services Don't Work

    Actually it's happening with binary files also.

    Code:
    -- Unit nzbget.service has finished starting up.
    -- 
    -- The start-up result is done.
    Oct 06 19:32:55 odroid systemd[1]: Starting NZBGet Daemon...
    -- Subject: Unit nzbget.service has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- 
    -- Unit nzbget.service has begun starting up.
    Oct 06 19:32:55 odroid systemd[603]: Failed at step GROUP spawning /usr/bin/nzbget: No such process
    -- Subject: Process /usr/bin/nzbget could not be executed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- 
    -- The process /usr/bin/nzbget could not be executed and failed.
    -- 
    -- The error number returned by this process is 3.
    Oct 06 19:32:55 odroid systemd[1]: nzbget.service: main process exited, code=exited, status=216/GROUP
    Oct 06 19:32:55 odroid systemd[606]: Failed at step GROUP spawning /usr/bin/nzbget: No such process
    -- Subject: Process /usr/bin/nzbget could not be executed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- 
    -- The process /usr/bin/nzbget could not be executed and failed.
    -- 
    -- The error number returned by this process is 3.
    Oct 06 19:32:55 odroid systemd[1]: nzbget.service: control process exited, code=exited status=216
    Oct 06 19:32:55 odroid systemd[1]: Unit nzbget.service entered failed state.

  3. #3
    Join Date
    Nov 2008
    Location
    S.H.I.E.L.D. 6-1-6
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Systemd Services Don't Work

    Problem possibly in
    Code:
    
    
    There is no wheel group for Debian based distros, though Redhat based distros have a wheel group.

    Change it to
    Code:
    Group=root
    Side note: Not a good idea to run processes as root, if they are compromised, they have free reign of the system.
    Don't waste your energy trying to change opinions ... Do your thing, and don't care if they like it.

  4. #4
    Join Date
    Aug 2005
    Location
    USA
    Beans
    378
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: Systemd Services Don't Work

    Changing the group from wheel to root got rid of that error but the services still fail to start.

    Code:
     [root@odroid /opt]# start couchpotato
    Job for couchpotato.service failed. See "systemctl status couchpotato.service" and "journalctl -xe" for details.
     [root@odroid /opt]# status couchpotato
    ● couchpotato.service - An automatic NZB and torrent movie downloader
       Loaded: loaded (/etc/systemd/system/couchpotato.service; enabled; vendor preset: enabled)
       Active: failed (Result: timeout) since Thu 2015-10-08 21:02:33 EDT; 6min ago
      Process: 20256 ExecStart=/usr/bin/python /opt/usenet/couchpotato/CouchPotato.py --daemon --console_log --pid_file=/run/couchpotato/couchpotato.pid (code=exited, status=0/SUCCESS)
     Main PID: 5001 (code=exited, status=0/SUCCESS)
    
    Oct 08 21:01:03 odroid systemd[1]: Starting An automatic NZB and torrent movie downloader...
    Oct 08 21:01:04 odroid systemd[1]: PID file /run/couchpotato/couchpotato.pid not readable (yet?) after start.
    Oct 08 21:02:33 odroid systemd[1]: couchpotato.service start operation timed out. Terminating.
    Oct 08 21:02:33 odroid systemd[1]: Failed to start An automatic NZB and torrent movie downloader.
    Oct 08 21:02:33 odroid systemd[1]: Unit couchpotato.service entered failed state.
    Oct 08 21:02:33 odroid systemd[1]: couchpotato.service failed.
    Last edited by Brando569; October 9th, 2015 at 02:12 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •