You are not logged in.

#1 2010-02-06 20:31:46

neofax
Member
Registered: 2010-02-02
Posts: 29

[SOLVED] MPD will not start

I followed the guide from the wiki, and MPD refuses to start.  Here is the error I get:

Failed to load database: Unexpected end of file
output: No "audio_output" defined in config file
output: Attempt to detect audio output device
output: Attempting to detect a alsa audio device
No protocol specified
XOpenDisplay() failed
ALSA lib pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Connection terminated

alsa: Error opening default ALSA device: Connection refused
output: Attempting to detect a oss audio device
oss: Error opening OSS device "/dev/dsp": No such file or directory
oss: Error opening OSS device "/dev/sound/dsp": No such file or directory
output: Unable to detect an audio device
Aborted

Last edited by neofax (2010-02-07 00:33:06)

Offline

#2 2010-02-06 20:33:23

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] MPD will not start

I assume you googled some of those messages before you posted?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2010-02-06 20:40:07

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: [SOLVED] MPD will not start

It would help if you posted you mpd.conf. The Wiki itself opens up for several configurations depending on how audio is set up. Now it looks like MPD is looking for all possible audio devices but can't find any.

Offline

#4 2010-02-06 20:59:01

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: [SOLVED] MPD will not start

You put the config files in your $HOME or in the default root?

Offline

#5 2010-02-06 20:59:04

neofax
Member
Registered: 2010-02-02
Posts: 29

Re: [SOLVED] MPD will not start

.:B:. wrote:

I assume you googled some of those messages before you posted?

Yes, both Google'd and worked with people on MPD's IRC.  I try to fix my problems before asking for help, so please do not make an assumption.

music_directory       "/home/terry/Music"         # Your music dir.
playlist_directory    "/var/lib/mpd/playlists"
db_file               "/var/lib/mpd/db"
log_file              "/var/log/mpd/mpd.log"
error_file            "/var/log/mpd/mpd.error"
pid_file              "/var/run/mpd/mpd.pid"
state_file            "/var/lib/mpd/mpdstate"
user                  "mpd"
# Binding to address and port causing problems in mpd-0.14.2 best to leave
# commented.
# bind_to_address       "127.0.0.1"
# port                  "6600"

Offline

#6 2010-02-06 21:27:47

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: [SOLVED] MPD will not start

If your use pulseaudio, change mpd to mpd-pulse.

Offline

#7 2010-02-06 21:38:48

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] MPD will not start

neofax wrote:
.:B:. wrote:

I assume you googled some of those messages before you posted?

Yes, both Google'd and worked with people on MPD's IRC.  I try to fix my problems before asking for help, so please do not make an assumption.

If I assumed you hadn't, I wouldn't have asked. Hence the question mark - because it was a question. Given the scarce details in your opening post, it makes sense to assume you hadn't, though.

It never hurts to state what you did try, and what kind of setup you are using; quite to the contrary - that way we'll avoid double work.

If that is your complete mpd.conf, it's a bit sparse... Why not start out with the default configuration file and work from there? ALSA is running? Unless, like someone else asked, you're running pulseaudio?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#8 2010-02-06 21:47:32

neofax
Member
Registered: 2010-02-02
Posts: 29

Re: [SOLVED] MPD will not start

Here is the new error with mpd-pulse:

failed to stat music directory "/home/terry/Music": Permission denied
Failed to load database: Unexpected end of file
output: No "audio_output" defined in config file
output: Attempt to detect audio output device
output: Attempting to detect a alsa audio device
No protocol specified
XOpenDisplay() failed
ALSA lib pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Connection terminated

alsa: Error opening default ALSA device: Connection refused
output: Attempting to detect a oss audio device
oss: Error opening OSS device "/dev/dsp": No such file or directory
oss: Error opening OSS device "/dev/sound/dsp": No such file or directory
output: Attempting to detect a pulse audio device
No protocol specified
XOpenDisplay() failed
Cannot connect to default PulseAudio server: Connection terminated
output: Unable to detect an audio device
Aborted

Offline

#9 2010-02-06 21:49:20

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

Re: [SOLVED] MPD will not start

*** Whoops. Beaten. ***

mpd needs almost no configuration these days. It's usually a typo or something like n0dix suggested. I know that this is a different set up, but it illustrates the point:

music_directory      "~/music"
playlist_directory   "~/.mpd/playlists"
db_file              "~/.mpd/mpd.db"
log_file             "~/.mpd/mpd.log"
pid_file             "~/.mpd/mpd.pid"
state_file           "~/.mpd/state"
user                 "skottish"

Offline

#10 2010-02-06 22:42:09

kaivalagi
Member
From: Norwich, UK
Registered: 2009-11-05
Posts: 145

Re: [SOLVED] MPD will not start

Is the mpd user defined in your system and does it have permissions for your music directory i.e. have you followed the "Executable permissions" section in the mpd wiki instructions? Also looks like you'll need to define the audio output properties as the defaults aren't working for pulseaudio...also discussed in the wiki and I think a default for pulse is commented out in the /etc/mpd.conf file

If all that is covered off and it still doesn't work then I'm at a loss

Last edited by kaivalagi (2010-02-06 22:43:37)


Running Arch 64 (Made the switch to Arch 10/2009)
AUR | BZR

Offline

#11 2010-02-06 23:52:00

neofax
Member
Registered: 2010-02-02
Posts: 29

Re: [SOLVED] MPD will not start

mpd user exists.  mpd is the owner of /var/lib/mpd and subfolders and files.  the group mpd has read+write access to my Music folder (also tried the other way and made all of the files owned by mpd:users in /home/terry/Music).  The pulse bit can wait until I can get mpd to actually create a db file.

EDIT:  Running as myself works perfectly fine.  But I would like for it to work as the mpd user.

Last edited by neofax (2010-02-07 00:03:46)

Offline

#12 2010-02-06 23:58:04

kaivalagi
Member
From: Norwich, UK
Registered: 2009-11-05
Posts: 145

Re: [SOLVED] MPD will not start

neofax wrote:

mpd user exists.  mpd is the owner of /var/lib/mpd and subfolders and files.  the group mpd has read+write access to my Music folder (also tried the other way and made all of the files owned by mpd:users in /home/terry/Music).  The pulse bit can wait until I can get mpd to actually create a db file.

Have you tried deleting any mpd.db file under /var/lib/mpd and (re)creating using "mpd --create-db"?

Last edited by kaivalagi (2010-02-06 23:58:38)


Running Arch 64 (Made the switch to Arch 10/2009)
AUR | BZR

Offline

#13 2010-02-07 00:32:45

neofax
Member
Registered: 2010-02-02
Posts: 29

Re: [SOLVED] MPD will not start

Don't I feel like a $donkey!  I was missing /var/run/mpd/mpd.pid.  Probably could do with a better error output.  Solved my problem though.

Offline

#14 2010-02-07 00:33:09

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

Re: [SOLVED] MPD will not start

kaivalagi wrote:
neofax wrote:

mpd user exists.  mpd is the owner of /var/lib/mpd and subfolders and files.  the group mpd has read+write access to my Music folder (also tried the other way and made all of the files owned by mpd:users in /home/terry/Music).  The pulse bit can wait until I can get mpd to actually create a db file.

Have you tried deleting any mpd.db file under /var/lib/mpd and (re)creating using "mpd --create-db"?

--create-db is unnecessary now. Removing the db file (renaming to be safe) and restarting mpd should be enough.

Offline

#15 2010-02-07 00:39:19

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: [SOLVED] MPD will not start

skottish wrote:
kaivalagi wrote:
neofax wrote:

mpd user exists.  mpd is the owner of /var/lib/mpd and subfolders and files.  the group mpd has read+write access to my Music folder (also tried the other way and made all of the files owned by mpd:users in /home/terry/Music).  The pulse bit can wait until I can get mpd to actually create a db file.

Have you tried deleting any mpd.db file under /var/lib/mpd and (re)creating using "mpd --create-db"?

--create-db is unnecessary now. Removing the db file (renaming to be safe) and restarting mpd should be enough.

I realize today, i don't need to create a db, automatically do.

Offline

#16 2010-02-07 08:40:40

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] MPD will not start

neofax wrote:
.:B:. wrote:

I assume you googled some of those messages before you posted?

Yes, both Google'd and worked with people on MPD's IRC.

You mean that time when you left, because of missing patience? smile


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

Board footer

Powered by FluxBB