Hyperledger fabric Hyperledger结构问题-“;启动容器时出错“;

Hyperledger fabric Hyperledger结构问题-“;启动容器时出错“;,hyperledger-fabric,hyperledger,Hyperledger Fabric,Hyperledger,我在运行Parallels的MacOSX上的ubuntu虚拟机上运行hyper-ledger fabric,下载了docker,设置了所有内容,但在运行第一个网络示例(命令./byfn.sh-m up)时,我遇到了这个错误 ===================== Chaincode is installed on remote peer PEER2 ===================== Instantiating chaincode on org2/peer2... CORE_PE

我在运行Parallels的MacOSX上的ubuntu虚拟机上运行hyper-ledger fabric,下载了docker,设置了所有内容,但在运行第一个网络示例(命令./byfn.sh-m up)时,我遇到了这个错误

===================== Chaincode is installed on remote peer PEER2 ===================== 

Instantiating chaincode on org2/peer2...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org2MSP
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=true
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2017-09-07 20:15:16.984 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2017-09-07 20:15:16.984 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2017-09-07 20:15:16.987 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2017-09-07 20:15:16.987 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2017-09-07 20:15:16.988 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A91070A6708031A0C08D4D1C6CD0510...324D53500A04657363630A0476736363 
2017-09-07 20:15:16.988 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 17D7F0C37473394040F19251CCA253B1ECA95F7AD65AF27EFA92DE1F10D94A9B 
Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: Get https://registry-1.docker.io/v2/hyperledger/fabric-baseos/manifests/x86_64-0.3.2: dial tcp: lookup registry-1.docker.io on 127.0.1.1:53: read udp 127.0.0.1:54547->127.0.1.1:53: i/o timeout
Usage:
  peer chaincode instantiate [flags]

Flags:
  -C, --channelID string   The channel on which this command should be executed (default "testchainid")
  -c, --ctor string        Constructor message for the chaincode in JSON format (default "{}")
  -E, --escc string        The name of the endorsement system chaincode to be used for this chaincode
  -l, --lang string        Language the chaincode is written in (default "golang")
  -n, --name string        Name of the chaincode
  -P, --policy string      The endorsement policy associated to this chaincode
  -v, --version string     Version of the chaincode specified in install/instantiate/upgrade commands
  -V, --vscc string        The name of the verification system chaincode to be used for this chaincode

Global Flags:
      --cafile string              Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
      --logging-level string       Default logging level and overrides, see core.yaml for full syntax
  -o, --orderer string             Ordering service endpoint
      --test.coverprofile string   Done (default "coverage.cov")
      --tls                        Use TLS when communicating with the orderer endpoint

!!!!!!!!!!!!!!! Chaincode instantiation on PEER2 on channel 'mychannel' failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
错误:在127.0.1.1:53上背书链码时出错:rpc错误:代码=未知描述=启动容器时出错:Get:拨号tcp:查找注册表-1.docker.io:读取udp 127.0.0.1:54547->127.0.1.1:53:i/o超时


正如错误中所说,您的虚拟机存在连接问题,似乎与外部IP的连接滞后。

您是否能够从Paralles虚拟机ping外部IP?啊,这解决了我的问题,实现了我通过手机的互联网连接不稳定,并连接到了真正的wifi连接,它现在工作得很好,一直到构建您的第一个网络的末尾。谢谢不客气。将我的评论转换为答案只是为了解决您的问题。