brew install download VERY slow, pauses for 10 minutes for seemingly no reason

Created on 31 Jul 2018  ·  21Comments  ·  Source: Homebrew/brew

My brew is updated.
brew doctor results: Your system is ready to brew.
brew config:

HOMEBREW_VERSION: 1.7.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: d6a245c05110c240e680da594c2cc6038998b82e
Last commit: 8 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: d1ae0a1e2f3294f0472410e3d3f1e4306971839e
Core tap last commit: 23 minutes ago
HOMEBREW_PREFIX: /usr/local
CPU: dodeca-core 64-bit kabylake
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.1 build 902
Git: 2.15.2 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: N/A
macOS: 10.13.6-x86_64
CLT: 9.4.1.0.1.1528165917
Xcode: N/A
XQuartz: N/A

So the problem I am having is that whenever I brew install any formula, the Download portion gets stuck for about 10 minutes before initiating the curl command. See below for verbose debug log with time.

Just to reiterate it is the ==> Downloading portion where it gets stuck. The verbose debug message doesn't seem to show any errors, and I've tried the curl command on its own and it works fast. No idea what is happening during the ==> Downloading output.

/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gmp.rb
==> Downloading https://homebrew.bintray.com/bottles/gmp-6.1.2_2.high_sierra.bottle.tar.gz
/usr/bin/curl -q --show-error --user-agent Homebrew/1.7.1 (Macintosh; Intel Mac OS X 10.13.6) curl/7.54.0 --fail --location --remote-time --continue-at - --output /Users/huanji/Library/Caches/Homebrew/gmp-6.1.2_2.high_sierra.bottle.tar.gz.incomplete https://homebrew.bintray.com/bottles/gmp-6.1.2_2.high_sierra.bottle.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1005k  100 1005k    0     0  1595k      0 --:--:-- --:--:-- --:--:-- 1595k
==> Verifying gmp-6.1.2_2.high_sierra.bottle.tar.gz checksum
==> Pouring gmp-6.1.2_2.high_sierra.bottle.tar.gz
tar xf /Users/huanji/Library/Caches/Homebrew/gmp-6.1.2_2.high_sierra.bottle.tar.gz -C /var/folders/gx/9ym9tnr11bqfcp81_fb7b4m80000gp/T/d20180731-87643-aas88u
Changing dylib ID of /usr/local/Cellar/gmp/6.1.2_2/lib/libgmp.10.dylib
  from @@HOMEBREW_PREFIX@@/opt/gmp/lib/libgmp.10.dylib
    to /usr/local/opt/gmp/lib/libgmp.10.dylib
Changing dylib ID of /usr/local/Cellar/gmp/6.1.2_2/lib/libgmpxx.4.dylib
  from @@HOMEBREW_PREFIX@@/opt/gmp/lib/libgmpxx.4.dylib
    to /usr/local/opt/gmp/lib/libgmpxx.4.dylib
Changing install name in /usr/local/Cellar/gmp/6.1.2_2/lib/libgmpxx.4.dylib
  from @@HOMEBREW_CELLAR@@/gmp/6.1.2_2/lib/libgmp.10.dylib
    to /usr/local/Cellar/gmp/6.1.2_2/lib/libgmp.10.dylib
