thomx12
Posts: 4
Joined: Tue Feb 18, 2014 8:19 pm

systemd services unexpectedly dies

Tue Feb 18, 2014 8:44 pm

I'm experiencing some issues with a few services on my raspberry pi. I switched from raspbian to arch and everything worked liked a charm. Setting things up and configuration was easy. When I tried to access the sabnzbd web ui the next day I noticed the service was offline. I restarted the service and it worked again. Some time later another service (Couchpotato) failed. Also offline. No error messages or anything.

This strange behaviour keeps repeating over and over again to all of the services I installed just after I installed arch on my raspberrypi. The service runs for a few hours and then suddenly dies. I've uploaded some of the systemctl status output to pastebin:

Couchpotato:
http://pastebin.com/abi3ivAC

Headphones:
http://pastebin.com/zTEC4bb1

The .service files look like this:
Couchpotato.service
http://pastebin.com/Knf1Fy5k

Headphones.service
http://pastebin.com/F7PAZ90d

Does anyone else ran into this or these symptoms? Could it be a memory problem? Or does it has something to do with permissions? I have some experience with working with linux just not with Arch or systemd. I need someone to point me in the right direction.

Help is greatly appreciated.

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: systemd services unexpectedly dies

Sun Feb 23, 2014 6:49 pm

This is way out of my league, but since no one else has answered you, let me try. If it is a software issue, I believe you have to use sysctl to make it so a daemon keeps running, but don't know that stuff real well. Check the following wiki pages:

Daemons - ArchWiki
https://wiki.archlinux.org/index.php/daemons

systemd - ArchWiki
https://wiki.archlinux.org/index.php/Sy ... sing_units

Also, it looks like you have headphones disconnecting, is that right? Could that be a hardware issue, how are they mounted on the Pi? How are they powered? I just have a simple earbud plugged in to the earphone jack, anything requiring much power has to be attached to Pi through a good powered USB hub.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

thomx12
Posts: 4
Joined: Tue Feb 18, 2014 8:19 pm

Re: systemd services unexpectedly dies

Mon Feb 24, 2014 9:18 am

Thanks for helping out. Headphones is actually software as well (https://github.com/rembo10/headphones). All of the services I mentioned are running as daemons and I'm using systemd for that. But the problem is that these services / daemons keep failing or dying and I don't know why..

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: systemd services unexpectedly dies

Mon Feb 24, 2014 4:34 pm

Oh, sigh. I guess read the man pages for each of these services, and see if there is an option for debugging. Use those options when restarting the services, and also make sure all the stdout and stderr go to some sort of log you can examine later.

Another option is to start each with strace, which records everything. The output can be huge, but also can be very informative, and show you where something is failing. It is available in the repository. Biggest problem I see is the huge output, route that to external media if your Pi does not have umpteen megabytes of free space.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

thomx12
Posts: 4
Joined: Tue Feb 18, 2014 8:19 pm

Re: systemd services unexpectedly dies

Fri Feb 28, 2014 11:08 am

Thanks, I will look into that.

thomx12
Posts: 4
Joined: Tue Feb 18, 2014 8:19 pm

Re: systemd services unexpectedly dies

Thu Mar 06, 2014 1:18 pm

I eventually fixed the problem by migrating the filesystem to a hard disk and creating a swap partition. This generally increased speed of the Pi and I'm running all of my services without problems for a few days now :D.

Return to “Arch”