You are not logged in.

#1 2011-01-26 15:38:55

arthd
Member
Registered: 2009-03-17
Posts: 24

MPD fails to start upon boot

When I boot up and the mpd daemon is supposed to start, it returns an error

/etc/rc.d/mpd       line 6     1449 aborted
/usr/bin/mpd    /etc/mpd.conf &> /dev/null [FAIL]

However, when I start it after the computer has booted up, it works without a problem. It's only during bootup.

Offline

#2 2011-01-26 16:22:18

ilusi0n
Member
Registered: 2010-06-09
Posts: 187

Re: MPD fails to start upon boot

It says there is a error on line 6 of the daemon. Did you change anything there? Or you checked what that line have?

Last edited by ilusi0n (2011-01-26 16:22:44)

Offline

#3 2011-01-26 16:23:44

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: MPD fails to start upon boot

you need to start network before you start mpd in the DAEMONS array. Are you doing that?


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#4 2011-01-26 16:24:02

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,690

Re: MPD fails to start upon boot

What is your DAEMONS array in /etc/rc.conf ?? It might require that alsa be started first.  It might also want the network to have been started, but I am not sure.

edit: Arrg.... beat by 42 seconds.  I hate it when that happens.

Last edited by ewaller (2011-01-26 16:25:46)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2011-01-26 16:27:35

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: MPD fails to start upon boot

ewaller wrote:

edit: Arrg.... beat by 42 seconds.  I hate it when that happens.

Do your math again. Its 18 seconds. Just so you will hate it even more wink


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#6 2011-01-26 16:28:21

arthd
Member
Registered: 2009-03-17
Posts: 24

Re: MPD fails to start upon boot

Nope, didn't change anything there, and it's odd as it does start when I manually /etc/rc.d/mpd start

Offline

#7 2011-01-26 16:41:30

arthd
Member
Registered: 2009-03-17
Posts: 24

Re: MPD fails to start upon boot

Even if it starts after network it won't start, and when I disable network and then reboot and manually /etc/rc.d/mpd start it works as well.

Offline

#8 2011-01-26 16:52:02

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: MPD fails to start upon boot

Can you post your DAEMONS array?


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#9 2011-01-26 16:58:54

arthd
Member
Registered: 2009-03-17
Posts: 24

Re: MPD fails to start upon boot

DAEMONS=(syslog-ng network alsa mpd dbus netfs crond hal)

Offline

#10 2011-01-26 17:01:53

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: MPD fails to start upon boot

and your hostname is set up correctly in the rc.conf, /etc/hosts and mpd.conf?


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#11 2011-01-26 17:05:47

arthd
Member
Registered: 2009-03-17
Posts: 24

Re: MPD fails to start upon boot

The hostname is set up correctly in rc.conf and hosts, but I didn't set it in mpd.conf, as specifying audio output doesn't seem to be necessary to play back audio.

Offline

#12 2011-01-26 17:08:15

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: MPD fails to start upon boot

now you have me beat. Off the top of my head, try starting dbus and hal before mpd. I honestly do not think it would matter since mpd, AFAIK, is not dependent on either of them, but its worth a try.
Make it like this

DAEMONS=(syslog-ng network dbus hal alsa mpd netfs crond) 

I think dbus does start hal on its own, so you might not need to start it explicitly. Or at least that was the case a while back.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#13 2011-01-26 17:12:25

arthd
Member
Registered: 2009-03-17
Posts: 24

Re: MPD fails to start upon boot

I gave it a try, but sadly it didn't help.

Offline

#14 2011-01-26 17:12:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,690

Re: MPD fails to start upon boot

Inxsible wrote:

Do your math again. Its 18 seconds. Just so you will hate it even more wink

Time for another cup of coffee for me :-/

Back on topic.  Any chance that /etc/conf.d/mpd is set to use remote files that will require netfs? (i.e. is your library on this machine, or elsewhere on the network?)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#15 2011-01-26 17:15:24

arthd
Member
Registered: 2009-03-17
Posts: 24

Re: MPD fails to start upon boot

It's all on this machine, so starting network before mpd probably shouldn't be necessary either.

Offline

#16 2011-01-26 17:17:54

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: MPD fails to start upon boot

arthd wrote:

It's all on this machine, so starting network before mpd probably shouldn't be necessary either.

Nope, you are wrong on that one. mpd is a client server architecture. you would need a client like ncmpcc or some gui mpd client like sonata to be able to connect to the mpd server. Therefore the network definitely needs to be up and running before mpd can.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#17 2011-01-26 17:19:13

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,690

Re: MPD fails to start upon boot

