You are not logged in.

#1 2007-12-24 19:17:14

orv
Member
Registered: 2007-12-13
Posts: 11

unable to start MPD as a daemon in rc.conf

For some reason, MPD is unable to start as a daemon listed in rc.conf. I have tried running it as a background also and no go. MPD goes after ALSA, so I don't know what else is missing.

Also, I cannot start mpd as root after logging in immediately after my system boots up. It just tells me it fails.
However, I can start MPD after I log-in as a normal user and su into root, then manually typing /etc/rc.d/mpd start.

Could it be that it is unable to find my music database during its attempt to start as a daemon in rc.conf? (because my music directory is in an NTFS partition, which is not listed in fstab because it is automatically mounted by hal)

Could it be that I set "user" in /etc/mpd.conf as "mpd" that it is unable to start it as root?

What could be the culprit?

Last edited by orv (2007-12-24 19:22:49)

Offline

#2 2007-12-24 19:33:58

ProzacR
Member
Registered: 2007-04-29
Posts: 272

Re: unable to start MPD as a daemon in rc.conf

I think it is problem with config files. Double check all of them. It looks like your user config is ok but root config or global config is bad.

Offline

#3 2007-12-25 20:32:22

barry
Member
Registered: 2007-11-27
Posts: 39

Re: unable to start MPD as a daemon in rc.conf

Have you ran /etc/rc.d/mpd create-db?

Offline

#4 2007-12-25 21:49:17

orv
Member
Registered: 2007-12-13
Posts: 11

Re: unable to start MPD as a daemon in rc.conf

Yup. MPD works and plays my music. It just wont start up as a daemon, but I know why now.

The place where my music is located (/dev/sdb2) is an NTFS partition which isn't mounted by the time I get to the login prompt. This is because it is automounted AFTER i log-in a user account in which HAL automounts that drive.

Adding an entry in FSTAB and not relying on automount by HAL solves the problem because now when I start it as a daemon, it can actually find my music library.

Offline

#5 2008-01-06 20:57:52

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: unable to start MPD as a daemon in rc.conf

I'm bumping this thread because I was having a similar problem. My config files where fine and MPD would not start as a daemon. The "solution" was strange. Running '/etc/rc.d/mpd start' failed for both root and user. Then I tried simply 'mpd' and got an error message about MPD already running. After that everything worked properly.

Offline

#6 2008-01-07 05:56:44

peets
Member
From: Montreal
Registered: 2007-01-11
Posts: 936
Website

Re: unable to start MPD as a daemon in rc.conf

There is a section in the config file that lets mpd change UID if it's started as root. If the user it tries to become doesn't exist, it will fail. Make sure that user (if you use that feature) exists. I think by default it tries to become user 'mpd'.

Offline

#7 2008-01-07 07:53:39

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: unable to start MPD as a daemon in rc.conf

I don't know about mpd, but for some other daemons that start as root and then drop privileges to another user you also need to have the 'capability' module loaded (rc.conf).


1000

Offline

#8 2008-01-07 08:11:09

ise
Developer
From: Karlsruhe / Germany
Registered: 2005-10-06
Posts: 404
Website

Re: unable to start MPD as a daemon in rc.conf

Configured mpd as described in the wiki and everything runs fine here. I have set my UID to mpd and it starts on boot without problems. There is no need to load a module or anything. The 'mpd' user will automatically create after the installation of the package, so it exists on the system, if you don't delete it.

Offline

Board footer

Powered by FluxBB