当我在此处运行示例时:结构e2e示例无法实例化链码。您可以在此处看到错误的屏幕截图:
&#xA;&#xA; &#xA;&#xA; < p>我可以看到链代码实例/容器已经启动但很快就退出了。&#xA;&#xA; & #xA;&#xA;关于为什么会这样做以及如何解决的任何想法?
&#xA;答案 0 :(得分:1)
我在测试织物样品平衡转移和fabcar样品以及织物PTE测试时遇到了同样的问题。
通过在docker撰写文件中将CORE_PEER_CHAINCODELISTENADDRESS
设置为对等的containername:port
来解决此问题。
例如,CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052
问题:当使用docker logs CONTAINER-ID
检查时,Chaincode容器(在一定时间后创建并终止)日志显示以下错误。
UTC [shim] userChaincodeStreamGetter -> ERRO 001 x509: cannot validate certificate for 172.18.0.5 because it doesn't contain any IP SANs
error trying to connect to local peer
github.com/hyperledger/fabric/core/chaincode/shim.userChaincodeStreamGetter
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:109
github.com/hyperledger/fabric/core/chaincode/shim.Start
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:148
main.main
/chaincode/input/src/github.com/example_cc/go/example_cc.go:199
runtime.main
/opt/go/src/runtime/proc.go:185
runtime.goexit
/opt/go/src/runtime/asm_amd64.s:2337
2017-12-26 09:59:52.823 UTC [example_cc0] Errorf -> ERRO 002 Error starting Simple chaincode: error trying to connect to local peer: x509: cannot validate certificate for 172.18.0.5 because it doesn't contain any IP SANs