Were this me, I would consider temporarily changing /etc/rc.d/mpd to not send the output of the daemon to /dev/null (around line 10 IIRC) and instead send it someplace where you can see it (a console, a file someplace, whatever)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#18 2011-01-26 17:23:10

ilusi0n
Member
Registered: 2010-06-09
Posts: 187

Re: MPD fails to start upon boot

Inxsible wrote:

Therefore the network definitely needs to be up and running before mpd can.

Really? I have almost sure that mpd connects before I even get network access. Because before I login I don't have internet but mpd daemon have already started. And my music is on the computer. I can be wrong though...

Last edited by ilusi0n (2011-01-26 17:24:33)

Offline

#19 2011-01-26 17:26:45

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: MPD fails to start upon boot

by network i don't mean the internet, but the network driver which controls your connection needs to be up. The mpd client will talk to the mpd server using "localhost" if they are on the same machine. So internet is not needed but the lan needs to be up.

easy to test. I am not on my Arch box so I can't test this.

# /etc/rc.d/mpd stop
# /etc/rc.d/network stop
# /etc/rc.d/mpd start

See what it tells you.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#20 2011-01-26 17:45:02

arthd
Member
Registered: 2009-03-17
Posts: 24

Re: MPD fails to start upon boot

ewaller wrote:

Were this me, I would consider temporarily changing /etc/rc.d/mpd to not send the output of the daemon to /dev/null (around line 10 IIRC) and instead send it someplace where you can see it (a console, a file someplace, whatever)

Good idea, I should've done that right away.

Bootup:

listen: bind to '0.0.0.0:6600' failed: Address already in use (continuing anyway, because binding to '[::]:6600' succeeded)
output: No "audio_output" defined in config file
output: Attempt to detect audio output device
output: Attempting to detect a alsa audio device
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4633:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Error opening default ALSA device: No such file or directory
output: Attempting to detect a oss audio device
oss: Error opening OSS device "/dev/dsp": Permission denied
oss: Error opening OSS device "/dev/sound/dsp": No such file or directory
output: Attempting to detect a pulse audio device
Assertion 'm' failed at pulse/thread-mainloop.c:172, function pa_threaded_mainloop_lock(). Aborting.

Start after boot

listen: bind to '0.0.0.0:6600' failed: Address already in use (continuing anyway, because binding to '[::]:6600' succeeded)
output: No "audio_output" defined in config file
output: Attempt to detect audio output device
output: Attempting to detect a alsa audio device
output: Successfully detected a alsa audio device

Seems like it can't detect alsa on boot even though it starts after alsa.

Offline

#21 2011-01-26 17:50:13

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: MPD fails to start upon boot

output: No "audio_output" defined in config file

This tells me that defining an audio_output = ALSA in the config file would circumvent the problem.

However, I still don understand why  it can't detect alsa during bootup. you don't have it backgrounded either. Strange.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#22 2011-01-26 17:55:41

arthd
Member
Registered: 2009-03-17
Posts: 24

Re: MPD fails to start upon boot

Yep, uncommented the ALSA output section and it works now.
Should I tag this as solved or not? It's more of a workaround than a solution.

Offline

#23 2011-01-26 18:01:24

ilusi0n
Member
Registered: 2010-06-09
Posts: 187

Re: MPD fails to start upon boot

Not sure if I'm wrong but commenting the ALSA output will not mean that you have no sound?

edit: nevermind, I though you had commented it and not uncomment...

Last edited by ilusi0n (2011-01-26 18:03:32)

Offline

#24 2011-01-26 18:02:45

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: MPD fails to start upon boot

ilusi0n wrote:

Not sure if I'm wrong but commenting the ALSA output will not mean that you have no sound?

He means that he uncommented the ALSA section in mpd.conf. So alsa was working for all other apps.

He had mpd auto-detect the sound architecture (which for some reason didn't work during boot), but now is defining it in the mpd.conf file and now things work. smile


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#25 2011-01-26 18:06:55

ilusi0n
Member
Registered: 2010-06-09
Posts: 187

Re: MPD fails to start upon boot

Inxsible wrote:
ilusi0n wrote:

Not sure if I'm wrong but commenting the ALSA output will not mean that you have no sound?

He means that he uncommented the ALSA section in mpd.conf. So alsa was working for all other apps.

He had mpd auto-detect the sound architecture (which for some reason didn't work during boot), but now is defining it in the mpd.conf file and now things work. smile

Damn, you answer before I could edit my post. Yeah I misunderstood what he said. Yeah I never though of that. I have alsa uncommented in the mpd.conf as well. So is not a workaround but I think is the way things must be done. But will try and comment to see if I have problems as well. But well glad it work smile

Offline

Board footer

Powered by FluxBB