EDIT: It seems it might be a cable modem issue: according to https://test-ipv6.com/ ipv6 is not working both in Ubuntu as well as windows (dual boot, same workstation), and neither on my smartphone when on wifi (i.e. same cable modem), while it does work on smartphone with wifi disabled (i.e. mobile data). So I will contact my ISP.
I have a fresh Ubuntu 22.04 install on a desktop PC with a wired internet connection. It has the default networking configuration settings (DHCP; IP address from cable modem).
Internet access works fine from a browser.
From the command line however, some programs (e.g. apt update
or apt upgrade
) seem to work fine, though maybe somewhat slow (?), while others fail, e.g. wget
:
~$ wget https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos
--2023-05-17 13:56:57-- https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8002::154, 2606:50c0:8001::154, 2606:50c0:8000::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8002::154|:443... failed: Connection timed out.
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443... ^C
Accessing the same link from a webbrowser instantly loads the ros2.repos
file.
Adding an entry "185.199.108.133 raw.githubusercontent.com" to /etc/hosts
also solves the issue:
$ wget https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos
--2023-05-17 14:52:18-- https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12144 (12K) [text/plain]
Saving to: ‘ros2.repos.1’
ros2.repos.1 100%[=======================================================================================================>] 11,86K --.-KB/s in 0s
2023-05-17 14:52:18 (124 MB/s) - ‘ros2.repos.1’ saved [12144/12144]
So I think it is an ipv4
vs ipv6
issue.
Though I have no idea why it works from the browser but not from the terminal.
Any suggestions on how to debug this?