Medusa install problems

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
bluesmoke
Posts: 14
Joined: Sun Feb 19, 2017 5:43 pm

Medusa install problems

Post by bluesmoke »

I've been running Dietpi and Sickrage for some time on a Raspberry Pi Zero W, works well aside from increasing issues with Sickrage.

So today I thought I'd make a new system with the now-recommended Medusa, and try that out.

I downloaded Dietpi 6.21.1 and installed it, configured it to use wifi, have a different hostname and use a static ip (also gateway, dns servers etc). All worked ok.

I then chose Medusa software from the dietpi-software menu, and installed it.

It didn't choose or install other software that is needed, eg the recommended Transmission client, nor did it choose any web server for me. I think (may be wrong here) that choosing Sickrage from the dietpi-software menu would automatically select other required software like Transmission and a web server.

Anyway, the install appears to compelete ok, but after a reboot, it tries to start Medusa and fails.

What should I be doing/what else is needed to make Medusa work?

Thanks
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Medusa install problems

Post by johnvick »

Is there an error message?
User avatar
MichaIng
Site Admin
Posts: 2421
Joined: Sat Nov 18, 2017 6:21 pm

Re: Medusa install problems

Post by MichaIng »

Medusa does not require a webserver nor did/does SickRage. Both bring their internal webserver, which can be seen by the custom port that you need to add in browser ;).

I just tested install here on Stretch VM and service starts up well + web interface opens on port 8081 well.
Since it's a raw python script download it should run OS/arch independently, as long as python itself runs fine.

But before guessing around, could you paste output of:

Code: Select all

journalctl -u medusa
tail -20 /mnt/dietpi_userdata/medusa/Logs/application.log
bluesmoke
Posts: 14
Joined: Sun Feb 19, 2017 5:43 pm

Re: Medusa install problems

Post by bluesmoke »

MichaIng wrote: Tue Feb 12, 2019 12:16 am I just tested install here on Stretch VM and service starts up well + web interface opens on port 8081 well.
Since it's a raw python script download it should run OS/arch independently, as long as python itself runs fine.

But before guessing around, could you paste output of:

Code: Select all

journalctl -u medusa
tail -20 /mnt/dietpi_userdata/medusa/Logs/application.log
Thanks for the reply, I was unsure what external programs were required, and just vaguely remembered being asked if I wanted to install recommended extras.

There were no obvious errors during the install, but on reboot, when it starts the dietpi services, transmission starts ok but it hangs for some time "starting Medusa" then eventually says it failed.

Here's the output from the commands :

Code: Select all

root@ricketychair:~# journalctl -u medusa
-- Logs begin at Tue 2019-02-12 11:58:18 GMT, end at Tue 2019-02-12 11:59:18 GMT. --
Feb 12 11:58:50 ricketychair systemd[1]: Starting Medusa Daemon...
root@ricketychair:~# tail -20 /mnt/dietpi_userdata/medusa/Logs/application.log
tail: cannot open '/mnt/dietpi_userdata/medusa/Logs/application.log' for reading: No such file or directory
I've just checked, and /mnt/dietpi_userdata/medusa exists, with various medusa files in there, but no Logs directory exists there.

Thanks
User avatar
MichaIng
Site Admin
Posts: 2421
Joined: Sat Nov 18, 2017 6:21 pm

Re: Medusa install problems

Post by MichaIng »

@bluesmoke
Okay, please open htop and check for any existing dietpi-services run that might hang. If one is there, navigate to it via up/down keys and press F9 to kill it.

Then try to manually start the Medusa service:
systemctl start medusa

And check back it's status:
systemctl status medusa

Perhaps it somehow starts too early or python fails or such.
bluesmoke
Posts: 14
Joined: Sun Feb 19, 2017 5:43 pm

Re: Medusa install problems

Post by bluesmoke »

Thanks for the reply.

I had doubts about the install yesterday, as I had some hardware issues with a micro-usb hub, so I've freshly downloaded Dietpi and this time configured dietpi.txt to do a headless install.

I then SSH'd in, and installed transmission and medusa from dietpi-software, without any errors.

On reboot, medusa does not start. I am unable to connect to it's web service ("connection refused") and I do not see it running with htop.

The previous two journalctl and tail commands return exactly the same as before.
Thus, it seems I can replicate the fault.

htop showed transmission running, so I stopped this.

systemctl start medusa took a while, then returned to the prompt with no other messages.

Code: Select all

root@ricketychair:~# systemctl status medusa
● medusa.service - Medusa Daemon
   Loaded: loaded (/etc/systemd/system/medusa.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-02-12 13:14:46 GMT; 2min 24s ago
  Process: 1183 ExecStart=/usr/bin/python /mnt/dietpi_userdata/medusa/start.py -q --daemon --nolaunch --datadir=/mnt/dietpi_userdata/medusa (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/medusa.service
           └─1191 /usr/bin/python /mnt/dietpi_userdata/medusa/start.py -q --daemon --nolaunch --datadir=/mnt/dietpi_userdata/medusa

Feb 12 13:13:16 ricketychair systemd[1]: Starting Medusa Daemon...
Feb 12 13:14:46 ricketychair systemd[1]: Started Medusa Daemon.
and now I am able to connect to Medusa from a different computer's web browser :)

Code: Select all


root@ricketychair:~# journalctl -u medusa
-- Logs begin at Thu 2016-11-03 17:16:43 GMT, end at Tue 2019-02-12 13:17:02 GMT. --
Feb 12 13:11:15 ricketychair systemd[1]: Starting Medusa Daemon...
Feb 12 13:12:45 ricketychair systemd[1]: medusa.service: Start operation timed out. Terminating.
Feb 12 13:12:45 ricketychair systemd[1]: Failed to start Medusa Daemon.
Feb 12 13:12:45 ricketychair systemd[1]: medusa.service: Unit entered failed state.
Feb 12 13:12:45 ricketychair systemd[1]: medusa.service: Failed with result 'timeout'.
Feb 12 13:13:16 ricketychair systemd[1]: Starting Medusa Daemon...
Feb 12 13:14:46 ricketychair systemd[1]: Started Medusa Daemon.
The first failure corresponds to the reboot, the 13:13:16 success was systemctl start medusa

Thanks

Ian
User avatar
MichaIng
Site Admin
Posts: 2421
Joined: Sat Nov 18, 2017 6:21 pm

Re: Medusa install problems

Post by MichaIng »

@bluesmoke
Okay thanks for testing and reporting back. So indeed while Medusa starts up great manually, it fails on boot. Perhaps some other boot scripts or steps interfering or something is missing when it attempts to start. Also that it "simply" times out after 90 seconds is somehow helpful.

What I don't like is that your manual start also took 90 seconds exactly although not timing out. I guess this is the usual systemd time allowed on scheduled starts. Although it should be DietPi-Services controlled :?. Will check back to assure that.
On my VM it took just 3 seconds or such, but you are on RPi Zero, that should be noted ;).

Also I guess it will be faster the next startups when first-run setup/configs and such have been done already.

Finally it is perhaps only RPi Zero being too slow to start it in allowed amount of seconds. We could workaround this by doing first service start right within the install run.
bluesmoke
Posts: 14
Joined: Sun Feb 19, 2017 5:43 pm

Re: Medusa install problems

Post by bluesmoke »

Having started Medusa manually, I used the web interface to let it update itself, then I read the news items under the tools menu. I didn't do any further configuration.

I rebooted the Pi Zero W, and now find that Medusa has started up automatically as expected!

Code: Select all

systemctl status medusa
● medusa.service - Medusa Daemon
   Loaded: loaded (/etc/systemd/system/medusa.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-02-12 15:10:38 GMT; 4min 30s ago
  Process: 838 ExecStart=/usr/bin/python /mnt/dietpi_userdata/medusa/start.py -q --daemon --nolaunch --datadir=/mnt/dietpi_userdata/medusa (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/medusa.service
           └─847 /usr/bin/python /mnt/dietpi_userdata/medusa/start.py -q --daemon --nolaunch --datadir=/mnt/dietpi_userdata/medusa

Feb 12 15:09:11 ricketychair systemd[1]: Starting Medusa Daemon...
Feb 12 15:10:38 ricketychair systemd[1]: Started Medusa Daemon.
This is the first reboot after setting it up, so I don't yet know if it's fixed or is intermittent.

Let me know if there's anything else I can test or report back on.

Thanks
bluesmoke
Posts: 14
Joined: Sun Feb 19, 2017 5:43 pm

Re: Medusa install problems

Post by bluesmoke »

OK, just discovered it's not always working. I used dietpi-drive-manager to add a networked drive, and when this utility tried to restart the dietpi-services, Medusa failed to start

Code: Select all

[ SUB1 ] DietPi-Services > start
[  OK  ] DietPi-Services | start : transmission-daemon
[FAILED] DietPi-Services | start : medusa
[  OK  ] DietPi-Services | start : cron
[ SUB2 ] DietPi-Process_tool > Apply
[  OK  ] DietPi-Process_tool | Completed

Code: Select all

root@ricketychair:~# systemctl status medusa
● medusa.service - Medusa Daemon
   Loaded: loaded (/etc/systemd/system/medusa.service; disabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Tue 2019-02-12 15:31:22 GMT; 2min 6s ago
  Process: 3715 ExecStart=/usr/bin/python /mnt/dietpi_userdata/medusa/start.py -q --daemon --nolaunch --datadir=/mnt/dietpi_userdata/medusa (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/medusa.service

Feb 12 15:29:50 ricketychair systemd[1]: Starting Medusa Daemon...
Feb 12 15:31:21 ricketychair systemd[1]: medusa.service: Start operation timed out. Terminating.
Feb 12 15:31:22 ricketychair systemd[1]: Failed to start Medusa Daemon.
Feb 12 15:31:22 ricketychair systemd[1]: medusa.service: Unit entered failed state.
Feb 12 15:31:22 ricketychair systemd[1]: medusa.service: Failed with result 'timeout'.
root@ricketychair:~# 
but if I start it manually, it's all good again

Code: Select all

root@ricketychair:~# systemctl start medusa
root@ricketychair:~# systemctl status medusa
● medusa.service - Medusa Daemon
   Loaded: loaded (/etc/systemd/system/medusa.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-02-12 15:35:42 GMT; 30s ago
  Process: 4438 ExecStart=/usr/bin/python /mnt/dietpi_userdata/medusa/start.py -q --daemon --nolaunch --datadir=/mnt/dietpi_userdata/medusa (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/medusa.service
           └─4446 /usr/bin/python /mnt/dietpi_userdata/medusa/start.py -q --daemon --nolaunch --datadir=/mnt/dietpi_userdata/medusa

Feb 12 15:34:19 ricketychair systemd[1]: Starting Medusa Daemon...
Feb 12 15:35:42 ricketychair systemd[1]: Started Medusa Daemon.
Thanks
Post Reply