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, ∼2258🔥, 0💬
Popular Posts:
How to use .NET CLR Types in Azure API Policy? By default, Azure imports many basic .NET CLR (Common...
How to extend json.JSONEncoder class? I want to encode other Python data types to JSON. If you encod...
Can You Add Values to an Array without Keys in PHP? Can You Add Values to an Array with a Key? The a...
How to use the RSS Online Validator at w3.org? You can follow this tutorial to learn how to use the ...
How to install "C++/CLI Support" component in Visual Studio? I need to build my Visual Studio C++/CL...