You are not logged in.

#1 2005-12-02 22:22:42

whargoul
Member
From: Odense, Denmark
Registered: 2005-04-04
Posts: 546

MPD: Error [12]: host "localhost" not found [solve

Allright I got this real strange problem with MPD, and I just can't figure out, what the problem is. I use "ncmpc" to play my music, but I get this when Itry to start:

whargoul:~$ ncmpc
Unknown configuration parameter: text
Unknown configuration parameter: brightblack,
Unknown configuration parameter: brightmagenta,
error [12]: host "localhost" not found

But I can't find anything wrong in /etc/mpd.conf

# MPD CONFIG FILE
# For a full description of all config parameters,
# Check the mpd man page, "man mpd".

##################### REQUIRED ###########################
port             "6600"
music_directory     "~/mp3"
playlist_directory     "~/.mpd/playlists"
log_file         "~/.mpd/mpd.log"
error_file         "~/.mpd/mpd.error"
##########################################################

##########################################################
# EVERYTHING ELSE IS OPTIONAL
##########################################################

################# FILESYSTEM SETTINGS ####################
#
# If the names of files or directories are
# not correctly displayed then set the
# following to the filesystem coding.
#
#    Usually this is either:
#    ISO-8859-1 or UTF-8
#
# After changing the filesystem_charset
# you will need to recreate the db:
#    mpd --create-db
#
filesystem_charset "UTF-8"
#
##########################################################

#################### OPTIONAL FILES ######################
#
# Location of DB file
#
db_file        "~/.mpd/mpd.db"
#
# The state file (if set) will be a file
# for storing all current information
# (playlist, playing/paused, etc...) from
# the last MPD session. This will be used
# to recreate your last MPD session after
# restart.
#
state_file        "~/.mpd/mpdstate"
#
##########################################################


################### VOLUME MIXER #########################
#
# Examples:
# ALSA Mixer
mixer_type        "alsa"
mixer_device        "/dev/mixer"
mixer_control        "PCM"
#
# OSS Mixer
#mixer_type        "oss"
#mixer_device         "/dev/mixer"
#mixer_control        "PCM"
#
# Software Mixer
#mixer_type        "software"
#
##########################################################


################## AUDIO OUTPUT ##########################
#
# OSS Audio Output
#ao_driver         "oss"
#ao_driver_options     "dsp=/dev/dsp"
#
# ALSA Audio Output
ao_driver        "alsa09"
ao_driver_options    "dev=hw:0,0"
#
# Set this if you have problems
# playing audio files.
# This will resample your music so
# that it comes out at the set rate.
#
#audio_output_format    "44100:16:2"
#
# You should not need mess with
# this value unless you know
# what you're doing.
#
#audio_write_size    "1024"
#
##########################################################

################# REPLAYGAIN #############################
#
# Use Replay Gain (album or title)
#    http://www.replaygain.org
#
#replaygain        "album"
#
# Sets the pre-amp used for files that have replaygain
# info.  Valid values are between -15 to 15 (in dB).
#
#replaygain_preamp    "0"
#
##########################################################


################ OUTPUT BUFFER SETTINGS ##################
#
# You should not need to mess with this
# unless you know what you're doing.
#
#audio_buffer_size    "2048"
#
# This means exactly what it says, it will
# buffer your file up to the percentage of
# the buffer before it begins playing.
#
#buffer_before_play     "25%"
#
##########################################################


################### HTTP PROXY ###########################
#
# http_proxy_host    "proxy.isp.com"
# http_proxy_port    "8080"
# http_proxy_user    "user"
# http_proxy_password    "password"
#
##########################################################


################# SECURITY SETTINGS ######################
#
# It is encouraged to run MPD as
# non-superuser.  If you start mpd as root
# (for example, in an init script), set
# this value, then  mpd will drop root priveleges
# and runs as the user specified.
#
user         "whargoul"
#
# Set this value if you only have one
# address you want to allow connection to.
#
bind_to_address     "127.0.0.1"
#
# If you want to setup MPD to use
# passwords set them here
#
#password         "password1@read,add,control,admin"
#password         "password2@read"
#
# Specify permissions used by default when no password is
# given by for a connection/client.
#
#default_permissions    "read,add,control,admin"
#
##########################################


################ MISCELLANEOUS OPTIONS ###################
#
# This setting exists as precaution against attacks.
#
#max_playlist_length     "16384"
#
# Valid options are "default", "secure" or "verbose".
#log_level        "default"
#
#connection_timeout     "60"
#
# This should be fine for 2-3 people using clients
# at the same time.
#
#max_connections     "5"
#
# No need to change these unless you know better.
#
#max_command_list_size     "2048"
#max_output_buffer_size "2048"
#
# This will make playlists compatible with normal music
# players.
#
#save_absolute_paths_in_playlists "no"
#
##########################################################

I have looked in the error-log, and it says something completely different:

ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
Nov  2 23:15 : problems problems attaching alsa mixer: No such file or directory
Nov  2 23:15 : using software volume
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
Nov  9 20:46 : Max Connections Reached!
Nov  9 20:47 : Max Connections Reached!
Nov  9 20:47 : Max Connections Reached!
Nov  9 20:48 : Max Connections Reached!
Nov  9 20:50 : Max Connections Reached!
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:739:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
Dec  2 23:01 : cannot init suplementary groups of user whargoul: Operation not permitted
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
Dec  2 23:01 : problems problems attaching alsa mixer: No such file or directory
Dec  2 23:01 : using software volume
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer
ALSA lib control.c:817:(snd_ctl_open_noupdate) Invalid CTL /dev/mixer

Though /dev/mixer does exist.

And now the really strange thing is, when I start "GLurp", the music will play? Though "Conky" says "MPD not responding".

I Have no idea of what this could be, since I never had this problem.

EDIT:

I found out that I could put "mpd_host" in, to define witch host Conky should look after. Like this:

# set MPD host, and MPD port
mpd_host 127.0.0.1
mpd_port 6600

Arch - It's something refreshing

Offline

#2 2005-12-03 07:44:17

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: MPD: Error [12]: host "localhost" not found [solve

Is loopback up?

Offline

#3 2005-12-03 08:53:09

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: MPD: Error [12]: host "localhost" not found [solve

I assume you have started mpd in rc.conf (daemons)

although if you are using glurp you are connecting to mpd anyway

Have had problem with conky & mpd maybe a clash with some other app

Sorry I cannot be more help....


Mr Green

Offline

#4 2005-12-03 10:57:02

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

Re: MPD: Error [12]: host "localhost" not found [solve

I'm playing with accessing MPD over Bluetooth and occasionally I've been getting errors similar to this but simply retrying fixes it.

Something for you to try, in my mpd.conf, mixer_device is set to "default", the line that sets it to /dev/mixer is commented out. Might be worth a try smile

Offline

#5 2005-12-03 15:07:47

whargoul
Member
From: Odense, Denmark
Registered: 2005-04-04
Posts: 546

Re: MPD: Error [12]: host "localhost" not found [solve

#Mr. Green

Yeah it could be Conky, but it still seems strange that ncmpc cannot find localhost and Glurp can.

#Cam

I wil try that. Thank you. smile


Arch - It's something refreshing

Offline

#6 2005-12-03 23:55:06

whargoul
Member
From: Odense, Denmark
Registered: 2005-04-04
Posts: 546

Re: MPD: Error [12]: host "localhost" not found [solve

emjay wrote:

It seems your problem is with ncmpc and not with mpd, which explains why music playing works with glurp.
If you are using a custom config file for ncmpc (maybe in /etc/ncmpc/config) try renaming that and starting it with the default config.

Nope, didn't work. It seems strange since I never had this problem. Also I am using mpdcontroller with adesklets. So both conky, ncmpc and mpscontroller won't work.


Arch - It's something refreshing

Offline

#7 2005-12-04 00:02:08

whargoul
Member
From: Odense, Denmark
Registered: 2005-04-04
Posts: 546

Re: MPD: Error [12]: host "localhost" not found [solve

After I played at little bit with gmpc, I found i could set "--host=127.0.0.1" in ncmpc, and it seems to work allright now. Now I just have to figure out how to fix it in Conky and mpdcontroller.


Arch - It's something refreshing

Offline

#8 2005-12-04 02:21:01

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: MPD: Error [12]: host "localhost" not found [solve

What does your /etc/hosts file look like?


I am a gated community.

Offline

#9 2005-12-04 02:26:07

whargoul
Member
From: Odense, Denmark
Registered: 2005-04-04
Posts: 546

Re: MPD: Error [12]: host "localhost" not found [solve

stonecrest wrote:

What does your /etc/hosts file look like?

It looks like this:

whargoul:~$ cat /etc/hosts                                              
#
# /etc/hosts: static lookup table for host names
#

#<ip-address>    <hostname.domain.org>    <hostname>
127.0.0.1    home.matrix.dk      matrix

# End of file

Arch - It's something refreshing

Offline

#10 2005-12-04 03:22:27

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: MPD: Error [12]: host "localhost" not found [solve

Well, that is why localhost can't be found, as it's nowhere in your hosts file.


I am a gated community.

Offline

#11 2005-12-09 18:38:56

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: MPD: Error [12]: host "localhost" not found [solve

OMG roll

Offline

#12 2005-12-10 23:54:58

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: MPD: Error [12]: host "localhost" not found [solve

I never realized this myself, but you can have more than one alias in your hosts file.  I found that some programs look for <code>localhost</code> and others look for whatever your server name is.  To satisfy both of those situations, just put your server's name after <code>localhost</code> so you'll have something like this:

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1       home.matrix.dk          localhost matrix

Offline

#13 2005-12-10 23:59:48

whargoul
Member
From: Odense, Denmark
Registered: 2005-04-04
Posts: 546

Re: MPD: Error [12]: host "localhost" not found [solve

Do I then have to restart?


Arch - It's something refreshing

Offline

Board footer

Powered by FluxBB