ERRO 003 Error trying to connect to local peer: context deadline exceeded

血红的双手。 提交于 2019-12-06 06:59:15

问题


Following my previous question. I'm still trying to make the tutorial "Chaincode for Developers" work. It still does not work :

Terminal 2 - Build & start the chaincode, getting this error when running chaincode :

userChaincodeStreamGetter -> ERRO 003 Error trying to connect to local peer: context deadline exceeded


回答1:


After coming across this issue, I checked which ports which were being used by "peer", and was surprised to see that the port in question, 7052, was not listed as a peer node port.

So, I updated to this command, i.e. changing port 7052 to 7051:

CORE_PEER_ADDRESS=peer:7052 CORE_CHAINCODE_ID_NAME=mycc:0 ./sacc

TO:

CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./sacc

Following that change, startup seems to work correctly (although the behavior soon looks like a hung process, once the code was registered. Subsequent tutorial steps worked as expected.)

LOGS:

ORIGINAL (FAILURE):

root@8e77a5eef847:/opt/gopath/src/chaincode/sacc# CORE_PEER_ADDRESS=peer:7052 CORE_CHAINCODE_ID_NAME=mycc:0 ./sacc

2018-03-27 02:18:56.211 UTC [shim] SetupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO

2018-03-27 02:18:56.211 UTC [shim] SetupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up ...

2018-03-27 02:18:59.212 UTC [shim] userChaincodeStreamGetter -> ERRO 003 Error trying to connect to local peer: context deadline exceeded

CORRECTED (SUCCESS):

root@8e77a5eef847:/opt/gopath/src/chaincode/sacc# CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./sacc

2018-03-27 02:54:22.858 UTC [shim] SetupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO

2018-03-27 02:54:22.858 UTC [shim] SetupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up ...

(process continues in background?)



来源:https://stackoverflow.com/questions/48153365/erro-003-error-trying-to-connect-to-local-peer-context-deadline-exceeded

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!