Tools, FAQ, Tutorials:
Peer Containers Not Joined to Channel
Can I stop Peer Containers That Are Not Joined to Channel?
✍: FYIcenter.com
Yes. You can stop Peer Containers That Are Not Joined to Channel.
For example, you have 1 channel, "mychannel", and 4 peers. You know that only 2 of them are joined to the channel. You can stop the other peer containers.
1. List all peer containers:
$ docker ps -all | grep peer hyperledger/fabric-peer:latest "peer node start" Up 3 hours peer1.org2.example.com hyperledger/fabric-peer:latest "peer node start" Up 3 hours peer0.org1.example.com hyperledger/fabric-peer:latest "peer node start" Up 3 hours peer1.org1.example.com hyperledger/fabric-peer:latest "peer node start" Up 3 hours peer0.org2.example.com
2. Stop 2 peer containers that are not joined to the channel:
$ docker stop peer1.org1.example.com $ docker stop peer1.org2.example.com
3. Do not remove their container images. You may want to use them later.
4. List all chaincode containers again:
$ docker ps --all | grep peer hyperledger/fabric-peer:latest "peer node start" Up 3 hours peer0.org1.example.com hyperledger/fabric-peer:latest "peer node start" Up 3 hours peer0.org2.example.com
5. Verify the chaincode instance:
$ docker exec -it cli bash bash-4.4# peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}' 80
Only 2 peer containers are running now. The "expireDeadMembers" peer log messages will not show up any more.
⇒ Watch Chaincode Container Log
2020-07-07, 836🔥, 0💬
Popular Posts:
How To Get the Minimum or Maximum Value of an Array in PHP? If you want to get the minimum or maximu...
How to use the JSON to XML Conversion Tool at utilities-online.info? If you want to try the JSON to ...
How to use the "set-backend-service" Policy Statement for an Azure API service operation? The "set-b...
How to Install Docker Desktop 2.5.0 on Windows 10? You can follow this tutorial to Install Docker De...
How to dump (or encode, serialize) a Python object into a JSON string using json.dumps()? The json.d...