==> Finishing up
ln -s ../Cellar/gmp/6.1.2_2/include/gmp.h gmp.h
ln -s ../Cellar/gmp/6.1.2_2/include/gmpxx.h gmpxx.h
ln -s ../../Cellar/gmp/6.1.2_2/share/info/gmp.info gmp.info
info /usr/local/share/info/gmp.info
ln -s ../../Cellar/gmp/6.1.2_2/share/info/gmp.info-1 gmp.info-1
ln -s ../../Cellar/gmp/6.1.2_2/share/info/gmp.info-2 gmp.info-2
ln -s ../Cellar/gmp/6.1.2_2/lib/libgmp.10.dylib libgmp.10.dylib
ln -s ../Cellar/gmp/6.1.2_2/lib/libgmp.a libgmp.a
ln -s ../Cellar/gmp/6.1.2_2/lib/libgmp.dylib libgmp.dylib
ln -s ../Cellar/gmp/6.1.2_2/lib/libgmpxx.4.dylib libgmpxx.4.dylib
ln -s ../Cellar/gmp/6.1.2_2/lib/libgmpxx.a libgmpxx.a
ln -s ../Cellar/gmp/6.1.2_2/lib/libgmpxx.dylib libgmpxx.dylib
/usr/bin/sandbox-exec -f /private/tmp/homebrew20180731-88713-1qaf2pp.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -W0 -I /Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib:/Library/Ruby/Site/2.3.0:/Library/Ruby/Site/2.3.0/x86_64-darwin17:/Library/Ruby/Site/2.3.0/universal-darwin17:/Library/Ruby/Site:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin17:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/universal-darwin17:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/x86_64-darwin17:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin17:/usr/local/Homebrew/Library/Homebrew/cask/lib:/usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/postinstall.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gmp.rb --debug --verbose
/usr/local/Homebrew/Library/Homebrew/postinstall.rb (Formulary::FromPathLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gmp.rb
==> Summary
🍺  /usr/local/Cellar/gmp/6.1.2_2: 18 files, 3.1MB

real    10m3.633s
user    0m1.742s
sys 0m0.874s
outdated

Most helpful comment

I experienced similar issues, the culprit was BitDefender Traffic Scan, which does TLS MitM in a most likely broken way, since I've seen it break other random HTTPS requests, like certain HEAD requests. I wasn't able to figure out a pattern, as the software doesn't appear to output any kind of useful logs. @mrleeio is definitely using the same software, as the certificate it uses is visible in the curl logs posted here (CN=Bitdefender CA SSL).

Disabling it (or bypassing it with a proxy) makes everything work as normal.

All 21 comments

Please run brew install --debug verbose and paste the output here. I'm particularly interested in the last output printed that seems to hang.

The last output pasted in the original post is what you requested. The last printout that hangs is line 2:
==> Downloading https://homebrew.bintray.com/bottles/gmp-6.1.2_2.high_sierra.bottle.tar.gz

Thanks! Just to confirm: that's before /usr/bin/curl -q --show-error ... is printed?

Yep, basically it's stuck on Downloading for 10 minutes, and then the curl prints and is completed near instantly.

I used to see similar delays when brew polled the stdout and stderr streams of curl in the wrong order. This has been fixed for cask but not yet for formulae.

@huan-ji Does the same problem occur when you brew cask install something?

@claui, the download strategies have been merged and are all using SystemCommand now, so if this is indeed the problem it should be fixed when a new tag is released.

With that in mind: closing this and it can be reopened if still a problem after the next tag. Thanks all!

The same problem does not occur when brew cask installing, FYI.

I have been experiencing the same problem for weeks now.

brew cask works well, brew install foo on the other hand takes ages.

@claui @MikeMcQuaid having caught up on those linked conversations I see the update for formulae was closed. Is there a work around for those of us experiencing this problem?

To add more context I do a lot of environment setup at work and run into this constantly.

I have also been experiencing this same exact problem. For example downloading git with brew install git took over 50 minutes. Is there a fix for this?

@mrleeio The update you mentioned is now obsolete, see https://github.com/Homebrew/brew/issues/4579#issuecomment-411705056. My assumption that this was responsible was probably wrong.

Reopening this thread due to the recent reports.

Sorry to contradict you @claui but I'm closing this out until this is reproducible on a maintainers machine or clean VM.

@claui @MikeMcQuaid could you provide some guidance on how I can provide useful information to either reproduce this _or_ understand what is happening? This has turned into a daily struggle for me.

brew update --verbose log

~ % brew update
Updated 2 taps (homebrew/core, homebrew/cask).
==> New Formulae
aravis              llvm@6              nng                 oclgrind
==> Updated Formulae
node ✔                                   kibana
angular-cli                              [email protected]
apache-flink                             kubernetes-service-catalog-client
ark                                      kumo
arpack                                   libetpan
bind                                     llvm
bitcoin                                  logstash
brotli                                   luaradio
bullet                                   mbedtls
cash-cli                                 mdds
chakra                                   mosquitto
chapel                                   nano
coffeescript                             neko
convox                                   ntopng
docker-machine-nfs                       opam
dub                                      ortp
duplicity                                paket
elasticsearch                            pandoc-crossref
[email protected]                        pmd
erlang@19                                pre-commit
fmsx                                     prettier
freetds                                  qt
frugal                                   skafos
geckodriver                              spotbugs
git-archive-all                          tomcat@7
glances                                  tomcat@8
gradle                                   twarc
grunt-completion                         vegeta
hapi-fhir-cli                            vips
hwloc                                    wtf
jenkins                                  xerces-c
jerasure                                 xtensor

~ % brew update --verbose
Checking if we need to fetch /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/codeclimate/homebrew-formulae...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/thoughtbot/homebrew-formulae...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/universal-ctags/homebrew-universal-ctags...
Updating /usr/local/Homebrew...
Reset branch 'stable'
Current branch stable is up to date.

Already up-to-date.

brew upgrade --verbose log (timed)

~ % time brew upgrade --verbose
==> Upgrading 1 outdated package, with result:
node 10.10.0 -> 10.11.0
==> Upgrading node
rm /usr/local/bin/node
rm /usr/local/etc/bash_completion.d/npm
rm /usr/local/include/node
rm /usr/local/lib/dtrace/node.d
rm /usr/local/share/doc/node
rm /usr/local/share/man/man1/node.1
rm /usr/local/share/systemtap
rmdir /usr/local/lib/dtrace
==> Downloading https://homebrew.bintray.com/bottles/node-10.11.0.high_sierra.bottle.tar.gz
/usr/bin/curl -q --show-error --user-agent Homebrew/1.7.5\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.13.6\)\ curl/7.54.0 --fail --location --remote-time --continue-at 0 --output /Users/michaellee/Library/Caches/Homebrew/downloads/8f81f304239f93724d065a9ffb43868b08d781d4cd3d3dbe6a6d9a5619b6affe--node-10.11.0.high_sierra.bottle.tar.gz.incomplete https://homebrew.bintray.com/bottles/node-10.11.0.high_sierra.bottle.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 12.5M  100 12.5M    0     0  9399k      0  0:00:01  0:00:01 --:--:-- 21.1M
==> Verifying 8f81f304239f93724d065a9ffb43868b08d781d4cd3d3dbe6a6d9a5619b6affe--node-10.11.0.high_sierra.bottle.tar.gz checksum
==> Pouring node-10.11.0.high_sierra.bottle.tar.gz
tar xf /Users/michaellee/Library/Caches/Homebrew/downloads/8f81f304239f93724d065a9ffb43868b08d781d4cd3d3dbe6a6d9a5619b6affe--node-10.11.0.high_sierra.bottle.tar.gz -C /var/folders/p5/s4_xlky52jn12zw0yf98fxzc0000gn/T/d20180921-42057-1cul89o
cp -pR /var/folders/p5/s4_xlky52jn12zw0yf98fxzc0000gn/T/d20180921-42057-1cul89o/node/. /usr/local/Cellar/node
==> Finishing up
ln -s ../../Cellar/node/10.11.0/etc/bash_completion.d/npm npm
ln -s ../Cellar/node/10.11.0/bin/node node
ln -s ../Cellar/node/10.11.0/include/node node
ln -s ../../Cellar/node/10.11.0/share/doc/node node
ln -s ../../../Cellar/node/10.11.0/share/man/man1/node.1 node.1
ln -s ../Cellar/node/10.11.0/share/systemtap systemtap
mkdir -p /usr/local/lib/dtrace
ln -s ../../Cellar/node/10.11.0/lib/dtrace/node.d node.d
/usr/bin/sandbox-exec -f /private/tmp/homebrew20180921-43189-n8eepf.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/ruby-macho-2.0.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/plist-3.4.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/backports-3.11.4/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/activesupport-5.2.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/tzinfo-1.2.5/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/thread_safe-0.3.6/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/minitest-5.11.3/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/i18n-1.1.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/concurrent-ruby-1.0.5/lib:/Library/Ruby/Gems/2.3.0/gems/did_you_mean-1.0.0/lib:/Library/Ruby/Site/2.3.0:/Library/Ruby/Site/2.3.0/x86_64-darwin17:/Library/Ruby/Site/2.3.0/universal-darwin17:/Library/Ruby/Site:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin17:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby/2.3.0/universal-darwin17:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/vendor_ruby:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/x86_64-darwin17:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin17:/usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/postinstall.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/node.rb --verbose
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/node/10.11.0: 3,940 files, 46.3MB
==> Checking dependents for outdated formulae
==> No dependents to upgrade
==> Checking dependents for broken library links
==> No broken dependents to reinstall
brew upgrade --verbose  4.74s user 7.23s system 0% cpu 20:14.10 total

brew config

~ % brew config
HOMEBREW_VERSION: 1.7.5
ORIGIN: https://github.com/Homebrew/brew
HEAD: d639559c4de48faad79d3ecb1ec84dc851ea66f2
Last commit: 4 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 6211f5ecec518d449ab5460754dfc7ebe5a6c302
Core tap last commit: 50 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_GIT: git
HOMEBREW_VISUAL: vim
CPU: octa-core 64-bit kabylake
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.19.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 10.0.1, 1.8.0_172
macOS: 10.13.6-x86_64
CLT: 10.0.0.0.1.1535735448
CLT headers: N/A
Xcode: 10.0
XQuartz: N/A

brew doctor

~ % brew doctor
Your system is ready to brew.

As @huan-ji reported it gets stuck at the curl command for _a long time_. The verbose logs do not appear to reveal much.

I had time to write this response, walk the dog, and make coffee before I could paste in the results of the brew upgrade command. 😢

@mrleeio Sure, a few things:

  • do you have any curl configuration or proxy settings?
  • are you using a proxy server?
  • can you reproduce this regardless of ISP?
  • can you reproduce this with curling the same file outside of Homebrew?
  • can you reproduce this with wgeting the same file outside of Homebrew?

Do you have any curl configuration / proxy settings?

Default configuration

