You are not logged in.

#1 2008-09-01 21:31:21

EpicRag
Member
From: Lisbon/Beja, Portugal
Registered: 2008-09-01
Posts: 8

MPD: no network = no MPD and external drive

Hi everyone.

I'm having some problems with MPD. MPD doesn't start when I'm not connected to a wired network connection, it says "connection refused". Note that I'm using Network-Manager.
Besides that, I'm having some trouble with using MPD on an external drive. I'm trying to automount it by /etc/fstab but it doesn't seem to work.

Thanks in advance for any help!

Here are some of my configuration files:

/etc/mpd.conf

 
######################## REQUIRED PATHS ########################
# You can put symlinks in here, if you like. Make sure that
# the user that mpd runs as (see the 'user' config parameter)
# can read the files in this directory.
music_directory        "/media/Elements/music"
playlist_directory    "/home/rag/music"
db_file            "/home/rag/.mpd/mpd.db"
log_file        "/home/rag/.mpd/mpd.log"
error_file        "/home/rag/.mpd/errors.log"
pid_file        "/home/rag/.mpd/pid"
################################################################


######################## OPTIONAL PATHS ########################
#
# If specified, MPD will save its current state (playlist,
# current song, playing/paused, etc.) at exit.  This will be
# used to restore the session the next time it is run.
#
state_file        "~/.mpd/state"
#
################################################################


######################## DAEMON OPTIONS ########################
#
# If started as root, MPD will drop root privileges and run as
# this user instead.  Otherwise, MPD will run as the user it was
# started by.  If left unspecified, MPD will not drop root
# privileges at all (not recommended).
#
user                            "rag"
#
# The address and port to listen on.
#
bind_to_address                 "127.0.0.1"
port                            "6600"
#
# Controls the amount of information that is logged.  Can be
# "default", "secure", or "verbose".
#
log_level                       "default"
#
################################################################


########################## PERMISSIONS #########################
#
# MPD can require that users specify a password before using it.
# You may specify one ore more here, along with what users who
# log in with that password are allowed to do.
#
#password                        "password@read,add,control,admin"
#
# Specifies what permissions a user who has not logged in with a
# password has.  By default, all users have full access to MPD
# if no password is specified above, or no access if one or
# more passwords are specified.
#
#default_permissions             "read,add,control,admin"
#
################################################################


########################## AUDIO OUTPUT ########################
#
# MPD supports many audio output types, as well as playing
# through multiple audio outputs at the same time.  You can
# specify one or more here.  If you don't specify any, MPD will
# automatically scan for a usable audio output.
#
# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs>
# for examples of other audio outputs.
#
# An example of an ALSA output:
#
audio_output {
        type                    "alsa"
        name                    "My ALSA Device"
#        device                  "hw:0,0"     # optional
    options            "dev=dmixer"
    device            "plug:dmix"
#        format                  "44100:16:2" # optional

#
# An example of an OSS output:
#
#audio_output {
#        type                    "oss"
#        name                    "My OSS Device"
#        device                  "/dev/dsp"   # optional
#        format                  "44100:16:2" # optional
#}
#
# An example of a shout output (for streaming to Icecast):
#
#audio_output {
#        type                    "shout"
#        name                    "My Shout Stream"
#        host                    "localhost"
#        port                    "8000"
#        mount                   "/mpd.ogg"
#        password                "hackme"
#        quality                 "5.0"
#        bitrate                 "128"
#        format                  "44100:16:1"
#        user                    "source"                # optional
#        description             "My Stream Description" # optional
#        genre                   "jazz"                  # optional
#        public                  "no"                    # optional
#}
#
# Force all decoded audio to be converted to this format before
# being passed to the audio outputs.
#
#audio_output_format             "44100:16:2"
#
################################################################

/etc/rc.conf

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="yes"
TIMEZONE="Europe/Lisbon"
KEYMAP="pt-latin9.map.gz"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(skge ipw2200 snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-intel soundcore asus-laptop !asus_acpi)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="asus"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
#lo="lo 127.0.0.1"
#eth0="dhcp"
INTERFACES=(!lo !eth0 !eth1)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng !network hal dhcdbd networkmanager @fam @crond @alsa @mpd)

/etc/hosts

#<ip-address>    <hostname.domain.org>    <hostname>
127.0.0.1    asus.localdomain    localhost asus

/etc/hosts.allow

mpd:127.0.0.1:6600

/etc/hosts.deny

ALL: ALL: DENY

Offline

#2 2009-09-27 10:30:51

Mr. X
Member
From: belgrade, serbia
Registered: 2007-02-28
Posts: 67

Re: MPD: no network = no MPD and external drive

EpicRag wrote:

I'm having some problems with MPD. MPD doesn't start when I'm not connected to a wired network connection, it says "connection refused".

I have the same problem... I'm using Wicd

Offline

#3 2009-09-27 11:10:15

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: MPD: no network = no MPD and external drive

Same problem.... I think it worked back then when I used network or networkmanager but not with WICD. It does start with bind to adress "any" but no program can connect to it. It doesn't need wired network, just some network (For example wireless).
What network daemon are you using?
And for automounting external hdd... What FS is it?


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#4 2009-09-27 14:12:20

davvil
Member
Registered: 2008-05-06
Posts: 165

Re: MPD: no network = no MPD and external drive

Just a guess, as I do not use networkmanager or wicd, but could it be that they do not configure the loopback interface until some network is present (i.e. 127.0.0.1 is not known until there is some oher net connection)?

Offline

#5 2009-09-27 17:15:13

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: MPD: no network = no MPD and external drive

Try adding 'loop' to your MODULES in /etc/rc.conf. This is one of the steps specified clearly in the beginner's guide I believe.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#6 2009-09-27 17:24:27

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: MPD: no network = no MPD and external drive

AFAIK, loop is for loopback mounted filesystems. It shouldn't affect the way MPD works.

I have the same problem here.


(lambda ())

Offline

#7 2009-09-28 13:16:58

davvil
Member
Registered: 2008-05-06
Posts: 165

Re: MPD: no network = no MPD and external drive

There is a loopback device for mounting filesystems (cd images for example) and a loopback network device. I do not know if there is another terminology for refereing to them in a more clear way. The loopback network device is the one responsible for being able to access your computer via 127.0.0.1, which is exactly the address mpd is trying to bind itself to.

Offline

#8 2009-09-28 13:23:12

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: MPD: no network = no MPD and external drive

I had the same problem, I believe it was an IPv6 issue causing it. Adding the IPv6 localhost address (::1) to /etc/hosts and setting bind_to_address to "::1" made it work.

Edit: You're perhaps better off by disabling ipv6 in general. I always make things more complicated than they actually are. tongue

Last edited by Runiq (2009-09-28 13:24:49)

Offline

#9 2009-09-29 18:30:02

samoturk
Member
From: Ljubljana, Slovenia
Registered: 2007-02-12
Posts: 86

Re: MPD: no network = no MPD and external drive

@EpicRag
default configuration of mpd binds mpd to 127.0.0.1. Just comment out the line:
bind_to_address                 "127.0.0.1"

Offline

#10 2009-09-30 01:51:29

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: MPD: no network = no MPD and external drive

samoturk wrote:

@EpicRag
default configuration of mpd binds mpd to 127.0.0.1. Just comment out the line:
bind_to_address                 "127.0.0.1"

Like I said in my other post, mpd starts then, but no client can connect (trying to connect as 127.0.0.1:6600)


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#11 2009-09-30 11:40:08

samoturk
Member
From: Ljubljana, Slovenia
Registered: 2007-02-12
Posts: 86

Re: MPD: no network = no MPD and external drive

You have "lo" disabled in rc.conf. Just delete exclamation mark in front of lo in INTERFACES line.

Offline

#12 2009-10-11 23:10:05

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497
Website

Re: MPD: no network = no MPD and external drive

i had this and corrected it by binding mpd to listen to localhost (127.0.0.1).

actually its working really fine now.


If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.

Offline

Board footer

Powered by FluxBB