简体   繁体   中英

How can I see the full orderer logs in Hyperledger Fabric basic-network sample?

I'm currently working on a project where I need to simulate the high throughput chaincode on a Hyperledger Fabric 1.1.0 blockchain application/infrastructure for load testing, but first I need to ensure that the first-network sample is working properly. I have all the correct binaries, as well as a clean download of the fabric-samples directory. When I run ./byfn.sh up the automated End-to-End test runs perfectly without a hitch, but my main concern is what's going on behind the scenes. So I open the logs for the orderer, however, it isn't giving me any useful info outside of some ambiguous warnings:

$ docker logs -f orderer.example.com < config values > 2018-07-26 18:34:42.025 UTC [orderer/common/server] Start -> INFO 006 Beginning to serve requests 2018-07-26 18:34:44.594 UTC [msp] DeserializeIdentity -> INFO 007 Obtaining identity 2018-07-26 18:34:44.595 UTC [msp] DeserializeIdentity -> INFO 008 Obtaining identity 2018-07-26 18:34:44.600 UTC [msp] DeserializeIdentity -> INFO 009 Obtaining identity 2018-07-26 18:34:44.607 UTC [fsblkstorage] newBlockfileMgr -> INFO 00a Getting block information from block storage 2018-07-26 18:34:44.615 UTC [orderer/commmon/multichannel] newChain -> INFO 00b Created and starting new chain mychannel 2018-07-26 18:34:44.830 UTC [msp] DeserializeIdentity -> INFO 00c Obtaining identity 2018-07-26 18:34:50.989 UTC [msp] DeserializeIdentity -> INFO 00d Obtaining identity 2018-07-26 18:34:57.281 UTC [msp] DeserializeIdentity -> INFO 00e Obtaining identity 2018-07-26 18:34:57.526 UTC [msp] DeserializeIdentity -> INFO 00f Obtaining identity 2018-07-26 18:34:57.535 UTC [common/deliver] Handle -> WARN 010 Error reading from 172.18.0.7:33608: rpc error: code = Canceled desc = context canceled 2018-07-26 18:34:57.557 UTC [msp] DeserializeIdentity -> INFO 011 Obtaining identity 2018-07-26 18:34:57.558 UTC [msp] DeserializeIdentity -> INFO 012 Obtaining identity 2018-07-26 18:35:00.661 UTC [msp] DeserializeIdentity -> INFO 013 Obtaining identity 2018-07-26 18:35:00.673 UTC [msp] DeserializeIdentity -> INFO 014 Obtaining identity 2018-07-26 18:35:00.682 UTC [common/deliver] Handle -> WARN 015 Error reading from 172.18.0.7:33624: rpc error: code = Canceled desc = context canceled 2018-07-26 18:35:00.687 UTC [msp] DeserializeIdentity -> INFO 016 Obtaining identity 2018-07-26 18:35:00.688 UTC [msp] DeserializeIdentity -> INFO 017 Obtaining identity 2018-07-26 18:35:20.665 UTC [msp] DeserializeIdentity -> INFO 018 Obtaining identity 2018-07-26 18:35:43.483 UTC [msp] DeserializeIdentity -> INFO 019 Obtaining identity

Normally, I'd be expecting information such as the orderer receiving transactions from the peer, at which point it groups them together into blocks and sends them back to the peer, but it doesn't seem to be doing anything useful. (Side note: eventually I plan on disabling TLS network-wide, however for now I don't want to mess with the network while trying to get the orderer logs)

So my gut reaction is that something is going wrong in the peer, so I spin up the logs for that, and everything appears to be fine, however I get a couple of warnings:

$ docker logs -f peer0.org1.example.com < ... > 2018-07-26 17:56:08.518 UTC [gossip/comm] func1 -> WARN 026 peer1.org1.example.com:7051, PKIid:[96 141 193 216 138 109 43 60 154 212 136 174 210 228 71 15 212 18 103 171 228 71 30 210 169 234 137 229 237 185 160 17] isn't responsive: rpc error: code = Canceled desc = context canceled 2018-07-26 17:56:08.518 UTC [gossip/discovery] expireDeadMembers -> WARN 027 Entering [[96 141 193 216 138 109 43 60 154 212 136 174 210 228 71 15 212 18 103 171 228 71 30 210 169 234 137 229 237 185 160 17]] 2018-07-26 17:56:08.518 UTC [gossip/discovery] expireDeadMembers -> WARN 028 Closing connection to Endpoint: peer1.org1.example.com:7051, InternalEndpoint: peer1.org1.example.com:7051, PKI-ID: [96 141 193 216 138 109 43 60 154 212 136 174 210 228 71 15 212 18 103 171 228 71 30 210 169 234 137 229 237 185 160 17], Metadata: [] 2018-07-26 17:56:08.520 UTC [gossip/discovery] expireDeadMembers -> WARN 029 Exiting < ... > 2018-07-26 17:56:21.263 UTC [gossip/service] updateEndpoints -> WARN 036 Failed to update ordering service endpoints, due to Channel with mychannel id was not found 2018-07-26 17:56:21.348 UTC [kvledger] CommitWithPvtData -> INFO 037 Channel [mychannel]: Committed block [1] with 1 transaction(s) 2018-07-26 17:56:24.353 UTC [gossip/service] updateEndpoints -> WARN 038 Failed to update ordering service endpoints, due to Channel with mychannel id was not found < ... >

Upon making transactions on this network with the docker cli, i am able to invoke/query just fine with the expected functionality, but I still get nothing from the orderer logs.

I'm particularly wondering about that second group of warnings on the peer- could it be there's some communication error with the orderer? I can verify that I'm using the channel name mychannel system-wide so I don't see why it'd be giving me any issues.

I've been at this for two full days now and I'm at my wit's end. Is there some logging level value that I'm missing somewhere within the Orderer chaincode? Would love some insight into the how I can generate output on the Orderer node. thanks!

Looks like every line from the logs that you provided is indicating either INFO or WARNING, so it seems like you're not getting the DEBUG logs at all. In the compose file, you should be able to control this using the ORDERER_GENERAL_LOGLEVEL=debug (for the orderer) and CORE_LOGGING_LEVEL=DEBUG (for the peer) environment variables.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM