Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: MPD Connection Refused
#1
Hi @Tim Curtis ,

I was enjoying my Moode Audio setup for a few days Cool then hit with another issue, initially the on board bluetoth with my Pi Zero 2W causing the audio to be choppy, so i get myself an adapter and all the issue went off. So today, i was listing on my car head unit, and when i reached home, i turn off off the power on my raspberry pi and start again after few hours. Library didn't load.

Logs:

Code:
20250125 215138 worker: --
20250125 215138 worker: -- MPD startup
20250125 215138 worker: --
20250125 215139 worker: MPD service:        started
20250125 215142 worker: MPD port 6600:      connection refused


Turned out, no matter how many time i restart the pi or restart the server, MPD not starting, so i manually start it with no success

Code:
× mpd.service - Music Player Daemon
    Loaded: loaded (/lib/systemd/system/mpd.service; disabled; preset: enabled)
    Active: failed (Result: exit-code) since Sat 2025-01-25 21:49:16 +08; 7s ago
      Docs: man:mpd(1)
            man:mpd.conf(5)
            file:///usr/share/doc/mpd/html/user.html
   Process: 15766 ExecStart=/usr/bin/mpd --systemd $MPDCONF (code=exited, status=1/FAILURE)
  Main PID: 15766 (code=exited, status=1/FAILURE)
       CPU: 756ms

Jan 25 21:49:15 raspberrypi systemd[1]: Starting mpd.service - Music Player Daemon...
Jan 25 21:49:16 raspberrypi mpd[15766]: Ignoring the 'pid_file' setting in systemd mode
Jan 25 21:49:16 raspberrypi mpd[15766]: Jan 25 21:49 : exception: Failed to configure output in line 51; Unrecognized mixer type
Jan 25 21:49:16 raspberrypi systemd[1]: mpd.service: Main process exited, code=exited, status=1/FAILURE
Jan 25 21:49:16 raspberrypi systemd[1]: mpd.service: Failed with result 'exit-code'.
Jan 25 21:49:16 raspberrypi systemd[1]: Failed to start mpd.service - Music Player Daemon.


Upon checking the mixer type in /etc/mpd.conf, it's empty:

Code:
audio_output {
type "alsa"
name "ALSA Default"
device "_audioout"
mixer_type ""
dop "no"
stop_dsd_silence "no"
thesycon_dsd_workaround "no"
}


The problem is, i updated the type to software and restart mpd service, all good. But when i restart the pi, it's again set to "". I use bluetooth btw.
Reply
#2
i checked the db, indeed is empty:

Code:
moodeutl -q "select * from cfg_mpd"
1|music_directory|/var/lib/mpd/music
2|playlist_directory|/var/lib/mpd/playlists
3|db_file|/var/lib/mpd/database
4|log_file|/var/log/mpd/log
5|pid_file|/var/run/mpd/pid
6|state_file|/var/lib/mpd/state
7|sticker_file|/var/lib/mpd/sticker.sql
8|user|mpd
9|group|audio
10|bind_to_address|any
11|port|6600
12|log_level|default
13|restore_paused|yes
14|auto_update|no
15|follow_outside_symlinks|yes
16|follow_inside_symlinks|yes
17|zeroconf_enabled|no
18|zeroconf_name|Raspberrypi MPD
19|filesystem_charset|UTF-8
20|metadata_to_use|+comment
21|device|0
22|mixer_type|


I just patched back and now the logs is good

Code:
20250125 222632 worker: --
20250125 222632 worker: -- MPD startup
20250125 222632 worker: --
20250125 222632 worker: MPD service:        started
20250125 222632 worker: MPD port 6600:      accepting connections
20250125 222632 worker: MPD ALSA Default:   on
20250125 222632 worker: MPD ALSA Bluetooth: off
20250125 222632 worker: MPD HTTP Server:    off
20250125 222632 worker: MPD volume:         0
20250125 222632 worker: Saved MPD vol:      -1
20250125 222632 worker: Saved SRC vol:      0
20250125 222632 worker: MPD crossfade:      off
20250125 222632 worker: MPD ignore CUE:     no
20250125 222632 worker: MPD CDSP volsync:   off
Reply


Forum Jump: