You are not logged in.

#1 2008-08-22 04:47:10

chris_ak
Member
Registered: 2008-03-25
Posts: 64

MPD Problems [SOLVED]

Wow this has been frusterating.  MPD starts fine, but I cannot get sonata to connect.  When I try to start sonata from the terminal I get "(-2, 'Name or service not known')".  NCMPC gives me "error [12]: host "localhost" not found".  I'm posting my mpd.conf and rc.conf as I'm sure the problem lies somehwere in there.  Any help is greatly appreciated.  Thanks!

/etc/mpd.conf

# An example configuration file for MPD
# See the mpd.conf man page for a more detailed description of each parameter.

######################## REQUIRED PATHS ########################
music_directory                 "~/Music"
playlist_directory              "~/playlists"
db_file                         "~/mpd.db"
log_file                        "~/mpd.log"
error_file                      "~/mpd.error"

#music_directory                 "/home/chris/Music"
#playlist_directory              "/var/lib/mpd/playlists"
#db_file                         "/var/lib/mpd/mpd.db"
#log_file                        "/var/log/mpd/mpd.log"
#error_file                      "/var/log/mpd/mpd.error"

# Note: ~ is the home directory of user set in the "user" option
################################################################


######################## OPTIONAL PATHS ########################
#
# If you wish to use mpd --kill to stop MPD, then you must
# specify a file here in which to store MPD's process ID.
#
pid_file                        "~/.mpd/mpd.pid"
#pid_file                        "/var/run/mpd/mpd.pid"
#
# 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/mpdstate"
#state_file                      "/var/lib/mpd/mpdstate"
#
################################################################


######################## 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                            "chris"

# The address and port to listen on.
#
bind_to_address                 "darkstar"
#bind_to_address                 "darkstar"
#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
#        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"
#
################################################################


############################# MIXER ############################
#
# MPD needs to know what mixer settings to change when you
# adjust the volume.  If you don't specify one here, MPD will
# pick one based on which ones it was compiled with support for.
#
# An example for controlling an ALSA mixer:
#
#mixer_type                      "alsa"
#mixer_device                    "default"
#mixer_control                   "PCM"
#
# An example for controlling an OSS mixer:
#
#mixer_type                      "oss"
#mixer_device                    "/dev/mixer"
#mixer_control                   "PCM"
#
# If you want MPD to adjust the volume of audio sent to the
# audio outputs, you can tell it to use the software mixer:
#
#mixer_type                      "software"
#
################################################################


######################### NORMALIZATION ########################
#
# Specifies the type of ReplayGain to use.  Can be "album" or
# "track".  ReplayGain will not be used if not specified.  See
# <http://www.replaygain.org> for more details.
#
#replaygain                      "album"
#
# Sets the pre-amp used for files that have ReplayGain tags.
#
#replaygain_preamp               "0"
#
# Enable on the fly volume normalization.  This will cause the
# volume of all songs played to be adjusted so that they sound
# as though they are of equal loudness.
#
#volume_normalization            "no"
#
################################################################


########################### BUFFERING ##########################
#
# The size of the buffer containing decoded audio.  You probably
# shouldn't change this.
#
#audio_buffer_size               "2048"
#
# How much of the buffer to fill before beginning to play.
#
#buffer_before_play              "0%"
#
# Similar options for the HTTP stream buffer.  If you hear
# skipping while playing HTTP streams, you may wish to increase
# these.
#
#http_buffer_size                "128"
#http_prebuffer_size             "25%"
#
################################################################


########################### HTTP PROXY #########################
#
# Specifies the HTTP proxy to use for playing HTTP streams.
#
#http_proxy_host                 "proxy.isp.com"
#http_proxy_port                 "8080"
#http_proxy_user                 "user"
#http_proxy_password             "password"
#
################################################################


############################# LIMITS ###########################
#
# These are various limits to prevent MPD from using too many
# resources.  You should only change them if they start
# restricting your usage of MPD.
#
#connection_timeout              "60"
#max_connections                 "5"
#max_playlist_length             "16384"
#max_command_list_size           "2048"
#max_output_buffer_size          "8192"
#
################################################################


###################### CHARACTER ENCODINGS #####################
#
# If file or directory names do not display correctly, then you
# may need to change this.  In most cases it should be either
# "ISO-8859-1" or "UTF-8".  You must recreate your database
# after changing this (use mpd --create-db).
#
#filesystem_charset              "ISO-8859-1"
#
# The encoding that ID3v1 tags should be converted from.
#
#id3v1_encoding                  "ISO-8859-1"
#
################################################################


######################### OTHER OPTIONS ########################
#
# The metadata types MPD will recognize.
#
#metadata_to_use                  "artist,album,title,track,name,genre,date,composer,performer,disc"
#
# Enable this if you wish to use your MPD created playlists in
# other music players.
#
#save_absolute_paths_in_playlists "no"
#
################################################################

/etc/rc.conf:

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# 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"
TIMEZONE="Alaska"
KEYMAP="us"
CONSOLEFONT="ter-v16b"
CONSOLEMAP=
USECOLOR="yes"

#
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# Scan hardware and load required modules at bootup
MOD_AUTOLOAD="yes"
# Module Blacklist - modules in this list will never be loaded by udev
MOD_BLACKLIST=()
#
# Modules to load at boot-up (in this order)
#   - prefix a module with a ! to blacklist it
#
MODULES=(powernow-k8 cpufreq_ondemand cpufreq_powersave forcedeth !bcm43xx b43 snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-intel soundcore)
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

#
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
HOSTNAME="darkstar"
#
# 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
#
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
#
lo="lo 127.0.0.1"
eth0="dhcp"
INTERFACES=(eth0 lo)

#
# 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 *.*.*"
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-profiles
#
#NET_PROFILES=(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 @laptop-mode @network @netfs @crond @hal @fam @alsa gdm)


# End of file

Last edited by chris_ak (2008-08-22 05:44:19)

Offline

#2 2008-08-22 04:55:31

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: MPD Problems [SOLVED]

In mpd.conf you should use "localhost" instead of "darkstar" in the "bind_to_address" option, I think.

Offline

#3 2008-08-22 05:02:23

chris_ak
Member
Registered: 2008-03-25
Posts: 64

Re: MPD Problems [SOLVED]

fwojciec wrote:

In mpd.conf you should use "localhost" instead of "darkstar" in the "bind_to_address" option, I think.

No dice, thanks though.  I get "can't lookup host "localhost" at line 50" when I try to start mpd.  if I have bind_to_address=darkstar mpd starts fine but sonata will not connect.  If I start ncmpc with the option --host=darkstar I can get it working.  But I dont' remember having to use that option to start any mpd frontend.  I'd like to be able to use sonata or ncmpc without specifying that option.

Offline

#4 2008-08-22 05:26:40

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: MPD Problems [SOLVED]

Is your /etc/hosts configured correctly?
http://wiki.archlinux.org/index.php/Beg … tc.2Fhosts

EDIT: Actually, in my config I have:

bind_to_address                 "127.0.0.1"

Last edited by fwojciec (2008-08-22 05:32:18)

Offline

#5 2008-08-22 05:39:53

chris_ak
Member
Registered: 2008-03-25
Posts: 64

Re: MPD Problems [SOLVED]

fwojciec wrote:

Is your /etc/hosts configured correctly?
http://wiki.archlinux.org/index.php/Beg … tc.2Fhosts

Ah ha!  I never would have thought to look at that.  I forgot to have the additional "localhost" right before darkstar:

#
# /etc/hosts: static lookup table for host names
#

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

# End of file

Thanks so much for your help!  The headache is already going away.

Offline

#6 2008-08-22 05:46:29

arch0r
Member
From: From the Chron-o-John
Registered: 2008-05-13
Posts: 597

Re: MPD Problems [SOLVED]

uncomment the port. bind_to_address "127.0.0.1"

Offline

Board footer

Powered by FluxBB