Hyperledger fabric 为什么网络无法在第一个网络上添加新组织,且错误分类帐id已存在,而对等方尚未加入网络?
我使用的是HLF版本1.4.4。我想创建一个有1个组织的频道,以后再添加其他组织。基于HLF first network,我删除了关于org2的所有内容,并删除了org1.peer1.org1。每个组织有1个ca、1个对等、1个couchdb和1个cli。此外,我还更改了组织名称。这是第一个组织的yaml文件的一部分:Hyperledger fabric 为什么网络无法在第一个网络上添加新组织,且错误分类帐id已存在,而对等方尚未加入网络?,hyperledger-fabric,Hyperledger Fabric,我使用的是HLF版本1.4.4。我想创建一个有1个组织的频道,以后再添加其他组织。基于HLF first network,我删除了关于org2的所有内容,并删除了org1.peer1.org1。每个组织有1个ca、1个对等、1个couchdb和1个cli。此外,我还更改了组织名称。这是第一个组织的yaml文件的一部分: peer0.MyFirstOrg.example.com: container_name: peer0.MyFirstOrg.example.com exte
peer0.MyFirstOrg.example.com:
container_name: peer0.MyFirstOrg.example.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.MyFirstOrg.example.com
- CORE_PEER_ADDRESS=peer0.MyFirstOrg.example.com:7051
- CORE_PEER_LISTENADDRESS=0.0.0.0:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.MyFirstOrg.example.com:7051
- CORE_PEER_LOCALMSPID=MyFirstOrgMSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/MyFirstOrg.example.com/peers/peer0.MyFirstOrg.example.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/MyFirstOrg.example.com/peers/peer0.MyFirstOrg.example.com/tls:/etc/hyperledger/fabric/tls
- peer0.MyFirstOrg.example.com:/var/hyperledger/production
ports:
- 7051:7051
这是针对新组织的:
peer0.NEWORG.example.com:
container_name: peer0.NEWORG.example.com
extends:
file: base/peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.NEWORG.example.com
- CORE_PEER_ADDRESS=peer0.NEWORG.example.com:11051
- CORE_PEER_LISTENADDRESS=peer0.NEWORG.example.com:11051
#- CORE_PEER_CHAINCODEADDRESS=peer0.NEWORG.example.com:11052
#- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:11052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.NEWORG.example.com:11051
- CORE_PEER_LOCALMSPID=NEWORGMSP
volumes:
- /var/run/:/host/var/run/
- ./new-org-artifacts/crypto-config/peerOrganizations/NEWORG.example.com/peers/peer0.NEWORG.example.com/msp:/etc/hyperledger/fabric/msp
- ./new-org-artifacts/crypto-config/peerOrganizations/NEWORG.example.com/peers/peer0.NEWORG.example.com/tls:/etc/hyperledger/fabric/tls
- peer0.NEWORG.example.com:/var/hyperledger/production
ports:
- 11051:11051
networks:
- mynewnetwork
来自peer-base.yaml的一部分:
peer-base:
image: hyperledger/fabric-peer:$IMAGE_TAG
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
# the following setting starts chaincode containers on the same
# bridge network as the peers
# https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_mynewnetwork
- FABRIC_LOGGING_SPEC=INFO
#- FABRIC_LOGGING_SPEC=DEBUG
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: peer node start
我执行:
byfn.sh up -c mychannel -s couchdb
“MyFirstOrg”没有错误。已安装并安装链码
然而,当我执行:
eyfn.sh up -c mychannel -s couchdb
新组织无法加入网络。
输出为:
无法从genesis区块创建分类账,因为分类账已经存在
来自NEWORG日志的警告是:
无法连接到终结点:127.0.0.1:7051,内部终结点:127.0.0.1:7051,PKI-ID:,元数据::上下文截止日期已超过
所有的集装箱都装上了。我重新启动了网络。我清理了docker容器和docker卷,但问题仍然存在。我检查了新组织的cli,但对等方尚未加入网络