Score:0

No network access from MacOS terminal

cn flag

A colleague's Macbook refuses to make any remote connections from the terminal. For example:

macbook-pro% rvm install "ruby-3.2.2"                                                                             /.../API/FAIRsharing-API 13:18
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/13.4/x86_64/ruby-3.2.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Warning: formula.jws.json: update failed, falling back to cached version.
==> Downloading https://formulae.brew.sh/api/cask.jws.json
curl: (6) Could not resolve host: formulae.brew.sh   #          #          #

Warning: cask.jws.json: update failed, falling back to cached version.
==> Upgrading 2 outdated packages:
coreutils 9.1 -> 9.3
[email protected] 1.1.1s -> 1.1.1t
==> Fetching [email protected]
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1t
Error: [email protected]: Failed to download resource "[email protected]_bottle_manifest"
Failure while executing; `/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.22\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 13.4\)\ curl/7.88.1 --header Accept-Language:\ en --retry 3 --header Accept:\ application/vnd.oci.image.index.v1\+json --header Authorization:\ Bearer\ QQ== --fail --location --silent --head https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1t` exited with 6. Here's the output:
curl: (6) Could not resolve host: ghcr.io
curl: (6) Could not resolve host: ghcr.io
curl: (6) Could not resolve host: ghcr.io
curl: (6) Could not resolve host: ghcr.io


==> Fetching coreutils
==> Downloading https://ghcr.io/v2/homebrew/core/coreutils/manifests/9.3
Error: coreutils: Failed to download resource "coreutils_bottle_manifest"
Failure while executing; `/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.22\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 13.4\)\ curl/7.88.1 --header Accept-Language:\ en --retry 3 --header Accept:\ application/vnd.oci.image.index.v1\+json --header Authorization:\ Bearer\ QQ== --fail --location --silent --head https://ghcr.io/v2/homebrew/core/coreutils/manifests/9.3` exited with 35. Here's the output:
curl: (35) Recv failure: Socket is not connected


Requirements installation failed with status: 1.

He doesn't have any network proxy enabled. This problem is currently manifesting on a standard domestic broadband connection. There is no VPN active and turning on a Cisco VPN makes no difference.

There's no problem using web browsers on this Mac; they are able to connect.

Of course, it's been rebooted, and the following instructions from the local IT department have been followed:

If you are experiencing connection issues on a Mac, it might be the computer's network stack is broken and needs to be recreated. This can affect both wired and wireless networks at the same time. The instructions we use are included below for reference, but if you would prefer IT can do this with you.

Go to this location in Finder/Terminal (make sure it is the system Library and not the user profile Library) /Library/Preferences/SystemConfiguration/ Delete any of the files in that folder called the below, or with similar names such as .backup or pre-upgrade. com.apple.airport.preferences.plist com.apple.network.identification.plist com.apple.wifi.message-tracer.plist NetworkInterfaces.plist preferences.plist Restart the computer Try connecting to a network again. If this fails, try the following:

Delete any networking profiles under System Preferences -> Profiles. Delete the remembered network you are trying to connect to. Check in Network Preferences if any additional options have a green light that would not be expected (e.g. Cisco VPN is green and saying connected when you are not connected to any network), and uninstall the applications that have these options (not just remove them from the Network Preferences).

A third-party terminal application also showed the same problems. Can anyone suggest where to look next?

HBruijn avatar
in flag
This is more on topic on SuperUser or https://apple.stackexchange.com/ - Note that `Could not resolve host:` points at first glance to a DNS issue (which may not be show in a web browser that uses application specific DNS settings rather than the system defaults that a console app would be using) check `scutil --dns` and/or on OSX legacy `/etc/resolv.conf`
knirirr avatar
cn flag
Ah, yes. As I usually use system defaults in browsers it didn't occur to me that he might have set his to use something else.
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.