Tools, FAQ, Tutorials:
Watch "orderer" Container Log
How to watch the log file of the "orderer" Container?
✍: FYIcenter.com
The "orderer" Container plays an important role in a Hyperledger Fabric network.
You can follow this tutorial to watch its log file:
1. Set up a new terminal on the hosting system to follow the log file of the "orderer" container:
$ docker logs -f orderer.example.com
[localconfig] completeInitialization -> INFO 001 Kafka.Version unset, setting to 0.10.2.0
[orderer.common.server] prettyPrintStruct -> INFO 002 Orderer config values:
General.LedgerType = "file"
General.ListenAddress = "0.0.0.0"
General.ListenPort = 7050
General.TLS.Enabled = true
General.TLS.PrivateKey = "/var/hyperledger/orderer/tls/server.key"
General.TLS.Certificate = "/var/hyperledger/orderer/tls/server.crt"
General.TLS.RootCAs = [/var/hyperledger/orderer/tls/ca.crt]
...
[orderer.common.broadcast] Handle -> WARN 032 Error reading from 192.168.1.7:58476: \
rpc error: code = Canceled desc = context canceled
[comm.grpc.server] 1 -> INFO 033 streaming call completed \
grpc.service=orderer.AtomicBroadcast \
grpc.method=Broadcast grpc.peer_address=192.168.1.7:58476 \
error="rpc error: code = Canceled desc = context canceled" \
grpc.code=Canceled grpc.call_duration=1m31.930790373s
2. Use another terminal to query the chaincode:
$ docker exec -it cli bash
bash-4.4# peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'
90
No new message printed on the orderer log window.
3. Use another terminal to invoke the chaincode:
bash-4.4# peer chaincode invoke -o orderer.example.com:7050 --tls true \
--cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto\
/ordererOrganizations/example.com/orderers/orderer.example.com/msp\
/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc \
--peerAddresses peer0.org1.example.com:9051 --tlsRootCertFiles \
/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations\
/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt \
--peerAddresses peer0.org2.example.com:9051 --tlsRootCertFiles \
/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations\
/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt \
-c '{"Args":["invoke","a","b","10"]}'
[chaincodeCmd] chaincodeInvokeOrQuery -> INFO 001 Chaincode invoke successful. result: status:200
Two new messages printed on the orderer log window, one warning and one information:
[orderer.common.broadcast] Handle -> WARN 034 Error reading from 192.168.1.7:36600: \ rpc error: code = Canceled desc = context canceled [comm.grpc.server] 1 -> INFO 035 streaming call completed \ grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast \ grpc.peer_address=192.168.1.7:36600 error="rpc error: code = Canceled desc = context canceled" \ grpc.code=Canceled grpc.call_duration=64.329479ms
⇐ Types of Hyperledger Fabric Docker Containers
2020-07-07, ∼2291🔥, 0💬
Popular Posts:
Where to find tutorials on Visual Studio? I want to know How to learn Visual Studio. Here is a large...
Where to find tutorials on Python programming language? I want to learn Python. Here is a large coll...
What is Azure API Management Gateway? Azure API Management Gateway is the Azure Web server that serv...
How To Open Standard Output as a File Handle in PHP? If you want to open the standard output as a fi...
How to use .NET CLR Types in Azure API Policy? By default, Azure imports many basic .NET CLR (Common...