Are you using a proxy?

No Proxy

Can you reproduce regardless of ISP?

Great question - will have to get back to you next upgrade. I'll try using my mobile line.

_I can_ tell you I experience the same problem at work & home, but I believe the same ISP servers both locations.

EDIT: Tried installing wget using a mobile hotspot (different ISP), no change in behaviour.

EDIT2: Tried changing DNS servers, no change in behaviour.

Can you reproduce this with curling the same file outside of Homebrew?

No.

brew_test % time curl https://homebrew.bintray.com/bottles/node-10.11.0.high_sierra.bottle.tar.gz --output node-10-11.0.bottle.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl  --output node-10-11.0.bottle.tar.gz  0.04s user 0.01s system 9% cpu 0.517 total
brew_test % ls
node-10-11.0.bottle.tar.gz

Can you reproduce this with wgeting the same file outside of Homebrew?

Will post this in 20 minutes when home brew finishes installing wget

I doubt it.

brew_test % time wget https://homebrew.bintray.com/bottles/node-10.11.0.high_sierra.bottle.tar.gz --no-check-certificate
--2018-09-21 10:08:15--  https://homebrew.bintray.com/bottles/node-10.11.0.high_sierra.bottle.tar.gz
Resolving homebrew.bintray.com (homebrew.bintray.com)... 75.126.118.188
Connecting to homebrew.bintray.com (homebrew.bintray.com)|75.126.118.188|:443... connected.
WARNING: cannot verify homebrew.bintray.com's certificate, issued by ‘CN=Bitdefender CA SSL,O=Endpoint,L=Bucharest,ST=Bucharest,C=RO’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 302
Location: https://akamai.bintray.com/6f/6f1c350e623963b2fa3356d08dc0450555da66dcdcf63d824c9b4d99e40f8231?__gda__=exp=1537550415~hmac=55f9467cf3b9a9ee9c292ab9d17a4d915eae27e1965442eedebda8f241471257&response-content-disposition=attachment%3Bfilename%3D%22node-10.11.0.high_sierra.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX193LFtz8Z2-AydDbk4_4YCDGUGHHXUqEtecL2Y3a72RRhs85nqywZ-n24HzPRPDjTrhrWobJ3iZijtgzPHgmFeCtovtyISozZc9raeiUoic2jYJTGsQOPS2QZ95FLy-zD07aHE0TupEfA&response-X-Checksum-Sha1=3cafa0c8024cf0493e66b3968d0729bba3cd1b23&response-X-Checksum-Sha2=6f1c350e623963b2fa3356d08dc0450555da66dcdcf63d824c9b4d99e40f8231 [following]
--2018-09-21 10:08:15--  https://akamai.bintray.com/6f/6f1c350e623963b2fa3356d08dc0450555da66dcdcf63d824c9b4d99e40f8231?__gda__=exp=1537550415~hmac=55f9467cf3b9a9ee9c292ab9d17a4d915eae27e1965442eedebda8f241471257&response-content-disposition=attachment%3Bfilename%3D%22node-10.11.0.high_sierra.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX193LFtz8Z2-AydDbk4_4YCDGUGHHXUqEtecL2Y3a72RRhs85nqywZ-n24HzPRPDjTrhrWobJ3iZijtgzPHgmFeCtovtyISozZc9raeiUoic2jYJTGsQOPS2QZ95FLy-zD07aHE0TupEfA&response-X-Checksum-Sha1=3cafa0c8024cf0493e66b3968d0729bba3cd1b23&response-X-Checksum-Sha2=6f1c350e623963b2fa3356d08dc0450555da66dcdcf63d824c9b4d99e40f8231
Resolving akamai.bintray.com (akamai.bintray.com)... 23.59.158.60
Connecting to akamai.bintray.com (akamai.bintray.com)|23.59.158.60|:443... connected.
WARNING: cannot verify akamai.bintray.com's certificate, issued by ‘CN=Bitdefender CA SSL,O=Endpoint,L=Bucharest,ST=Bucharest,C=RO’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 13162440 (13M) [application/gzip]
Saving to: ‘node-10.11.0.high_sierra.bottle.tar.gz.1’

node-10.11.0.high_sierra.bottle.tar.gz.1                                                100%[===============================================================================================================================================================================================================================>]  12.55M  31.9MB/s    in 0.4s

2018-09-21 10:08:16 (31.9 MB/s) - ‘node-10.11.0.high_sierra.bottle.tar.gz.1’ saved [13162440/13162440]

wget  --no-check-certificate  0.04s user 0.07s system 9% cpu 1.152 total

Took about 30 minutes to install wget

--

@MikeMcQuaid please let me know if I can provide more details

I've experienced the same issues:

==> Downloading https://services.gradle.org/distributions/gradle-4.10.2-all.zip
==> Downloading from https://downloads.gradle.org/distributions/gradle-4.10.2-all.zip

################################################################## 100.0%

🍺 /usr/local/Cellar/gradle/4.10.2: 203 files, 83.7MB, built in 27 minutes 25 seconds

@mrleeio Please try to reproduce using curl inside brew sh. If you can't reproduce there please try with in a brew reinstall -i shell. Thanks!

@MikeMcQuaid sure thing

EDIT: I forgot to mention that I tried before and after the brew reinstall -i command.

brew sh curl

brew ~$ curl https://homebrew.bintray.com/bottles/node-10.11.0.high_sierra.bottle.tar.gz -O
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
brew ~$ curl -L https://homebrew.bintray.com/bottles/node-10.11.0.high_sierra.bottle.tar.gz -O
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 12.5M  100 12.5M    0     0  9249k      0  0:00:01  0:00:01 --:--:-- 23.1M
brew ~$ ls
node-10.11.0.high_sierra.bottle.tar.gz
brew ~$ time curl -L https://homebrew.bintray.com/bottles/node-10.11.0.high_sierra.bottle.tar.gz -O
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100 12.5M  100 12.5M    0     0  5485k      0  0:00:02  0:00:02 --:--:-- 17.0M
curl -L  -O  0.38s user 0.07s system 19% cpu 2.357 total
brew ~$ ls
node-10.11.0.high_sierra.bottle.tar.gz
brew ~$

Within brew sh had to pass in the location flag for curl _but_ the download itself was only 2.3 seconds. Seems like this command fails to reproduce the problem. Unless it is related to the redirect...

brew sh wget

