Medusa question

I have installed medusa from dietpi-software and it runs fine.

But if I

systemctl status medusa

I get

● medusa.service - Medusa Daemon
Loaded: loaded (/etc/systemd/system/medusa.service; disabled; vendor preset: enabled)
Active: inactive (dead) since Sat 2019-05-25 15:32:17 NZST; 1min 38s ago
Process: 23645 ExecStart=/usr/bin/python /mnt/dietpi_userdata/medusa/ -q --daemon --nolaunch --datadir=/mnt/dietpi_userdata/medusa (code=exited, status=0
Main PID: 23645 (code=exited, status=0/SUCCESS)
Memory: 707.6M
CPU: 13.363s
CGroup: /system.slice/medusa.service
└─2058 /usr/bin/python /mnt/dietpi_userdata/medusa/ -q --daemon --nolaunch --datadir=/mnt/dietpi_userdata/medusa

May 25 15:32:05 Odroid systemd[1]: Started Medusa Daemon.

It is running fine but somehow systemd doesn’t know it is running.

Any idea why this is?


Just verified it. On service start, first some compiling steps are done that take some seconds with 100% CPU usage. Afterwards the process exits and a new one is spawned. Since systemd just sees the main process exiting but cannot know about the respawn, it shows it as exited/dead.

Will check the official Medusa instructions, perhaps they suggest a systemd unit that detects the process state correctly, e.g. with Type=forking instead of Type=simple.

Fixed with:

  • We used used the “–daemon” option that should not be used within systemd, besides you use a different type with then PID file required.
    However a minor one, so I think we do not need to actively patch it for existing installs?


Thanks for tracking this down - it had been puzzling me when i was trying to get Medusa to run under Python 3 as it looked like Medusa had crashed when it hadn’t. Anyway all good now with Python 3.5.3 (the Medusa team are encouraging people to use Python 3 but is not that easy).