我正在尝试在多台计算机上设置余额转移网络。
这类似于在
处的查询unable to Instantiate any chaincodes on peers of newly Added org
但是,这个问题没有解决方法
我的方法描述如下:
第一台计算机上的Org1,订购者,CA1 2.Org2,第二台计算机上的CA2 3,相应地分割docker-compose文件 4.将IP添加到网络配置文件中
我能够注册两个组织的用户并在两个主机上安装链代码。但是,我无法在Org 2(即第二台计算机)上实例化链代码。
我收到以下错误:
[2018-07-19 11:20:31.401] [错误]实例化链代码- REQUEST_TIMEOUT:10.228.27.96:8051 [2018-07-19 11:20:31.402] [错误]实例化链代码-错误: ChannelEventHub已关闭 在ChannelEventHub.disconnect(/Users/digital3/Desktop/Final/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:444:21) 在Timeout.setTimeout(/Users/digital3/Desktop/Final/balance-transfer/app/instantiate-chaincode.js:101:10) 在ontimeout(timers.js:498:11) 在tryOnTimeout(timers.js:323:5) 在Timer.listOnTimeout(timers.js:290:5) [2018-07-19 11:20:31.403] [错误]实例化链代码-错误:ChannelEventHub已关闭 在ChannelEventHub.disconnect(/Users/digital3/Desktop/Final/balance-transfer/node_modules/fabric-client/lib/ChannelEventHub.js:444:21) 在Timeout.setTimeout(/Users/digital3/Desktop/Final/balance-transfer/app/instantiate-chaincode.js:101:10) 在ontimeout(timers.js:498:11) 在tryOnTimeout(timers.js:323:5) 在Timer.listOnTimeout(timers.js:290:5) [2018-07-19 11:20:31.403] [错误]实例化链代码-无法实例化。原因:错误:ChannelEventHub已关闭 (节点:3837)UnhandledPromiseRejectionWarning:错误:无法实例化。原因:错误:ChannelEventHub已关闭
据我了解,该提案已发送给订购者,但在那里失败。
对等日志建议相同:无法连接到orderer.example.com:7050无法连接到任何端点
有人可以帮我吗?我是否应该在docker-compose文件中为ORG2添加任何额外的主机参数。我现在仅在网络配置文件中包含IP。
用于ORG 2的Docker组成如下所示
ca.org2.example.com:
image: hyperledger/fabric-ca
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-org2
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/a7d47efa46a6ba07730c850fed2c1375df27360d7227f48cdc2f80e505678005_sk
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/a7d47efa46a6ba07730c850fed2c1375df27360d7227f48cdc2f80e505678005_sk
ports:
- "8054:7054"
command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
volumes:
- ./channel/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg2
peer0.org2.example.com: container_name:peer0.org2.example.com
extends:
file: base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.org2.example.com
- CORE_PEER_LOCALMSPID=Org2MSP
- CORE_PEER_ADDRESS=peer0.org2.example.com:7051
ports:
- 8051:7051
- 8053:7053
volumes:
- ./channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/:/etc/hyperledger/crypto/peer
peer1.org2.example.com: container_name:peer1.org2.example.com
extends:
file: base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer1.org2.example.com
- CORE_PEER_LOCALMSPID=Org2MSP
- CORE_PEER_ADDRESS=peer1.org2.example.com:7051
ports:
- 8056:7051
- 8058:7053
volumes:
- ./channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/:/etc/hyperledger/crypto/peer