brew ~$ time wget https://homebrew.bintray.com/bottles/node-10.11.0.high_sierra.bottle.tar.gz --no-check-certificate
--2018-09-25 07:48:06--  https://homebrew.bintray.com/bottles/node-10.11.0.high_sierra.bottle.tar.gz
Resolving homebrew.bintray.com (homebrew.bintray.com)... 108.168.243.150
Connecting to homebrew.bintray.com (homebrew.bintray.com)|108.168.243.150|:443... connected.
WARNING: cannot verify homebrew.bintray.com's certificate, issued by ‘CN=Bitdefender CA SSL,O=Endpoint,L=Bucharest,ST=Bucharest,C=RO’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 302
Location: https://akamai.bintray.com/6f/6f1c350e623963b2fa3356d08dc0450555da66dcdcf63d824c9b4d99e40f8231?__gda__=exp=1537887606~hmac=73c4d8ef9ad2276bbed1a3e3fe142bdc660fc81424a3bc89afc202497d775b2e&response-content-disposition=attachment%3Bfilename%3D%22node-10.11.0.high_sierra.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX1-eVoI1rH0GKz5oe5eyBQVMwYqXtdQ1l6Zk8NSaQEE2-AEDA389npaL2lRvIe4vsRhMV9D0kLcqihP4Jig9Bodb0sNNPB9JwLYD4Ns-XRDyjCnzxSKyyoeBKiQeVwxoD-vE6g9IU5P65w&response-X-Checksum-Sha1=3cafa0c8024cf0493e66b3968d0729bba3cd1b23&response-X-Checksum-Sha2=6f1c350e623963b2fa3356d08dc0450555da66dcdcf63d824c9b4d99e40f8231 [following]
--2018-09-25 07:48:06--  https://akamai.bintray.com/6f/6f1c350e623963b2fa3356d08dc0450555da66dcdcf63d824c9b4d99e40f8231?__gda__=exp=1537887606~hmac=73c4d8ef9ad2276bbed1a3e3fe142bdc660fc81424a3bc89afc202497d775b2e&response-content-disposition=attachment%3Bfilename%3D%22node-10.11.0.high_sierra.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX1-eVoI1rH0GKz5oe5eyBQVMwYqXtdQ1l6Zk8NSaQEE2-AEDA389npaL2lRvIe4vsRhMV9D0kLcqihP4Jig9Bodb0sNNPB9JwLYD4Ns-XRDyjCnzxSKyyoeBKiQeVwxoD-vE6g9IU5P65w&response-X-Checksum-Sha1=3cafa0c8024cf0493e66b3968d0729bba3cd1b23&response-X-Checksum-Sha2=6f1c350e623963b2fa3356d08dc0450555da66dcdcf63d824c9b4d99e40f8231
Resolving akamai.bintray.com (akamai.bintray.com)... 23.59.158.60
Connecting to akamai.bintray.com (akamai.bintray.com)|23.59.158.60|:443... connected.
WARNING: cannot verify akamai.bintray.com's certificate, issued by ‘CN=Bitdefender CA SSL,O=Endpoint,L=Bucharest,ST=Bucharest,C=RO’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 13162440 (13M) [application/gzip]
Saving to: ‘node-10.11.0.high_sierra.bottle.tar.gz’

node-10.11.0.high_sierra.bottle.tar.gz                                                                                     100%[======================================================================================================================================================================================================================================================================================================================================>]  12.55M  32.8MB/s    in 0.4s

2018-09-25 07:48:07 (32.8 MB/s) - ‘node-10.11.0.high_sierra.bottle.tar.gz’ saved [13162440/13162440]

wget  --no-check-certificate  0.04s user 0.07s system 8% cpu 1.230 total
brew ~$ ls
node-10.11.0.high_sierra.bottle.tar.gz

Faster than curl, but failed to reproduce the problem again.


For todays episode of long upgrade times awscli is our contestant

~ % time brew upgrade
==> Upgrading 1 outdated package, with result:
awscli 1.16.10 -> 1.16.20
==> Upgrading awscli
==> Downloading https://homebrew.bintray.com/bottles/awscli-1.16.20.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring awscli-1.16.20.high_sierra.bottle.tar.gz
==> Caveats
The "examples" directory has been installed to:
  /usr/local/share/awscli/examples

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
🍺  /usr/local/Cellar/awscli/1.16.20: 4,754 files, 43.6MB
brew upgrade  4.39s user 6.56s system 1% cpu 11:21.07 total

_I will come back and fill this in when it finishes (tool 11 minutes)_

For science I tried re-installing a package in my bash shell instead of ZSH, Homebrew download still takes forever.

I experienced similar issues, the culprit was BitDefender Traffic Scan, which does TLS MitM in a most likely broken way, since I've seen it break other random HTTPS requests, like certain HEAD requests. I wasn't able to figure out a pattern, as the software doesn't appear to output any kind of useful logs. @mrleeio is definitely using the same software, as the certificate it uses is visible in the curl logs posted here (CN=Bitdefender CA SSL).

Disabling it (or bypassing it with a proxy) makes everything work as normal.

@mpontes great catch, will speak with the system admins at work to see what we can do about this.

Thanks for the help folks, I'll report back one last time if the issue has been resolved by disabling this feature.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JaKXz picture JaKXz  ·  3Comments

zelsonia picture zelsonia  ·  4Comments

kirk86 picture kirk86  ·  3Comments

paanvaannd picture paanvaannd  ·  4Comments

MikeMcQuaid picture MikeMcQuaid  ·  3Comments