You are not logged in.

#1 2008-02-07 23:14:25

koch
Member
From: Germany
Registered: 2008-01-26
Posts: 369

[solved] mpd not connecting to port 6600

hello, i installed mpd with mpc and it gives me this...

[micha@tux ~]$ mpc search artist metallica
MPD_HOST and/or MPD_PORT environment variables are not set
error: problems getting a response from "localhost" on port 6600 : Connection refused

mpd.conf(shortened version)

# 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/micha/musik"
playlist_directory              "/home/micha/.mpd/playlists"
db_file                         "~/.mpd/mpd.db"
log_file                        "~/.mpd/mpd.log"
error_file                      "~/.mpd/mpd.error"


...

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

# The address and port to listen on.
#
bind_to_address                 "127.0.0.1"
#bind_to_address                 "any"
port                            "6600"
#
# Controls the amount of information that is logged.  Can be
# "default", "secure", or "verbose".
#
#log_level                       "default"
#
################################################################


...

########################## 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
}
#

...

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

found no real working stuuff using google or mpdsite/wiki.
any ideas?

Last edited by koch (2008-02-08 13:13:05)

Offline

#2 2008-02-08 00:37:34

nj
Member
Registered: 2007-04-06
Posts: 93

Re: [solved] mpd not connecting to port 6600

Just to make sure, mpd is running (ps aux | grep mpd)?

Offline

#3 2008-02-08 00:44:33

koch
Member
From: Germany
Registered: 2008-01-26
Posts: 369

Re: [solved] mpd not connecting to port 6600

thanks but it does run.

Offline

#4 2008-02-08 02:21:43

nj
Member
Registered: 2007-04-06
Posts: 93

Re: [solved] mpd not connecting to port 6600

You can try running 'netstat -an' to see if there is anything listening on 6600. Try it with mpd both running and stopped to see what changes.

Offline

#5 2008-02-08 02:36:57

koch
Member
From: Germany
Registered: 2008-01-26
Posts: 369

Re: [solved] mpd not connecting to port 6600

this is the beginning. if you need more, please ask.

[micha@tux ~]$ netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:797             0.0.0.0:*               LISTEN
udp        0      0 0.0.0.0:111             0.0.0.0:*
udp        0      0 0.0.0.0:631             0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  2      [ ACC ]     STREAM     LISTENING     16215  /var/run/xdmctl/dmctl-:
0/socket
unix  2      [ ACC ]     STREAM     LISTENING     16204  /tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     16371  /tmp/gpg-IOtzRS/S.gpg-a
gent
unix  2      [ ACC ]     STREAM     LISTENING     16407  /tmp/ksocket-micha/kdei
nit__0
unix  2      [ ACC ]     STREAM     LISTENING     16409  /tmp/ksocket-micha/kdei

...

and

[micha@tux ~]$ mpd -kill
problems opening file -kill for reading: No such file or directory
[micha@tux ~]$

man mpd -> pid-file has to be configured but i am to tired. will do it tomorrow night.

Offline

#6 2008-02-08 02:40:21

miggy
Member
From: MT
Registered: 2007-11-05
Posts: 67

Re: [solved] mpd not connecting to port 6600

you could have this problem if /etc/hosts has 127.0.0.1 set to something other than localhost

Offline

#7 2008-02-08 02:53:48

nj
Member
Registered: 2007-04-06
Posts: 93

Re: [solved] mpd not connecting to port 6600

From your output, nothing is listening on 6600. Here is what mine looks like:

tcp        0      0 127.0.0.1:6600   0.0.0.0:*        LISTEN

Try 'sudo sh /etc/rc.d/mpd restart' or run mpd manually 'mpd --no-daemon --stdout /etc/mpd.conf' and retry netstat.

Offline

#8 2008-02-08 03:54:17

koch
Member
From: Germany
Registered: 2008-01-26
Posts: 369

Re: [solved] mpd not connecting to port 6600

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

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

# End of file

more tomorrow

Last edited by koch (2008-02-08 03:59:53)

Offline

#9 2008-02-08 11:41:50

koch
Member
From: Germany
Registered: 2008-01-26
Posts: 369

Re: [solved] mpd not connecting to port 6600

lo="lo 127.0.0.1"
eth0="dhcp"
INTERFACES=(lo eth0)

the lo-line was missing in rc.conf. now i hear music. google and this board are your friends:D

thanks for your answers

ooops....

[micha@tux ~]$ mpc play ~/musik/tryd/listen/03 - Alone.mp3
skipping: /home/micha/musik/tryd/listen/03
skipping: -
error parsing song numbers from: Alone.mp3
volume: 83%   repeat: off   random: off

do i have to remove all those numbers?

sonata works good.

Offline

#10 2008-02-08 12:02:52

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [solved] mpd not connecting to port 6600

There's a problem with spaces. You need to use quotes when there's a song name that contains spaces.

mpc play "~/musik/tryd/listen/03 - Alone.mp3"

By the way, Alone is one of my favorite songs smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#11 2008-02-08 12:38:45

koch
Member
From: Germany
Registered: 2008-01-26
Posts: 369

Re: [solved] mpd not connecting to port 6600

[micha@tux ~]$ mpc play "~/musik/tryd/listen/03 - Alone.mp3"
error parsing song numbers from: ~/musik/tryd/listen/03 - Alone.mp3
volume: 83%   repeat: off   random: off

doesn't work

Offline

#12 2008-02-08 13:01:45

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [solved] mpd not connecting to port 6600

Ah sorry, I forgot to say that before playing the song you have to add it to the playlist.
So in order to add an item, you don't have to use a full path, since the path is already there for MPD. So:

mpc add "tryd/03 - Alone.mp3" ; mpc play

or

mpc add tryd/03\ -\ Alone.mp3 ; mpc play

should do for you smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#13 2008-02-08 13:12:22

koch
Member
From: Germany
Registered: 2008-01-26
Posts: 369

Re: [solved] mpd not connecting to port 6600

mpc add tryd ; mpc play

works:D the other commands do also work:lol:

thanks a lot

Offline

Board footer

Powered by FluxBB