Thank you for your donation!


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


Problem: openMpdSock(): Error: connection failed (5) 110, Connection timed out
#1
Finally I am getting around to move from 8.x to 9.x.
My RPi boots from USB. An SSD holds the two OS partitions and a third one with the music library.

Playing radio streams works smoothly, but as soon as I try to access a track, the whole system almost freezes. I set both mpd and moode logs to verbose. The mpd log shows no issues, but moode reports this mpd socket time out.
Trying to switch back to a radio stream, the mpd log reports this action, that is, seems still to be alive, but nothing happens and the player is empty bar the two dials.

According to the mpd.conf, mpd is running as user mpd:audio.
My music library is all set to moode:moode and a+rwx.
And mpd successfully created its library.

My old 8.x set up with identical ssd layout and hardware (including power supply) runs like clockwork.

I am running out of ideas.

Does anyone have any advice?
Reply
#2
Which ver of moode?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
The latest from RPi imager.
Reply
#4
It prolly has something to do with how the third partition is referenced.

Normally local files would be stored on the second OS partition named roofs in /media, /mnt/SDCARD, etc
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
This was also my initial assumption. The partition is mounted rw.
I copied one album to SDCARD and tried this one. But it is all the same.
Reply
#6
it happens with the stereo test track, too.

20250417 210132 worker: Job update_library done
20250417 210132 DEBUG: genLibrary(): jsonErrorMessage(): No errors
20250417 210139 DEBUG: chkVariables(): Excluded key: path
20250417 210139 DEBUG: phpSession(get_status): status=PHP_SESSION_NONE
20250417 210142 DEBUG: phpSession(get_status): status=PHP_SESSION_NONE
20250417 210142 DEBUG: chkVariables(): Excluded key: path
20250417 210148 DEBUG: phpSession(get_status): status=PHP_SESSION_NONE
20250417 210154 DEBUG: phpSession(get_status): status=PHP_SESSION_NONE
20250417 210156 DEBUG: phpSession(get_status): status=PHP_SESSION_NONE
20250417 210157 DEBUG: chkVariables(): Excluded key: path
20250417 210257 DEBUG: readMpdResp(): Error: fgets failure ()
20250417 210259 DEBUG: readMpdResp(): Error: fgets failure ()
20250417 210306 DEBUG: openMpdSock(): Error: connection failed (1) 110, Connection timed out
20250417 210307 DEBUG: openMpdSock(): Error: connection failed (1) 110, Connection timed out
20250417 210308 DEBUG: openMpdSock(): Error: connection failed (1) 110, Connection timed out
20250417 210309 DEBUG: openMpdSock(): Error: connection failed (1) 110, Connection timed out
20250417 210328 DEBUG: openMpdSock(): Error: connection failed (1) 110, Connection timed out
20250417 210336 DEBUG: openMpdSock(): Error: connection failed (2) 110, Connection timed out
20250417 210337 DEBUG: openMpdSock(): Error: connection failed (2) 110, Connection timed out
20250417 210338 DEBUG: openMpdSock(): Error: connection failed (2) 110, Connection timed out
20250417 210339 DEBUG: openMpdSock(): Error: connection failed (2) 110, Connection timed out
Reply
#7
A failed socket connection to MPD would suggest that it has crashed.

If thats the case then the mystery is why. IIRC one crash scenario is when it can't parse mpd.conf i.e., there's a bad setting in that file.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#8
I did not touch mpd.conf. And other things, library set up, radio streaming, etc. are working flawless.
I just performed the latest in-place update, but the behaviour is just the same.
Reply
#9
I would verify whether MPD is crashing or not.

It should show up in the moode startup log (moodeutl -l). The watchdog /var/www/daemon/watchdog.sh runs every 6 secs and checks a few things including whether MPD is running or not. If it detects its not running it restarts it.

Code:
20250417 164919 watchdog: Started MPD after crash detected (check system journal)

System journal should show some errors

Code:
journalctl -u mpd
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#10
Hi Tim,
I finally found the reason and could solve the issue.
I started with a fresh installation and everything works fine.
The troubles occur after importing the backup of my 8.3.9 settings.


Code:
[I2S Device]
i2soverlay =None"
i2sdevice = "Audiophonics ES9028/9038 DAC"

[ALSA]
alsa_output_mode = "plughw"
alsa_loopback = "Off"

[MPD Config]
mixer_type = "hardware"
device = "0"
audio_output_format = "disabled"
selective_resample_mode = "0"
sox_quality = "high"
sox_multithreading = "1"
sox_precision = "20"
sox_phase_response = "50"
sox_passband_end = "95"
sox_stopband_begin = "100"
sox_attenuation = "0"
sox_flags = "0"
dop = "no"
replaygain = "auto"
replaygain_preamp = "0"
volume_normalization = "no"
audio_buffer_size = "16384"
max_output_buffer_size = "262144"
max_playlist_length = "16384"
input_cache = "256 MB"
log_level = "default"
stop_dsd_silence = "no"
thesycon_dsd_workaround = "no"

I did not see at first any relationship to the audio device settings, since radio streams were playing, but not tracks which rather made me think of access problems.
I imported then the backup from the fresh installation. But neverytheless, at first the issue persisted. I had to switch back and forth between device 0 (HDMI) and 2 (Audiophonics), what finally brought the system back to life,

Does perhaps the device=0 setting in [MPD options] is causing the problem?
An [Audio Device] section as in 9.x backup does not exist.

BTW: Neither journalctl nor the mpd debug log reported any errors. And alsamixer looked normal as well.

Thx and have a pleasant Easter weekend.
Walther
Reply


Forum Jump: