curl downloads fail on OS X Yosemite - macos

Is there a problem with curl on OSX Yosemite? I have now experienced the same problem repeatedly on different combinations of local and remote networks (downloading different software from different locations). I'm running OSX 10.10.2. All attempts start alright, but after some time they all finish in one of the following error messages:
curl: (56) Recv failure: Connection reset by peer
curl: (56) Recv failure: Operation timed out
The reason I'm using curl for downloading is that curl is part of different install scripts. Ordinary downloads work fine, so I don't think there is an internet connection problem.

It may not be a complete solution but, you could try using wget instead.
Also the main curl syntax I use is:
curl -L 'http://example.com/file.txt' -o 'file.txt'
I am running OS X Yosemite too.
wget:
wget 'http://example.com/file.txt'

Connection reset by peer and Operation timed out usually mean that the server or file can't be reached. From the libcurl error codes list,
CURLE_RECV_ERROR (56)
Failure with receiving network data.
Maybe you can try getting the same file from another server? If you're using curl in install scripts, maybe it's possible to submit a bug report? Since everything else in the network is working fine, I'll guess it's a problem with the installation script.

Related

Failed to connect to the bus: Address does not contain a colon

I'm getting this error when my circleci job is building my cypress test:
[432:0312/154643.301773:ERROR:bus.cc(392)] Failed to connect to the
bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No
such file or directory [432:0312/154643.303582:ERROR:bus.cc(392)]
Failed to connect to the bus: Address does not contain a colon
[432:0312/154643.303623:ERROR:bus.cc(392)] Failed to connect to the
bus: Address does not contain a colon
[619:0312/154643.361540:ERROR:gpu_init.cc(453)] Passthrough is not
supported, GL is swiftshader, ANGLE is
Does anyone know how I fix this?
Try these steps below:
Install dbus if it's not installed
# UBUNTU:
apt update && apt install -y dbus
# MAC:
brew update && brew install dbus
Then run the commands below
# UBUNTU:
mkdir -p /var/run/dbus
dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address
# MAC:
mkdir -p /var/run/dbus
dbus-daemon --config-file=/opt/homebrew/share/dbus-1/system.conf --print-address
Source: https://georgik.rocks/how-to-start-d-bus-in-docker-container/
It seems like this is a known Cypress issue. See this issue from the official GitHub repo for more details.
These errors will still persist even if all the tests pass properly. I'm also getting similar errors with GitHub Actions. It seems like most users just ignore them. A user suggested a fix in April 2021 but there isn't consensus if it works or may cause other complications.
It seems like these errors are not helpful for troubleshooting because they happen even with the official Cypress actions when all specs are passing. If your tests are failing, these errors are likely not the reason.

cannot open display from macos client with openvpn

I am trying to connect to a redhat server from a macos client, using ssh and openvpn. Command line commands work fine (eg vim), but displays dont get displayed, eg while running firefox or gvim, and I get the error:
No protocol specified
E233: cannot open display
I did "xhost +" and "export XAUTHORITY=~/.Xauthority" on the macos client, and "export DISPLAY=:0.0" on the redhat server, but that did not solve the problem.
However, it is working when the client is ubuntu, so I guess the problem is on the macos client side.
BTW, when I run ssh after I did "xhost +", I get the warning:
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Any suggestions?
Answer is given here: instead of doing "ssh -X", do "ssh -Y". This is the short solution (which worked for me on Catalina + XQuartz), other longer solutions are also provided at this link.

OS X Yosemite Curl errors

I am trying to use curl on Yosemite and I keep getting the following errors:
01-09-14 17:49:45> curl https://www.kernel.org/pub/software/scm/git/git-manpages-2.1.0.tar.gz
curl: (51) SSL: certificate verification failed (result: 5)
I know I can add -k to the curl to make it download, but I think there is something bigger that I need to fix. The biggest issue is when trying to update Homebrew packages.
I also have this in my bash_profile
export CURL_CA_BUNDLE=/usr/local/share/ca-bundle.crt
and i just downloaded the ca-bundle.crt from http://curl.haxx.se/docs/caextract.html
EDIT: Also on a the guest user account on my laptop the curl works fine
Turns out
export CURL_CA_BUNDLE=/usr/local/share/ca-bundle.crt
was the problem for some reason. Removed that from my bash_profile and restarted a few times and everything works fine now.

install imagemagik using homebrew, shell

ive been trying to get imagemagik onto my mac using homebrew and the terminal when i run
$ brew install imagemagick
i get
==> Installing imagemagick dependency: pkg-config
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-0.27.1.lion.bottle.tar.gz
curl: (52) Empty reply from server
Error: Download failed: https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-0.27.1.lion.bottle.tar.gz
is that just to do with a part of sourge force not responding, or is it an error on my end, ive not seen a "52 empty reply from server" before, is that a similar to a 500 error ?
for the record im running the latest xcode and lion.
SourceForge (sf.net) is currently down.
Did you set proxy to access the web?
I installed ImageMagick. First I got the error message:
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/imagemagick-6.8.0-
curl: (56) Recv failure: Connection reset by peer
This reason might be caused by GFW in China. Then I used a sock server and set http_proxy, I got the error message like yours:
curl: (52) Empty reply from server
At last I modified #HOME/.curlrc by adding "--socks5 127.0.0.1:1080", and reinstall ImageMagick successfully.

curl: (7) error when i try installing Homebrew on iMac

Setup iMac OSX 10.7.4,
Hi there,
I am trying to install Homebrew on my iMac but I keep getting an error. I am following the instructions on https://github.com/mxcl/homebrew/wiki/installation
I have Xcode installed and the Java Developer update which it specifies on the website.
I open Terminal and paste
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
But I keep getting the error
curl: (7) couldn't connect to host
Has anyone any suggestions?
EDIT:
Just to add I am on a college network incase its relevant
EDIT: I have also reinstalled Curl
For my specific case, I use SOCKS proxy for all traffic. So my installation command is:
ruby -e "$(curl -fsSL --socks5 127.0.0.1:30000 https://raw.github.com/mxcl/homebrew/go)"
where 127.0.0.1:30000 is the SOCKS proxy.
Something is blocking your connection to github. Try accessing the url https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb in your browser.
My issue was Curl not being configured to bypass my proxy.
One of they guys here in the office sorted it out for me. From what I understand the settings on curl had to be changed and not the proxy.
Hopefully this will help others in future.
I too had same problem.
The recipe for proxies should add --noproxy after curl statement
ruby -e "$(curl --noproxy -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
I also ran into this error and in my instance it was because my firewall was blocking or preventing outbound connections to Japan where it was trying to pull down the ruby version. Once the firewall rule was adjusted to allow the connections to that country everything worked fine.

Resources