Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name Resolution Exception #61

Open
nirvdrum opened this issue Jul 22, 2022 · 0 comments
Open

Name Resolution Exception #61

nirvdrum opened this issue Jul 22, 2022 · 0 comments

Comments

@nirvdrum
Copy link

nirvdrum commented Jul 22, 2022

I'm running into a problem where this extension fails to perform name resolution when initializing, retries a few times (which also fail), and then gives up, moving to an unusable state. I'm running Raspberry Pi OS with wifi as my sole network interface. The mopidy service is configured to come up after network-online.target, so I'm not entirely sure why name resolution is failing. I suspect even though the interface is available, it hasn't finished configuring via DHCP.

All request types fail so I've only shown a couple in the following backtrace from the mopidy service log. If you need more, I can pull it together but I need to strip the token value out of them:

ERROR    [Thread-4] mopidy_ytmusic YTMusic failed to load auto playlists
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 353, in connect
    conn = self._new_conn()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0xb20d4688>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

My solution for the time being is to manually restart the service. Everything works fine after that. Please let me know if you need any more info. My naive thought is that a back-off algorithm would help by progressively increasing the time between each retry attempt. Alternatively, a configuration for max number of retries ought to allow me to bump the threshold high enough that the requests eventually succeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant