You are not logged in.

#1 2017-03-10 17:06:04

silverbluep
Guest

[SOLVED] MPD client won't play

Hello.

I just installed arch yesterday and it is a boon to configure everything the way I want it. However, I'm having some trouble with playing music.

I have plasma 5.9 as DE, and I want to play music using cantata, which is a client for mpd.

However, I am not getting any music playback (songs wont play, they stay paused at the beginning) I thought it was a codec issue but I can play them through VLC. I think I found the culprid; mpd won't work. Here is my error message;

% systemctl status mpd.service               
* mpd.service - Music Player Daemon
   Loaded: loaded (/usr/lib/systemd/system/mpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2017-03-10 11:45:48 EST; 18min ago
     Docs: man:mpd(1)
           man:mpd.conf(5)
  Process: 1607 ExecStart=/usr/bin/mpd --no-daemon (code=exited, status=1/FAILURE)
Main PID: 1607 (code=exited, status=1/FAILURE)

Mar 10 11:45:48 batun550jk systemd[1]: Starting Music Player Daemon...
Mar 10 11:45:48 batun550jk mpd[1607]: exception: Failed to bind to '[::]:6600'
Mar 10 11:45:48 batun550jk mpd[1607]: exception: nested: Failed to bind socket: Address already in use
Mar 10 11:45:48 batun550jk systemd[1]: mpd.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 11:45:48 batun550jk systemd[1]: Failed to start Music Player Daemon.
Mar 10 11:45:48 batun550jk systemd[1]: mpd.service: Unit entered failed state.
Mar 10 11:45:48 batun550jk systemd[1]: mpd.service: Failed with result 'exit-code'.

How can I identify what is using port 6600? I got lsof from the repos, but running " lsof -i :6600 " doesn't give me an output.

Last edited by silverbluep (2017-03-12 00:18:36)

#2 2017-03-10 17:23:42

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: [SOLVED] MPD client won't play

Hello,

I'm not sure if it's required, but did you run lsof as root? It should work (mpd does show up at my system, but I'm not running it using systemd/root)

This error usually occurs because there's already an mpd instance running. What's the output of mpc? Can it find a running mpd server?

If not, try if you can get mpd to fly without systemd first. Stop the service, open a terminal and see what mpd gives. See if mpd --kill does anything.

Offline

#3 2017-03-10 18:04:30

silverbluep
Guest

Re: [SOLVED] MPD client won't play

Steef435 wrote:

Hello,

I'm not sure if it's required, but did you run lsof as root? It should work (mpd does show up at my system, but I'm not running it using systemd/root)

This error usually occurs because there's already an mpd instance running. What's the output of mpc? Can it find a running mpd server?

If not, try if you can get mpd to fly without systemd first. Stop the service, open a terminal and see what mpd gives. See if mpd --kill does anything.

Ah didn't notice the $. Running lsof as root gave me the mpd process. Now, i have this going on;

% mpd
fatal_error: Failed to create pid file "/run/mpd/mpd.pid": Permission denied

Upon trying mpd.service; I get a timeoyt

% systemctl status mpd.service                                                                                                                                                                                       sad
* mpd.service - Music Player Daemon
   Loaded: loaded (/usr/lib/systemd/system/mpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: timeout) since Fri 2017-03-10 13:01:48 EST; 50s ago
     Docs: man:mpd(1)
           man:mpd.conf(5)
  Process: 1234 ExecStart=/usr/bin/mpd --no-daemon (code=killed, signal=TERM)
Main PID: 1234 (code=killed, signal=TERM)

Mar 10 13:00:18 batun550jk mpd[1234]: ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
Mar 10 13:00:18 batun550jk mpd[1234]: alsa_output: Error opening default ALSA device: No such file or directory
Mar 10 13:00:18 batun550jk mpd[1234]: output: Attempting to detect a oss audio device
Mar 10 13:00:18 batun550jk mpd[1234]: oss_output: Error opening OSS device "/dev/dsp": No such file or directory
Mar 10 13:00:18 batun550jk mpd[1234]: oss_output: Error opening OSS device "/dev/sound/dsp": No such file or directory
Mar 10 13:00:18 batun550jk mpd[1234]: output: Attempting to detect a pulse audio device
Mar 10 13:01:48 batun550jk systemd[1]: mpd.service: Start operation timed out. Terminating.
Mar 10 13:01:48 batun550jk systemd[1]: Failed to start Music Player Daemon.
Mar 10 13:01:48 batun550jk systemd[1]: mpd.service: Unit entered failed state.
Mar 10 13:01:48 batun550jk systemd[1]: mpd.service: Failed with result 'timeout'.

Last edited by silverbluep (2017-03-10 18:05:13)

#4 2017-03-10 20:30:55

loqs
Member
Registered: 2014-03-06
Posts: 19,184

Re: [SOLVED] MPD client won't play

Have you configured mpd following Music_Player_Daemon#Setup?

Offline

#5 2017-03-10 21:29:07

silverbluep
Guest

Re: [SOLVED] MPD client won't play

loqs wrote:

Have you configured mpd following Music_Player_Daemon#Setup?

Cantata has built a config in ~/.local/share/cantata/mpd/mpd.conf . I already have a config in /etc/mpd.conf which seems to be the generic one. I think my problem is with alsa not configured properly, since I am not getting sound output

% speaker-test -c 2       
speaker-test 1.1.3
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
Playback open error: -16,Device or resource busy

I don't understand how to tacke this, this issue kinda burned me out. I'm gonna take a rest and come back to this.

#6 2017-03-11 04:01:29

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,475

Re: [SOLVED] MPD client won't play

You said you can play sound with VLC. (pulesaudio is working)
You need to configure mpd, with proper permissions, just refer to the link given by loqs, it shall work fine.

Offline

#7 2017-03-11 19:18:14

silverbluep
Guest

Re: [SOLVED] MPD client won't play

Thanks people.

Problem suddently disappeared. I turned the computer on this morning, was checking a couple things, I ran "alsactl restore -P" and then mpd started working properly. (And alsa too, since speaker-test -c 2 actually outputs noise)

I wanted to go to ALSA route, because it was giving me some problems with some other applications too. (But for the moment, I was mostly concerned with playing music through mpd)

#8 2017-03-11 19:21:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] MPD client won't play

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB