You are not logged in.

#1 2009-12-10 02:51:28

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

[Solved, sort of.] network dnsmasq mpd <- mpd fails during startup

So the daemons chain I have is:
DAEMONS=(syslog-ng @network @dnsmasq hal oss @mpd @crond)
but when it goes in this order mpd will fail to load on startup. I tried the @background method because it fails with just "mpd" as well so I was trying to give it more time to wait for network and dnsmasq, even add the non-backgrounded "hal" and "oss" to give it more time. Anyway, after I boot with this I will have to manually unload dnsmasq and network, restart them and then start mpd and it will work. I don't understand. I know network doesn't take THAT long to start and I'm afraid dnsmasq is faster than network, even @backgrounded.. so it may conflict a little, I don't know. Is there a way I can load dnsmasq and mpd ONLY after network has started? Or am I approaching this the wrong way?

Last edited by milomouse (2009-12-10 07:11:42)

Offline

#2 2009-12-10 06:04:47

mjheagle8
Member
From: /home/mjheagle8
Registered: 2009-07-12
Posts: 186

Re: [Solved, sort of.] network dnsmasq mpd <- mpd fails during startup

do you start mpd as user? or do you start the daemon once you log in?
try unbackgrounding it, and see what the error message is.


Desktop/Laptop - DWM :: VM - screen
Registered Linux User Number 483137 :: Victory! :: GitHub

Offline

#3 2009-12-10 07:08:16

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: [Solved, sort of.] network dnsmasq mpd <- mpd fails during startup

No problem: @network mpd @dnsmasq
Problem: @network @dnsmasq mpd

With the latter, the error spews a quick: line 6: /usr/bin/mpd /etc/mpd.conf &> /dev/null
or something like that, and then continues to the next daemons. This is during start-up with daemon mode through rc.conf

I guess if I wanted to have dnsmasq and then mpd load, I could make my own "daemon" script for combining network/dnsmasq/mpd or put something in my  .zshrc (or, if existing, .zlogin) so when I logged in it would check for network and then load dnsmasq-> check for dnsmasq -> load mpd (if no network, do not load dnsmasq but continue to load mpd) This would just be a startup thing though, as the regular "daemon" scripts would still shut them down/re{start individually.

So, [Solved] for now by changing daemon startup. Might mess with the previous idea later. Still haven't figured out why it fails with dnsmasq trying to load first.

Last edited by milomouse (2009-12-10 07:12:21)

Offline

#4 2009-12-10 17:24:13

mjheagle8
Member
From: /home/mjheagle8
Registered: 2009-07-12
Posts: 186

Re: [Solved, sort of.] network dnsmasq mpd <- mpd fails during startup

i had that problem before, it was because i didnt have the mpd config file completely correct. it may help if you check the wiki and tinker with the config a bit, that's what worked for me. smile


Desktop/Laptop - DWM :: VM - screen
Registered Linux User Number 483137 :: Victory! :: GitHub

Offline

#5 2009-12-11 06:10:51

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: [Solved, sort of.] network dnsmasq mpd <- mpd fails during startup

I don't know if it's the config or if it's dnsmasq directly. My mpd.conf is

  1 ## /etc/mpd.conf
  2 ## milomouse
  3 
  4 music_directory         "/home/milo/muzk"
  5 playlist_directory      "/home/milo/.mpd/playlists"
  6 db_file                 "/home/milo/.mpd/mpddb"
  7 pid_file                "/home/milo/.mpd/mpd.pid"
  8 state_file              "/home/milo/.mpd/state"
  9 log_file                "/var/log/mpd/mpd.log"
 10 error_file              "/var/log/mpd/error.log"
 11 user                    "milo"
 12 bind_to_address         "neverland"
 13 port                    "6600"
 14 log_level               "secure"
 15 samplerate_converter    "Best Sinc Interpolator"
 16 replaygain              "track"
 17 volume_normalization    "no"
 18 filesystem_charset      "UTF-8"
 19 id3v1_encoding          "ISO-8859-1"
 20 follow_outside_symlinks "no"
 21 follow_inside_symlinks  "no"
 22 save_absolute_paths_in_playlists "yes"
 23 
 24 audio_output {
 25         type                    "oss"
 26         name                    "oss device"
 27         device                  "/dev/dsp"
 28         format                  "44100:16:2"
 29 }
 30 
 31 mixer_type                      "software"
 32 mixer_device                    "/dev/mixer"
 33 mixer_control                   "PCM"

Maybe it's "bind_to_address".., or maybe not. Should it be 127.0.0.1? Bah. It's almost like dnsmasq and mpd are battling for something in the network (as it's trying to configure) and if mpd isn't first in the list it will fail because dnsmasq changes something before mpd can get to it. I don't know. Because if I do it manually and load network, make sure it's loaded, then load dnsmasq, make sure it's loaded, and then load mpd it will work. So the ->order-> is fine, but as long as network isn't loaded yet and dnsmasq loads before mpd, mpd refuses to load.

Last edited by milomouse (2009-12-11 06:12:55)

Offline

#6 2009-12-11 13:22:29

Crows
Member
From: Wales
Registered: 2008-09-05
Posts: 92

Re: [Solved, sort of.] network dnsmasq mpd <- mpd fails during startup

I get that error on occasion. Usually after I've resumed from sleeping. Only started happening after one of the recent updates...

Offline

Board footer

Powered by FluxBB