Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
734 views
in Technique[技术] by (71.8m points)

hyperledger fabric - Access file logging at chaincode container when Node.js compiling failed, inside Kubernetes

Using Hyperledger Fabric inside Kubernetes, how we can access chaincode container logging at /root/.npm/_logs/*.log when the compiling failed and chaincode container is not up?

"prime-prd" is the name of namespace inside Kubernetes.

"peer0-prd.blockchain.biz" is the HLF peer configured inside Kubernetes.

In this case, we'd like to access logging file at chaincode container named as: prime-prd-peer0-prd.blockchain.biz-prime-cc-doc-energy-1.1.2. Because this container is hidden, we can not access it from K8dash control panel (that acts as instrumentation panel for Kubernets).

Error: endorsement failure during query. response: status:500 message:"failed to execute transaction ae3d2fb5f84893cbf3c64b3a91ca0498d38178fb17256544357728923af24da4: [channel prime] could not launch chaincode prime-cc-doc-energy:1.1.2: chaincode registration failed: timeout expired while starting chaincode prime-cc-doc-energy:1.1.2 for transaction"


2021-01-23 15:50:21.290 UTC [endorser] SimulateProposal -> ERRO 06b [prime][ae3d2fb5] failed to invoke chaincode name:"prime-cc-doc-energy" , error: timeout expired while starting chaincode prime-cc-doc-energy:1.1.2 for transaction
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch
    /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:75

[...]

2021-01-23 14:51:47.713 UTC [dockercontroller] func2 -> INFO 040 Container prime-prd-peer0-prd.blockchain.biz-prime-cc-doc-energy-1.1.2 has closed its IO channel

2021-01-23 14:51:47.769 UTC [endorser] callChaincode -> INFO 041 [prime][e18c6f7d] Exit chaincode: name:"prime-cc-doc-energy"  (688939ms)

2021-01-23 14:51:47.771 UTC [endorser] SimulateProposal -> ERRO 042 [prime][e18c6f7d] failed to invoke chaincode name:"prime-cc-doc-energy" , error: timeout expired while starting chaincode prime-cc-doc-energy:1.1.2 for transaction```
question from:https://stackoverflow.com/questions/65861479/access-file-logging-at-chaincode-container-when-node-js-compiling-failed-inside

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...