Closed kangkang333 closed 6 days ago
The test-network scripts copy cert files and CA files to the correct places for the original 2 peers, if you simply add new peers in the docker compose file the certificates won't be correct for them. The error means that the CA that issued the certs for these peers is not a CA that is authorized in the channel configuration.
If you want a 4 peer network, take a look at https://github.com/hyperledger/fabric-samples/tree/main/test-network-nano-bash.
version: '3.7' services: peer0.org1.example.com: container_name: peer0.org1.example.com image: hyperledger/fabric-peer:latest labels: service: hyperledger-fabric environment:
Generic peer variables
peer1.org1.example.com: container_name: peer1.org1.example.com image: hyperledger/fabric-peer:latest labels: service: hyperledger-fabric environment:
Generic peer variables
peer0.org2.example.com: container_name: peer0.org2.example.com image: hyperledger/fabric-peer:latest labels: service: hyperledger-fabric environment:
Generic peer variables
peer1.org2.example.com: container_name: peer1.org2.example.com image: hyperledger/fabric-peer:latest labels: service: hyperledger-fabric environment:
Generic peer variables
cli: container_name: cli image: hyperledger/fabric-tools:latest volumes:
version: '3.7'
volumes: orderer.example.com: peer0.org1.example.com: peer1.org1.example.com: peer0.org2.example.com: peer1.org2.example.com:
networks: test: name: fabric_test
services:
orderer.example.com: container_name: orderer.example.com image: hyperledger/fabric-orderer:latest labels: service: hyperledger-fabric environment:
enabled TLS
test
peer0.org1.example.com: container_name: peer0.org1.example.com image: hyperledger/fabric-peer:latest labels: service: hyperledger-fabric environment:
- FABRIC_LOGGING_SPEC=DEBUG
Peer specific variables
test
peer1.org1.example.com: container_name: peer1.org1.example.com image: hyperledger/fabric-peer:latest labels: service: hyperledger-fabric environment:
- FABRIC_LOGGING_SPEC=DEBUG
Peer specific variables
test
peer0.org2.example.com: container_name: peer0.org2.example.com image: hyperledger/fabric-peer:latest labels: service: hyperledger-fabric environment:
- FABRIC_LOGGING_SPEC=DEBUG
Peer specific variables
test
peer1.org2.example.com: container_name: peer1.org2.example.com image: hyperledger/fabric-peer:latest labels: service: hyperledger-fabric environment:
- FABRIC_LOGGING_SPEC=DEBUG
Peer specific variables
test
cli: container_name: cli image: hyperledger/fabric-tools:latest labels: service: hyperledger-fabric tty: true stdin_open: true environment:
- FABRIC_LOGGING_SPEC=DEBUG
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: /bin/bash volumes:
PeerOrgs:
PeerOrgs:
execute the commands ./network.sh down ./network.sh up ./network.sh createChannel
peer1.org.example.com and peer1.org2.example.com have some problems: 2024-06-28 09:09:18.185 UTC 00ef ERRO [gossip.comm] GossipStream -> Authentication failed: failed classifying identity: Unable to extract msp.Identity from peer Identity: Peer Identity {"CN":"peer0.org2.example.com","Issuer-CN":"ca.org2.example.com","Issuer-L-ST-C":"[San Francisco]-[]-[US]","Issuer-OU":null,"L-ST-C":"[San Francisco]-[]-[US]","MSP":"Org2MSP","OU":["peer"]} cannot be validated. No MSP found able to do that.
2024-06-28 09:09:20.689 UTC 00f1 ERRO [peer.gossip.mcs] Verify -> Failed getting validated identity from peer identity [Peer Identity {"CN":"peer0.org2.example.com","Issuer-CN":"ca.org2.example.com","Issuer-L-ST-C":"[San Francisco]-[]-[US]","Issuer-OU":null,"L-ST-C":"[San Francisco]-[]-[US]","MSP":"Org2MSP","OU":["peer"]} cannot be validated. No MSP found able to do that.]
2024-06-28 09:09:20.690 UTC 00f2 WARN [gossip.gossip] handleMessage -> Failed validating identity message: Peer Identity {"CN":"peer0.org2.example.com","Issuer-CN":"ca.org2.example.com","Issuer-L-ST-C":"[San Francisco]-[]-[US]","Issuer-OU":null,"L-ST-C":"[San Francisco]-[]-[US]","MSP":"Org2MSP","OU":["peer"]} cannot be validated. No MSP found able to do that. Failed verifying message github.com/hyperledger/fabric/gossip/gossip.(certStore).validateIdentityMsg /go/src/github.com/hyperledger/fabric/gossip/gossip/certstore.go:105 github.com/hyperledger/fabric/gossip/gossip.(certStore).handleMessage /go/src/github.com/hyperledger/fabric/gossip/gossip/certstore.go:77 github.com/hyperledger/fabric/gossip/gossip.(Node).handleMessage /go/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:399 github.com/hyperledger/fabric/gossip/gossip.(Node).acceptMessages /go/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:326 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1571 github.com/hyperledger/fabric/gossip/gossip.(certStore).handleMessage /go/src/github.com/hyperledger/fabric/gossip/gossip/certstore.go:78 github.com/hyperledger/fabric/gossip/gossip.(Node).handleMessage /go/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:399 github.com/hyperledger/fabric/gossip/gossip.(*Node).acceptMessages /go/src/github.com/hyperledger/fabric/gossip/gossip/gossip_impl.go:326 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1571