Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
systemd and minidlna
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
elmar283
Guru
Guru


Joined: 06 Dec 2004
Posts: 316
Location: Haarlem, Netherlands

PostPosted: Sat Jul 19, 2014 7:38 pm    Post subject: systemd and minidlna Reply with quote

After switching from OpenRC to Systemd I have some problems with minidlna.
If I start it the pid-file is not created. If I start a movie from my TV the service is disabled.
This is the output of the status after starting:
Code:
zaphodbeeblebrox system # sudo systemctl status minidlna.service
● minidlna.service - MiniDLNA is a DLNA/UPnP-AV server software
   Loaded: loaded (/usr/lib/systemd/system/minidlna.service; enabled)
   Active: activating (start) since za 2014-07-19 21:34:04 CEST; 37s ago
  Process: 23859 ExecStart=/usr/sbin/minidlnad -f /etc/minidlna.conf -P /var/run/minidlna/minidlna.pid (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/minidlna.service
           └─23860 /usr/sbin/minidlnad -f /etc/minidlna.conf -P /var/run/minidlna/minidlna.pid

jul 19 21:34:04 zaphodbeeblebrox.elmarotter.eu systemd[1]: PID file /var/run/minidlna/minidlna.pid not readable (yet?) after start.


And this after failing:
Code:

zaphodbeeblebrox run # sudo systemctl status minidlna.service
● minidlna.service - MiniDLNA is a DLNA/UPnP-AV server software
   Loaded: loaded (/usr/lib/systemd/system/minidlna.service; enabled)
   Active: failed (Result: timeout) since za 2014-07-19 21:35:34 CEST; 1min 40s ago
  Process: 23859 ExecStart=/usr/sbin/minidlnad -f /etc/minidlna.conf -P /var/run/minidlna/minidlna.pid (code=exited, status=0/SUCCESS)

jul 19 21:34:04 zaphodbeeblebrox.elmarotter.eu systemd[1]: PID file /var/run/minidlna/minidlna.pid not readable (yet?) after start.
jul 19 21:35:34 zaphodbeeblebrox.elmarotter.eu systemd[1]: minidlna.service start operation timed out. Terminating.
jul 19 21:35:34 zaphodbeeblebrox.elmarotter.eu systemd[1]: Failed to start MiniDLNA is a DLNA/UPnP-AV server software.
jul 19 21:35:34 zaphodbeeblebrox.elmarotter.eu systemd[1]: Unit minidlna.service entered failed state.


Can anyone help me with this problem?
Back to top
View user's profile Send private message
elmar283
Guru
Guru


Joined: 06 Dec 2004
Posts: 316
Location: Haarlem, Netherlands

PostPosted: Sat Jul 19, 2014 8:54 pm    Post subject: Reply with quote

It seems that the script is not able to create a directory on /run/. After I added the directory /var/minidlna and gave it the right permissions it works. But still it is strange that systemctl doesn't seem to have write permissions.
Back to top
View user's profile Send private message
elmar283
Guru
Guru


Joined: 06 Dec 2004
Posts: 316
Location: Haarlem, Netherlands

PostPosted: Sun Jul 20, 2014 3:47 pm    Post subject: Reply with quote

This does only tempory fix the problem. After reboot I have make the directory all over again. So it won't start on boot. :(
Has anyone a sullution or know where to file a bug or where a bug is already be filed about this?
Back to top
View user's profile Send private message
Melsion
n00b
n00b


Joined: 01 Nov 2007
Posts: 34

PostPosted: Wed Oct 01, 2014 8:49 am    Post subject: Reply with quote

Same problem here... any ideas?
Back to top
View user's profile Send private message
Melsion
n00b
n00b


Joined: 01 Nov 2007
Posts: 34

PostPosted: Wed Oct 01, 2014 9:19 am    Post subject: Reply with quote

Doing some testing, I see minidlna starts and works for a while (systemd says it's starting), but after a minute or so it looks like systemd kills it and says "failed"...
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Wed Oct 01, 2014 10:33 am    Post subject: Reply with quote

as a work around
I have created a bashrc entry that creates the directories(chmods them) and then starts the minidlna service manually(systemctl start)
that's not a solution, but it'll get things going till your problem is fixed
Back to top
View user's profile Send private message
elmar283
Guru
Guru


Joined: 06 Dec 2004
Posts: 316
Location: Haarlem, Netherlands

PostPosted: Fri Oct 03, 2014 9:30 am    Post subject: Reply with quote

I have added a local script to start MiniDNLA:
Code:

elmarotter@zaphodbeeblebrox /etc/systemd/system $ cat minidlna-local.service
[Unit]
Description=MiniDLNA is a DLNA/UPnP-AV server software
After=syslog.target local-fs.target network.target

[Service]
User=minidlna
Group=minidlna
Type=forking
ExecStart=/usr/sbin/minidlnad -f /etc/minidlna.conf

[Install]
WantedBy=multi-user.target


EDIT: also see this forum for local scripts: https://forums.gentoo.org/viewtopic-t-995866-highlight-systemd+wlp3s0.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum