Robie,

Interesting!  I happened to run into this same stacktrace trying to run
one of the smoketests for ppa-dev-tools.  In my case, I ran into this
only when running against the qastaging Launchpad service during
testing, however I'm guessing your tool runs against production.

The "Unable to find the server at api.launchpad.test" error suggests
something's trying to access a non-existant test Launchpad URI.  This
isn't in the launchpadlib codebase, but is present in launchpad itself.
However it's not at all clear to me how or why this triggers.  If you
figure something out I'd be interested to know.

My original guess was that it was some peculiarity regarding qastaging
and how credentials are cached, since I started using qastaging just a
couple weeks ago and 2 weeks sounds on the order of a cache timeout.
However, if you're also seeing it, my hypothesis is probably wrong.  I
wonder if something has changed on the Launchpad end?

Bryce

On Tue, Apr 25, 2023 at 08:00:02AM +0000, [email protected] wrote:
> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1528, in 
> _conn_request
>     conn.connect()
>   File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1290, in 
> connect
>     address_info = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)
>   File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
>     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
> socket.gaierror: [Errno -2] Name or service not known
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File 
> "/home/robie/Code/Canonical/team-subscriptions.cron/subscription-sync.py", 
> line 133, in <module>
>     main()
>   File 
> "/home/robie/Code/Canonical/team-subscriptions.cron/subscription-sync.py", 
> line 84, in main
>     lp = launchpadlib.launchpad.Launchpad.login_with(
>   File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 564, 
> in login_with
>     return cls._authorize_token_and_login(
>   File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 387, 
> in _authorize_token_and_login
>     return cls(credentials, authorization_engine, credential_store,
>   File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 209, 
> in __init__
>     super(Launchpad, self).__init__(
>   File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 
> 490, in __init__
>     self._browser.get(root_resource), 'application/json')
>   File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 
> 448, in get
>     response, content = self._request(url, extra_headers=headers)
>   File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 
> 398, in _request
>     response, content = self._request_and_retry(
>   File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 
> 368, in _request_and_retry
>     response, content = self._connection.request(
>   File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1948, in 
> request
>     (response, content) = self._request(
>   File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 137, 
> in _request
>     response, content = super(
>   File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 
> 193, in _request
>     return super(RestfulHttp, self)._request(
>   File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1621, in 
> _request
>     (response, content) = self._conn_request(
>   File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1535, in 
> _conn_request
>     raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
> httplib2.ServerNotFoundError: Unable to find the server at api.launchpad.test
> 
> -- 
> ubuntu-server mailing list
> [email protected]
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
> More info: https://wiki.ubuntu.com/ServerTeam

-- 
ubuntu-server mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam

Reply via email to