mpDris2
mpDris2 copied to clipboard
Randomly getting "socket.timeout: timed out" on GNOME
Hi,
At random times, this message shows up in the journal:
jun 03 05:40:34 arch systemd[754]: Started mpDris2 - Music Player Daemon D-Bus bridge.
jun 03 05:40:34 arch mpDris2[769]: 2020-06-03 05:40:34,738 base INFO: Calling MPD connect('localhost', '6600', timeout=None)
jun 03 05:40:34 arch mpDris2[769]: 2020-06-03 05:40:34,739 mpDris2 INFO: Reconnected to MPD server.
jun 03 07:16:24 arch mpDris2[769]: Traceback (most recent call last):
jun 03 07:16:24 arch mpDris2[769]: File "/usr/lib/python3.8/site-packages/gi/overrides/GLib.py", line 671, in <lambda>
jun 03 07:16:24 arch mpDris2[769]: func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
jun 03 07:16:24 arch mpDris2[769]: File "/usr/bin/mpDris2", line 467, in socket_callback
jun 03 07:16:24 arch mpDris2[769]: data = fd._fetch_objects("changed")
jun 03 07:16:24 arch mpDris2[769]: File "/usr/bin/mpDris2", line 872, in _fetch_objects
jun 03 07:16:24 arch mpDris2[769]: return list(self.client._parse_objects_direct(self.client._read_lines(), *args))
jun 03 07:16:24 arch mpDris2[769]: File "/usr/lib/python3.8/site-packages/mpd/base.py", line 225, in _parse_objects
jun 03 07:16:24 arch mpDris2[769]: for key, value in self._parse_pairs(lines):
jun 03 07:16:24 arch mpDris2[769]: File "/usr/lib/python3.8/site-packages/mpd/base.py", line 220, in _parse_pairs
jun 03 07:16:24 arch mpDris2[769]: for line in lines:
jun 03 07:16:24 arch mpDris2[769]: File "/usr/lib/python3.8/site-packages/mpd/base.py", line 547, in _read_lines
jun 03 07:16:24 arch mpDris2[769]: line = self._read_line()
jun 03 07:16:24 arch mpDris2[769]: File "/usr/lib/python3.8/site-packages/mpd/base.py", line 527, in _read_line
jun 03 07:16:24 arch mpDris2[769]: line = self._rfile.readline()
jun 03 07:16:24 arch mpDris2[769]: File "/usr/lib/python3.8/socket.py", line 669, in readinto
jun 03 07:16:24 arch mpDris2[769]: return self._sock.recv_into(b)
jun 03 07:16:24 arch mpDris2[769]: socket.timeout: timed out
jun 03 07:16:24 arch mpDris2[769]: 2020-06-03 07:16:24,888 mpDris2 WARNING: Disconnected
jun 03 07:16:24 arch systemd[754]: mpDris2.service: Succeeded.
Restarting the mpDris2 service will make it work again, but it's a little inconvenient. Is there something that could be done to avoid having to restart the service when this happens? Here's some info that might be relevant:
OS: Arch Linux mpDris2: 0.8 mpd: 0.21.23 GNOME: 3.36.2
Thanks!
Forgot to mention that the only reason I mentioned GNOME, is because I don't remember having this issue for the long time I used KDE.
I don't think the desktop environment relates to it. I got the same error too, and I'm running KDE Plasma 5.19.0.
If it helps, I'm also running MPD 0.21.22 with mpDris 0.8 on Gentoo Linux.
I also have it on Arch without any specific DE.