You are not logged in.

#1 2017-08-07 19:09:43

Ploppz
Member
Registered: 2013-09-14
Posts: 311

ncmpcpp cannot connect to mpd

Running ncmpcpp, it says 'No such file or directory'. And when doing something such as 'u', it says 'No active MPD connection'.


Relevant mpd config:

music_directory		"~/music"
playlist_directory		"~/.config/mpd/playlists"
db_file			"~/.config/mpd/database"
log_file			"~/.config/mpd/log"
pid_file			"~/.config/mpd/pid"
state_file			"~/.config/mpd/state"
sticker_file			"~/.config/mpd/sticker.sql"

Status of mpd:

$ systemctl --user status mpd
● mpd.service - Music Player Daemon
   Loaded: loaded (/usr/lib/systemd/user/mpd.service; disabled; vendor preset: enabled)
   Active: active (running) since Mon 2017-08-07 20:43:09 CEST; 23min ago
     Docs: man:mpd(1)
           man:mpd.conf(5)
 Main PID: 16584 (mpd)
   CGroup: /user.slice/user-1000.slice/user@1000.service/mpd.service
           └─16584 /usr/bin/mpd --no-daemon

Aug 07 20:43:09 nadir systemd[14942]: Starting Music Player Daemon...
Aug 07 20:43:09 nadir mpd[16584]: Aug 07 20:43 : exception: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' 
Aug 07 20:43:09 nadir mpd[16584]: Aug 07 20:43 : output: No 'AudioOutput' defined in config file
Aug 07 20:43:09 nadir mpd[16584]: Aug 07 20:43 : output: Attempt to detect audio output device
Aug 07 20:43:09 nadir mpd[16584]: Aug 07 20:43 : output: Attempting to detect a alsa audio device
Aug 07 20:43:09 nadir mpd[16584]: Aug 07 20:43 : output: Successfully detected a alsa audio device
Aug 07 20:43:09 nadir systemd[14942]: Started Music Player Daemon.

Relevant ncmpcpp config:

ncmpcpp_directory = "~/.ncmpcpp"
mpd_host = "localhost"
mpd_port = "6600"
mpd_music_dir = "~/music"

Relevant output of netstat -tulpn:

$ netstat -tulpn
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp6       0      0 :::6600                 :::*                    LISTEN      16584/mpd           

Last edited by Ploppz (2017-08-07 19:10:10)

Offline

#2 2017-08-07 19:13:41

okubax
Member
From: Kent, UK.
Registered: 2010-04-24
Posts: 210
Website

Re: ncmpcpp cannot connect to mpd

Anything in your mpd log file?

~/.config/mpd/log

Offline

#3 2017-08-07 19:18:44

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: ncmpcpp cannot connect to mpd

okubax wrote:

Anything in your mpd log file?

~/.config/mpd/log

No, nothing recent. Only things that are fixed by now.

Aug 07 15:54 : exception: Failed to open /home/ploppz/.config/mpd/state: No such file or directory
Aug 07 15:54 : exception: Failed to open /home/ploppz/music: Permission denied
Aug 07 15:56 : client: [0] opened from 127.0.0.1:45484
Aug 07 15:56 : client: [0] closed
Aug 07 15:56 : client: [1] opened from 127.0.0.1:45486
Aug 07 15:56 : client: [1] closed
Aug 07 15:56 : client: [2] opened from 127.0.0.1:45488
Aug 07 15:56 : client: [2] closed
Aug 07 19:17 : exception: Failed to open /home/ploppz/.config/mpd/state: No such file or directory

.config/mpd/state exists, and music has the right permissions.

Last edited by Ploppz (2017-08-07 19:19:36)

Offline

#4 2017-08-07 19:20:09

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: ncmpcpp cannot connect to mpd

Just tried my mpd install for the first time in months and am hitting the same issue.

My guess is that mpd can't bind to the IPv4 loopback address for some reason...

Aug 07 20:43:09 nadir mpd[16584]: Aug 07 20:43 : exception: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' 

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2017-08-07 20:11:59

progandy
Member
Registered: 2012-05-17
Posts: 5,203

Re: ncmpcpp cannot connect to mpd

Personally, I prefer running mpd control with a unix socket, that might be an alternative for you. I did not set it in the configuration for ncmpcpp, only with the environment variable for my user:

MPD_HOST = /home/progandy/.config/mpd/socket

extract from ~/.config/mpd/mpd.conf:

...
bind_to_address		"~/.config/mpd/socket"

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#6 2017-08-07 21:20:49

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: ncmpcpp cannot connect to mpd

That works for now, progandy, thanks. Don't know which is best - unix socket or port.

Offline

Board footer

Powered by FluxBB