Fabric-Failed to connect to goo.gl port 443: Connection timed out
阿新 • • 發佈:2018-12-13
curl -sSL https://goo.gl/Gci9ZX | bash
但是基本上都會遇到下面的錯誤:
curl: (7) Failed to connect to goo.gl port 443: Connection timed out
這個問題 google了也未必能解決,網上的說法一大堆,有的說是ipv6導致,有的說是防火牆導致。。。
如果是Fabric,我這裡推薦一種做法,無意間發現的,沒想到竟然有效果:
step1
在瀏覽器中開啟命令 curl -sSL https://goo.gl/Gci9ZX | bash
中的這個連結https://goo.gl/Gci9ZX
(需要翻牆),然後你可以看到這其實就是一個shell指令碼,內容如下:
#!/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# current version of fabric released
export VERSION=${1:-1.0.6}
# current version of fabric-ca released
export CA_VERSION=${2:-$VERSION}
export ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/' )-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}')
#Set MARCH variable i.e ppc64le,s390x,x86_64,i386
MARCH=`uname -m`
dockerFabricPull() {
local FABRIC_TAG=$1
for IMAGES in peer orderer couchdb ccenv javaenv kafka zookeeper tools; do
echo "==> FABRIC IMAGE: $IMAGES"
echo
docker pull hyperledger/fabric-$IMAGES:$FABRIC_TAG
docker tag hyperledger/fabric-$IMAGES:$FABRIC_TAG hyperledger/fabric-$IMAGES
done
}
dockerCaPull() {
local CA_TAG=$1
echo "==> FABRIC CA IMAGE"
echo
docker pull hyperledger/fabric-ca:$CA_TAG
docker tag hyperledger/fabric-ca:$CA_TAG hyperledger/fabric-ca
}
: ${CA_TAG:="$MARCH-$CA_VERSION"}
: ${FABRIC_TAG:="$MARCH-$VERSION"}
echo "===> Downloading platform binaries"
curl https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/${ARCH}-${VERSION}/hyperledger-fabric-${ARCH}-${VERSION}.tar.gz | tar xz
echo "===> Pulling fabric Images"
dockerFabricPull ${FABRIC_TAG}
echo "===> Pulling fabric ca Image"
dockerCaPull ${CA_TAG}
echo
echo "===> List out hyperledger docker images"
docker images | grep hyperledger*
指令碼也就主要做了兩件事:下載平臺相關可執行檔案和下載fabric docker映象。
step2
在你的本地目錄新建download.sh(名字隨便起),將網頁上的內容複製到檔案裡,然後儲存退出執行以下命令:
chmod a+x download.sh
然後執行命令:
./download.sh
你可以看到已經開始下載了!
PS:這裡第一階段下載平臺相關執行檔案可以翻牆要快一些,然後當開始下載docker映象時關掉代理。為了使docker下載快一點,記得配置docker加速器!