[ALPHA 64bit] Enabling socketio in "audiocontrol2.conf" prevents webserver from loading properly (ERR_CONNECTION_REFUSED)
EpicLPer opened this issue · comments
Describe the bug
This is a bug-report for the Alpha version of HiFiBerryOS!
Setting socketio_enabled=true
(even false
seems to cause this) in /etc/audiocontrol2.conf
seems to prevent the web server from coming up properly. It occasionally loads up, but only displays a web page without any CSS formatting and throws all possible options in white text on white background (visible by Ctrl+A and copying all text).
The only way to get the web page to load up again is entirely commenting the #socketio_enabled
line out.
HiFiBerryOS version
20240124
HiFiBerry sound card
-
To Reproduce
Steps to reproduce the behavior:
- Install Alpha version
- Go into
/etc/audiocontrol2.conf
and addsocketio_enabled=true
orfalse
to the[webserver]
section
Expected behavior
The web server should come up without any issues.
Screenshots
-
Browser (if applicable)
- OS: Windows 10 23H2
- Browser: Brave
- Version: 1.62.162
Additional context
Running HiFiBerryOS Alpha on a Raspberry Pi 4.
Some additional journalctl
logs which might help:
Feb 14 19:35:41 hifiberry-alpha systemd[1]: Starting Store volume...
Feb 14 19:35:41 hifiberry-alpha systemd[1]: store-volume.service: Deactivated successfully.
Feb 14 19:35:41 hifiberry-alpha systemd[1]: Finished Store volume.
Feb 14 19:35:48 hifiberry-alpha systemd[1]: beocreate2.service: Scheduled restart job, restart counter is at 11.
Feb 14 19:35:48 hifiberry-alpha systemd[1]: Starting Beocreate 2 Server...
Feb 14 19:35:52 hifiberry-alpha node[1817]: Beocreate 2 (2.4.5), copyright 2017-2021 Bang & Olufsen A/S. MIT open source licence.
Feb 14 19:35:52 hifiberry-alpha node[1817]: Debug logging level: 2.
Feb 14 19:35:52 hifiberry-alpha node[1817]: Settings loaded for 'system'.
Feb 14 19:35:52 hifiberry-alpha node[1817]: Settings loaded for 'ui'.
Feb 14 19:35:52 hifiberry-alpha node[1817]: Extension 'dsp-promo' has no server-side code.
Feb 14 19:35:52 hifiberry-alpha node[1817]: Extension 'feedback' has no server-side code.
Feb 14 19:35:54 hifiberry-alpha node[1817]: Settings loaded for 'interact'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: Settings loaded for 'privacy'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: Settings loaded for 'product-information'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: Settings loaded for 'setup'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: Settings loaded for 'sound'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: Settings loaded for 'sources'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: 'mpd' was registered as a music provider.
Feb 14 19:35:54 hifiberry-alpha systemd[1]: beocreate2.service: Got notification message from PID 1827, but reception only permitted for main PID 1817
Feb 14 19:35:54 hifiberry-alpha node[1817]: Registering source 'music'...
Feb 14 19:35:54 hifiberry-alpha systemd[1]: beocreate2.service: Got notification message from PID 1828, but reception only permitted for main PID 1817
Feb 14 19:35:54 hifiberry-alpha node[1817]: No product identity data in speaker preset 'beovox-cx100.json'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: No product identity data in speaker preset 'beovox-cx50.json'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: No product identity data in speaker preset 'beovox-panel-3000.json'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: No product identity data in speaker preset 'beovox-panel-5000.json'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: No product identity data in speaker preset 'beovox-rl6000.json'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: No product identity data in speaker preset 'beovox-s35.json'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: No product identity data in speaker preset 'beovox-s80.json'.
Feb 14 19:35:54 hifiberry-alpha node[1817]: No product identity data in speaker preset 'other-speaker.json'.
Feb 14 19:35:54 hifiberry-alpha systemd[1]: beocreate2.service: Got notification message from PID 1830, but reception only permitted for main PID 1817
Feb 14 19:35:54 hifiberry-alpha node[1817]: Adding faux product identity: large-speaker.
Feb 14 19:35:54 hifiberry-alpha node[1817]: Adding faux product identity: small-speaker.
Feb 14 19:35:54 hifiberry-alpha systemd[1]: beocreate2.service: Got notification message from PID 1837, but reception only permitted for main PID 1817
Feb 14 19:35:54 hifiberry-alpha systemd[1]: beocreate2.service: Got notification message from PID 1839, but reception only permitted for main PID 1817
Feb 14 19:35:54 hifiberry-alpha systemd[1]: beocreate2.service: Got notification message from PID 1838, but reception only permitted for main PID 1817
Feb 14 19:35:54 hifiberry-alpha systemd[1]: beocreate2.service: Got notification message from PID 1841, but reception only permitted for main PID 1817
Feb 14 19:35:54 hifiberry-alpha node[1817]: System startup.
Feb 14 19:35:54 hifiberry-alpha systemd[1]: beocreate2.service: Got notification message from PID 1842, but reception only permitted for main PID 1817
Feb 14 19:35:55 hifiberry-alpha rm[1846]: rm: cannot remove '/etc/quiet_start': No such file or directory
Feb 14 19:35:55 hifiberry-alpha systemd[1]: Started Beocreate 2 Server.
Feb 14 19:35:55 hifiberry-alpha systemd[1]: beocreate2.service: Got notification message from PID 1843, but reception only permitted for main PID 1817
Feb 14 19:35:55 hifiberry-alpha systemd[1]: beocreate2.service: Got notification message from PID 1844, but reception only permitted for main PID 1817
Feb 14 19:35:55 hifiberry-alpha python3[419]: INFO: handler - 127.0.0.1 - - [2024-02-14 19:35:55] "GET /api/volume HTTP/1.1" 200 126 0.004814
Feb 14 19:35:55 hifiberry-alpha node[1817]: Registering source 'dlna'...
Feb 14 19:35:55 hifiberry-alpha node[1817]: Registering source 'mpd'...
Feb 14 19:35:55 hifiberry-alpha node[1817]: Registering source 'radio'...
Feb 14 19:35:55 hifiberry-alpha node[1817]: Registering source 'openhome'...
Feb 14 19:35:55 hifiberry-alpha node[1817]: Registering source 'roon'...
Feb 14 19:35:55 hifiberry-alpha node[1817]: Registering source 'shairport-sync'...
Feb 14 19:35:55 hifiberry-alpha node[1817]: Registering source 'snapcast'...
Feb 14 19:35:55 hifiberry-alpha node[1817]: Registering source 'spotify'...
Feb 14 19:35:55 hifiberry-alpha node[1817]: Registering source 'squeezelite'...
Feb 14 19:35:55 hifiberry-alpha systemd[1]: beocreate2.service: Got notification message from PID 1848, but reception only permitted for main PID 1817
Feb 14 19:35:55 hifiberry-alpha node[1817]: Advertising system as 'HiFiBerry Alpha'...
Feb 14 19:35:55 hifiberry-alpha node[1817]: Network: connected to local network.
Feb 14 19:35:55 hifiberry-alpha node[1817]: Available ALSA mixer controls: Speaker, Mic, Auto Gain Control, Softvol.
Feb 14 19:35:55 hifiberry-alpha node[1817]: The ALSA mixer specified in settings ('Softvol') is available.
Feb 14 19:35:55 hifiberry-alpha node[1817]: Volume control is via ALSA ('Softvol').
Feb 14 19:35:55 hifiberry-alpha node[1817]: Network: internet connection is working.
Feb 14 19:35:55 hifiberry-alpha node[1817]: Connected to Music Player Daemon.
Feb 14 19:35:55 hifiberry-alpha vollibrespot[714]: [Vollibrespot] : couldn't parse packet from REDACTED:5353: type 47 is invalid
Feb 14 19:35:56 hifiberry-alpha vollibrespot[714]: [Vollibrespot] : couldn't parse packet from REDACTED:5353: type 47 is invalid
Feb 14 19:35:56 hifiberry-alpha node[1817]: All sources registered.
Feb 14 19:35:56 hifiberry-alpha python3[419]: INFO: handler - 127.0.0.1 - - [2024-02-14 19:35:56] "GET /api/player/status HTTP/1.1" 200 806 0.003462
Feb 14 19:35:56 hifiberry-alpha node[1817]: /usr/lib/node_modules/node-fetch/lib/index.js:1461
Feb 14 19:35:56 hifiberry-alpha node[1817]: reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
Feb 14 19:35:56 hifiberry-alpha node[1817]: ^
Feb 14 19:35:56 hifiberry-alpha node[1817]: FetchError: request to http://127.0.1.1:81/api/track/metadata failed, reason: socket hang up
Feb 14 19:35:56 hifiberry-alpha node[1817]: at ClientRequest.<anonymous> (/usr/lib/node_modules/node-fetch/lib/index.js:1461:11)
Feb 14 19:35:56 hifiberry-alpha node[1817]: at ClientRequest.emit (node:events:514:28)
Feb 14 19:35:56 hifiberry-alpha node[1817]: at Socket.socketOnEnd (node:_http_client:519:9)
Feb 14 19:35:56 hifiberry-alpha node[1817]: at Socket.emit (node:events:526:35)
Feb 14 19:35:56 hifiberry-alpha node[1817]: at endReadableNT (node:internal/streams/readable:1408:12)
Feb 14 19:35:56 hifiberry-alpha node[1817]: at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
Feb 14 19:35:56 hifiberry-alpha node[1817]: type: 'system',
Feb 14 19:35:56 hifiberry-alpha node[1817]: errno: 'ECONNRESET',
Feb 14 19:35:56 hifiberry-alpha node[1817]: code: 'ECONNRESET'
Feb 14 19:35:56 hifiberry-alpha node[1817]: }
Feb 14 19:35:56 hifiberry-alpha node[1817]: Node.js v20.9.0
Feb 14 19:35:56 hifiberry-alpha systemd[1]: beocreate2.service: Main process exited, code=exited, status=1/FAILURE
Feb 14 19:35:56 hifiberry-alpha systemd[1]: beocreate2.service: Failed with result 'exit-code'.
Feb 14 19:35:56 hifiberry-alpha systemd[1]: beocreate2.service: Consumed 9.147s CPU time.
I'm not sure if this is relevant for this issue as it happens no matter if socketio is enabled or commented out, but during the initial starting phase it also throws a bunch of MPD errors in the logs:
Feb 14 19:43:07 hifiberry-alpha ympd[336]: MPD connection: Connection refused
Feb 14 19:43:08 hifiberry-alpha python3[458]: INFO: base - Calling MPD connect('localhost', 6600, timeout=None)
Feb 14 19:43:08 hifiberry-alpha python3[458]: INFO: controller - Got no state from mpd
Feb 14 19:43:08 hifiberry-alpha ympd[336]: MPD connection failed.
Feb 14 19:43:09 hifiberry-alpha python3[458]: INFO: base - Calling MPD connect('localhost', 6600, timeout=None)
Feb 14 19:43:09 hifiberry-alpha python3[458]: INFO: controller - Got no state from mpd
Feb 14 19:43:09 hifiberry-alpha python3[458]: WARNING: controller - mpd failed, trying to restart
Feb 14 19:43:09 hifiberry-alpha python3[458]: WARNING: watchdog - don't know how to restart mpd
Feb 14 19:43:09 hifiberry-alpha ympd[336]: MPD connection: Connection refused
Feb 14 19:43:10 hifiberry-alpha python3[458]: INFO: base - Calling MPD connect('localhost', 6600, timeout=None)
Feb 14 19:43:10 hifiberry-alpha python3[458]: INFO: controller - Got no state from mpd
Feb 14 19:43:10 hifiberry-alpha ympd[336]: MPD connection failed.
I have exactly the same issue with an rpi3b using the dsp addon on the latest alpha5
While I can reproduce this bug, I'm not able to fix it easily. The SocketIO module is contributed code. I've opened a bug report and hope the author of this code can have a look:
hifiberry/audiocontrol2#39
This is fixed in the upcoming HiFiBerryOS64 Alpha 7