Score:1

Timeout when adding mozillateam/ppa repository

cn flag

I'm using Kubuntu 22.04, apt update and upgrade work fine.

I'm following https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04 to uninstall Firefox snap and install from apt, but when I add mozillateam/ppa it hangs for a few minutes then I get timeout error:

$ sudo add-apt-repository ppa:mozillateam/ppa
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 364, in <module>
    sys.exit(0 if addaptrepo.main() else 1)
  File "/usr/bin/add-apt-repository", line 347, in main
    shortcut = handler(source, **shortcut_params)
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 40, in shortcut_handler
    return handler(shortcut, **kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 82, in __init__
    if self.lpppa.publish_debug_symbols:
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 120, in lpppa
    self._lpppa = self.lpteam.getPPAByName(name=self.ppaname)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 107, in lpteam
    self._lpteam = self.lp.people(self.teamname)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 98, in lp
    self._lp = login_func("%s.%s" % (self.__module__, self.__class__.__name__),
  File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 494, in login_anonymously
    return cls(
  File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 230, in __init__
    super(Launchpad, self).__init__(
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 472, in __init__
    self._wadl = self._browser.get_wadl_application(self._root_uri)
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 447, in get_wadl_application
    response, content = self._request(url, media_type=wadl_type)
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 389, in _request
    response, content = self._request_and_retry(
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 359, in _request_and_retry
    response, content = self._connection.request(
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1725, in request
    (response, content) = self._request(
  File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 144, in _request
    response, content = super(LaunchpadOAuthAwareHttp, self)._request(
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 184, in _request
    return super(RestfulHttp, self)._request(
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1441, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1363, in _conn_request
    conn.connect()
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1153, in connect
    sock.connect((self.host, self.port))
TimeoutError: [Errno 110] Connection timed out

Is it something wrong on my end that I must fix?

mchid avatar
bo flag
Did you change something with python like your default python version?
cn flag
No, I just upgraded apt libs.
cn flag
I'm unable to find what it's trying to connect to. If I had a host I could make connection tests to figure why it's timing out.
mchid avatar
bo flag
See updated answer below. It should be trying to connect to `http://ppa.launchpad.net/mozillateam/ppa/ubuntu` or `lanuchpad.net` but it also downloads a key. It might be a DNS or IPV6 issue if that is enabled.
Score:1
bo flag

Other users report the problem is fixed if you install the python-is-python3 package.

First, update the system:

sudo apt update
sudo apt upgrade

Next, install:

sudo apt install python-is-python3

This creates a symlink for python3 so that when you or the system executes python, it will link to python3.

I believe this was disabled by default after the full switch to python3 to allow backwards compatibility for systems that need a default python2 linked with python. But for most people, we need it linked to python3 as python2 was deprecated a while ago.

Then, proceed with the PPA installation instructions.


If that doesn't work, it might be a network issue. The ppa is at http://ppa.launchpad.net/mozillateam/ppa/ubuntu.

If pinging launchpad.net returns nothing, you might be able to disable IPV6 to resolve the issue.

cn flag
Thanks. Unfortunately it keeps giving timeout. I also tried to manually symlink python to python3 and it also didn't work.
Score:1
cn flag

I added a quick log on python file that's generating the stacktrace, it tries to connect to api.launchpad.net. It resolves to 2620:2d:4000:1001::8003, which is timing out. I figured it also resolves to 185.125.189.224 which works.

I added it to /etc/hosts and now it works!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.