You are not logged in.

#1 2008-12-23 11:52:16

tehabe
Member
Registered: 2008-10-14
Posts: 82

MPD fails at boot time

Hi,

when I boot my computer I get when the mpd is loading the message that is failed:

it looked a little bit like this:

/etc/rc.d/mpd, Line 6 abort /usr/bin/mpd /etc/mpd.conf &> /dev/null

This happend only when I use the stock kernel. Only change to the kernel is the AUR package rt2860 for my wifi card.

Offline

#2 2008-12-23 22:28:38

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: MPD fails at boot time

what is line 6 of mpd.conf?


neutral

Offline

#3 2008-12-24 01:46:38

tehabe
Member
Registered: 2008-10-14
Posts: 82

Re: MPD fails at boot time

This is line 5 to 7:

error_file            "~/.mpd/error"
pid_file              "~/.mpd/mpd.pid"
state_file            "~/.mpd/mpdstate"

Offline

#4 2008-12-24 21:26:06

tehabe
Member
Registered: 2008-10-14
Posts: 82

Re: MPD fails at boot time

Now I get this message even when I start mpd when the computer is running, I get this message:

% sudo /etc/rc.d/mpd start
:: Starting Music Player Daemon
/etc/rc.d/mpd: line 6:  6391 Abgebrochen             /usr/bin/mpd /etc/mpd.conf >&/dev/null

Last edited by tehabe (2008-12-24 21:26:54)

Offline

#5 2008-12-24 23:06:40

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

Re: MPD fails at boot time

The line 6 in question isn't from mpd.conf but from the daemon script in /etc/rc.d/mpd. However if the example you gave is your mpd.conf then it would be interesting to see how it looks. I can't understand how this could be connected to the kernel. To me such an explanation doesn't make sense.

Anyway the full mpd.conf might be of interest to track down why the daemon fails to execute.

Offline

#6 2008-12-26 18:50:59

tehabe
Member
Registered: 2008-10-14
Posts: 82

Re: MPD fails at boot time

My full mpd.conf. I don't understand the connection myself. I only know the problem started when began to use the stock kernel. I did this because the my kernel before that didn't like my udev and broke the symlinks for the DVD drive.

music_directory       "~/music"
playlist_directory    "~/playlists"
db_file               "~/.mpd/db"
log_file              "~/.mpd/log"
error_file            "~/.mpd/error"
pid_file              "~/.mpd/mpd.pid"
state_file            "~/.mpd/mpdstate"
user                  "thomas"
bind_to_address       "127.0.0.1"
port                  "6600
filesystem_charset    "UTF-8"

mixer_type "alsa"
mixer_device "default"
mixer_control "PCM"

audio_output {
    type "alsa"
    name "ALSA audio output"
    driver_options "period_size=50000;use_mmap=true"
    }

Offline

#7 2008-12-26 22:04:00

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: MPD fails at boot time

driver_options "period_size=50000;use_mmap=true"

Is that part necessary?ฆ


neutral

Offline

#8 2008-12-26 22:34:29

Zariel
Member
Registered: 2008-10-07
Posts: 446

Re: MPD fails at boot time

do the files and folder exist which you specified?

Offline

#9 2008-12-27 16:38:36

tehabe
Member
Registered: 2008-10-14
Posts: 82

Re: MPD fails at boot time

sand_man wrote:

driver_options "period_size=50000;use_mmap=true"

Is that part necessary?ฆ

It should reduce the load on the processor I didn't see any difference.

All directories exist.

Currently it only fails when I boot the computer, when the computer is up and running I can start mpd via the start script.

I updated the kernel yesterday to 2.6.28 and it started okay but when I installed the AUR package rt2680 it failed again. I now it makes no sense whatsoever.

Offline

#10 2008-12-27 17:26:19

thunderogg
Member
From: Rio de Janeiro
Registered: 2008-07-13
Posts: 172

Re: MPD fails at boot time

Does the "mpd.pid" exist? Did you create it with "touch ~/.mpd/mpd.pid". If it exist, try comment out the line 6, and see what happens. You are supposed to be able to run without a .pid file, but then you have to remove it from the configuration file.

Offline

#11 2008-12-27 17:38:25

thunderogg
Member
From: Rio de Janeiro
Registered: 2008-07-13
Posts: 172

Re: MPD fails at boot time

KimTjik wrote:

The line 6 in question isn't from mpd.conf but from the daemon script in /etc/rc.d/mpd.

Hm, yes. And this line is: "/usr/bin/mpd /etc/mpd.conf >&/dev/null"
It is trying to execute "/usr/bin/mpd" loading "/etc/mpd.conf" and it fails.
Why? Can't it read /etc/mpd.conf for some reason? How about rights? Is it really there? Remember than when you boot, mpd is run as root. How do run it manually--as a user?

Last edited by thunderogg (2008-12-27 17:48:21)

Offline

#12 2008-12-27 20:36:37

tehabe
Member
Registered: 2008-10-14
Posts: 82

Re: MPD fails at boot time

thunderogg wrote:

Why? Can't it read /etc/mpd.conf for some reason? How about rights? Is it really there? Remember than when you boot, mpd is run as root. How do run it manually--as a user?

% ls -l mpd.conf
-rw-r--r-- 1 root root 558 26. Dez 19:52 mpd.conf
 ~/.mpd% ls -l
insgesamt 2828
-rw-r--r-- 1 thomas thomas 1392266 22. Dez 22:43 db
-rw------- 1 thomas thomas       0 16. Okt 00:46 error
-rw------- 1 thomas thomas 1484827 22. Dez 22:43 log
-rw-r--r-- 1 thomas thomas       5 27. Dez 17:44 mpd.pid
-rw-r--r-- 1 thomas thomas     112 27. Dez 17:43 mpdstate

I fails to start at boot but I can successfully start it when the computer is running, with:

sudo /etc/rc.d/mpd start

Offline

#13 2008-12-27 20:55:23

thunderogg
Member
From: Rio de Janeiro
Registered: 2008-07-13
Posts: 172

Re: MPD fails at boot time

OK, I see. Everything is as it should except that it isn't working. smile The rt2680 is a wifi thingie, isn't it? And everything worked before? Sounds like a conflict at startup time. Can't you start mpd a bit later? Either by putting @mpd in the DAEMON, or  "/etc/rc.d/mpd start" in "/etc/rc.local". Try to put "sleep [seconds]" before it to delay the launch further. I don't know ... maybe it's worth a try.

Offline

#14 2008-12-27 21:26:53

thunderogg
Member
From: Rio de Janeiro
Registered: 2008-07-13
Posts: 172

Re: MPD fails at boot time

Or you may start it automatically after login ...

Offline

#15 2008-12-28 00:07:15

sm4tik
Member
From: Finland, Jyväskylä
Registered: 2006-11-05
Posts: 248
Website

Re: MPD fails at boot time

tehabe wrote:

My full mpd.conf. I don't understand the connection myself. I only know the problem started when began to use the stock kernel. I did this because the my kernel before that didn't like my udev and broke the symlinks for the DVD drive.
<snip>

Hi,

just noticed your conf file is missing a quotation mark in
port                  "6600" <--there
..that is, if that is a copy/paste of your config, of course.

Cheers

Offline

#16 2008-12-28 00:57:39

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: MPD fails at boot time

tehabe wrote:
sand_man wrote:

driver_options "period_size=50000;use_mmap=true"

Is that part necessary?ฆ

It should reduce the load on the processor I didn't see any difference.

All directories exist.

Currently it only fails when I boot the computer, when the computer is up and running I can start mpd via the start script.

I updated the kernel yesterday to 2.6.28 and it started okay but when I installed the AUR package rt2680 it failed again. I now it makes no sense whatsoever.

I have the same problem as this but when I shutdown (shutdown hangs). Booting is fine. I still haven't found out what is causing it and the only solution I found is to pkill mpd in rc.local.shutdown
This doesn't help you though.


neutral

Offline

#17 2008-12-29 20:27:40

tehabe
Member
Registered: 2008-10-14
Posts: 82

Re: MPD fails at boot time

sm4tik wrote:

just noticed your conf file is missing a quotation mark in
port                  "6600" <--there
..that is, if that is a copy/paste of your config, of course.

That would have been to easy, so it didn't solve my problem.

Offline

#18 2008-12-29 20:57:55

string
Member
Registered: 2008-11-03
Posts: 286

Re: MPD fails at boot time

Try:

music_directory       "/home/thomas/music"
playlist_directory    "/home/thomas/playlists"
db_file               "/home/thomas/.mpd/db"
log_file              "/home/thomas/.mpd/log"
error_file            "/home/thomas/.mpd/error"
pid_file              "/home/thomas/.mpd/mpd.pid"
state_file            "/home/thomas/.mpd/mpdstate"
user                  "thomas"
bind_to_address       "127.0.0.1"
port                  "6600"
filesystem_charset    "UTF-8"

mixer_type "alsa"
mixer_device "default"
mixer_control "PCM"

audio_output {
    type "alsa"
    name "ALSA audio output"
    driver_options "period_size=50000;use_mmap=true"
    }

A side note: do you realize there is a `mpd` user on your system and that you should probably use -that- as the user as which mpd should run?

Offline

#19 2008-12-29 23:46:28

sm4tik
Member
From: Finland, Jyväskylä
Registered: 2006-11-05
Posts: 248
Website

Re: MPD fails at boot time

I'm not absolutely sure about this, but it seem to me there is no "driver_options" available anymore in mpc.conf. Check the mpd.conf man for details. In the meanwhile, you can try

audio_output {
    type "alsa"
    name "ALSA audio output"
    period_time "50000"
    use_mmap "yes"
    }

Cheers

Last edited by sm4tik (2008-12-29 23:47:03)

Offline

#20 2008-12-30 00:22:42

tehabe
Member
Registered: 2008-10-14
Posts: 82

Re: MPD fails at boot time

I downgraded from the git to "current" stable 0.13.2 and recreated the hole library. Now it seems to work again.

Offline

#21 2008-12-30 00:35:45

sm4tik
Member
From: Finland, Jyväskylä
Registered: 2006-11-05
Posts: 248
Website

Re: MPD fails at boot time

tehabe wrote:

I downgraded from the git to "current" stable 0.13.2 and recreated the hole library. Now it seems to work again.

You might know 0.14 is the current stable, so be prepared to face your problem again once mpd gets updated in extra. Using git here and had a few problems getting it going a while back, but once I got the config figured out, it's all good! Just see the man pages once you upgrade smile

Offline

#22 2009-01-14 15:51:29

tehabe
Member
Registered: 2008-10-14
Posts: 82

Re: MPD fails at boot time

sm4tik wrote:

You might know 0.14 is the current stable, so be prepared to face your problem again once mpd gets updated in extra.

So, 0.14 is in testing and I got my problem back. But I also got some new information on the problem. This is the output of mpd on boot up.

binding to address for 127.0.0.1
can't lookup host "127.0.0.1" at line 9: Address family for hostname not supported

One possibility for a work around is, to remove this line from the mpd.conf:

bind_to_address "127.0.0.1"

Last edited by tehabe (2009-01-14 21:44:36)

Offline

#23 2009-01-21 20:41:30

cxp
Member
Registered: 2009-01-21
Posts: 2

Re: MPD fails at boot time

tehabe wrote:

Hi,

when I boot my computer I get when the mpd is loading the message that is failed:

it looked a little bit like this:

/etc/rc.d/mpd, Line 6 abort /usr/bin/mpd /etc/mpd.conf &> /dev/null

This happend only when I use the stock kernel. Only change to the kernel is the AUR package rt2860 for my wifi card.

I could solve this problem for me.
It happened when I update the mpd to 0.14.
The problem is the config file. In version 0.14, there isn't any option for http_buffer_size or something like this.
I removed this line and mpd starts without any problems.

Offline

#24 2009-01-21 20:44:51

xstaticxgpx
Member
Registered: 2008-10-22
Posts: 48

Re: MPD fails at boot time

cxp wrote:
tehabe wrote:

Hi,

when I boot my computer I get when the mpd is loading the message that is failed:

it looked a little bit like this:

/etc/rc.d/mpd, Line 6 abort /usr/bin/mpd /etc/mpd.conf &> /dev/null

This happend only when I use the stock kernel. Only change to the kernel is the AUR package rt2860 for my wifi card.

I could solve this problem for me.
It happened when I update the mpd to 0.14.
The problem is the config file. In version 0.14, there isn't any option for http_buffer_size or something like this.
I removed this line and mpd starts without any problems.

that's what fixed it for me as well.

Offline

#25 2009-01-22 17:28:44

cxp
Member
Registered: 2009-01-21
Posts: 2

Re: MPD fails at boot time

...funny thing, now MPD starts, but without PulseAudio Output. Either I have sound, but MPD uses Alsa or something else, or I have no sound.

My Config is everytime the same,

audio_output {
type "pulse"
name "MPD PulseAudio Output"
server "localhost"
sink "alsa_output.pci_8086_27d8_alsa_plackback_0

or only

audio_output {
type "pulse"
name "MPD PulseAudio Output"
#server "localhost"
#sink "alsa_output.pci_8086_27d8_alsa_plackback_0

In the logs, I can find that mpd's connection with pulseaudio is refused.

I have added mpd to the following groups "pulse, audio, pulse-rt, pulse-access" and activated "network access" and "not force authentication" but nothing helps.

When MPD uses Alsa or something else, there isn't any stream in the streamlist from pulseaudio.

Offline

Board footer

Powered by FluxBB