Describe the bug
multi-scrobbler is treating EAI_AGAIN DNS errors as authentication errors and asking for reauthentication, but a retry is all that's needed.
If my container starts up while my network connection is offline, it hits a DNS error and never retries, and just sits there doing nothing until I realize and go reauthenticate it (or restart the container). I also have a webhook configured that also hit a DNS error so couldn't send out a notification.
To Reproduce
Configure Last.fm as a source
Start the container with no internet connectivity (e.g. internal: true on a Docker network)
Expected behavior
A network (/DNS) error when testing Last.fm authentication should be retried, as other client initialization requests are. Probably also the same for webhooks.
Logs
2023-10-25T20:43:26+01:00 info : [App] Scheduler started.
2023-10-25T20:43:26+01:00 info : [Scrobblers] [Maloja - client_maloja] Scrobble processing started
2023-10-25T20:43:26+01:00 info : [Scrobblers] [Maloja - client_maloja] Server reported database is built and status is healthy
2023-10-25T20:43:26+01:00 error : [Sources] [Lastfm - source_lastfm] Cannot start polling because user interaction is required for authentication
2023-10-25T20:43:25+01:00 warn : [Sources] lastfm (source_lastfm) source auth failed.
2023-10-25T20:43:25+01:00 error : [Sources] [Lastfm - source_lastfm] getaddrinfo EAI_AGAIN ws.audioscrobbler.com {"code":"EAI_AGAIN","errno":-3001,"hostname":"ws.audioscrobbler.com","syscall":"getaddrinfo"}
Error:
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)
2023-10-25T20:43:25+01:00 error : [Sources] [Lastfm - source_lastfm] Could not successfully communicate with Last.fm API
2023-10-25T20:43:25+01:00 error : [API - Lastfm - source_lastfm] Testing auth failed
2023-10-25T20:43:20+01:00 info : [Sources] lastfm (source_lastfm) source initialized
2023-10-25T20:43:20+01:00 warn : [Scrobblers] listenbrainz (client_listenbrainz) client auth failed.
2023-10-25T20:43:15+01:00 info : [Scrobblers] listenbrainz (client_listenbrainz) client initialized
2023-10-25T20:43:09+01:00 info : [Scrobblers] maloja (client_maloja) client auth OK
2023-10-25T20:43:09+01:00 info : [Scrobblers] [Maloja - client_maloja] Auth test passed!
2023-10-25T20:43:09+01:00 info : [Scrobblers] maloja (client_maloja) client initialized
2023-10-25T20:43:09+01:00 info : [Scrobblers] [Maloja - client_maloja] Maloja Server Version: 3.1.5
2023-10-25T20:43:09+01:00 info : [Scrobblers] [Maloja - client_maloja] Communication test succeeded.
2023-10-25T20:43:09+01:00 error : [Notifiers] [Gotify - Pushbits] Failed to contact server | Error: getaddrinfo EAI_AGAIN notifications.example.com
2023-10-25T20:43:04+01:00 info : [API] Server started:
---> Local http://localhost:9078
---> Network http://172.20.0.9:9078
--- HINT ---
MS is likely being run in a container with BRIDGE networking which means the above addresses are not accessible from outside this container.
To ensure the container is accessible make sure you have mapped the *container* port 9078 to a *host* port. https://foxxmd.github.io/multi-scrobbler/docs/installation#networking
The container will then be accessible at http://HOST_MACHINE_IP:HOST_PORT
--- HINT ---
Describe the bug multi-scrobbler is treating
EAI_AGAIN
DNS errors as authentication errors and asking for reauthentication, but a retry is all that's needed.If my container starts up while my network connection is offline, it hits a DNS error and never retries, and just sits there doing nothing until I realize and go reauthenticate it (or restart the container). I also have a webhook configured that also hit a DNS error so couldn't send out a notification.
To Reproduce
internal: true
on a Docker network)Expected behavior A network (/DNS) error when testing Last.fm authentication should be retried, as other client initialization requests are. Probably also the same for webhooks.
Logs
Versions