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, 1404🔥, 0💬
Popular Posts:
Why am I getting this "Docker failed to initialize" error? After installing the latest version of Do...
What is the Azure AD v1.0 OpenID Metadata Document? Azure AD v1.0 OpenID Metadata Document is an onl...
Where to find tutorials on Using Azure API Management Developer Portal? Here is a list of tutorials ...
How to troubleshoot the Orderer peer? The Docker container terminated by itself. You can follow this...
How to convert a JSON text string to an XML document with PHP language? Currently, there is no built...