ERRO 003尝试连接到本地对等时出错:超出了上下文期限 [英] ERRO 003 Error trying to connect to local peer: context deadline exceeded

查看:505
本文介绍了ERRO 003尝试连接到本地对等时出错:超出了上下文期限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我之前的问题.我仍在尝试使教程开发人员链代码"正常工作.它仍然不起作用:

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

第2终端-建立和启动链码,在运行链码时出现此错误:

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

userChaincodeStreamGetter-> ERRO 003尝试连接到本地对等时出错:超出了上下文期限

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

推荐答案

遇到此问题后,我检查了"peer"正在使用哪些端口,并且 惊讶地发现有问题的端口7052没有被列为对等节点端口.

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.

因此,我更新了此命令,即将端口7052更改为7051:

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

收件人:

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.)

日志:

原始(失败):

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未提供链码日志级别;默认为:INFO

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->信息002链码(构建级别:)正在启动...

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尝试连接到本地对等时出错:超出了上下文期限

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

正确(成功):

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未提供链码日志级别;默认为:INFO

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链码(构建级别:)正在启动...

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

(进程是否在后台继续?)

(process continues in background?)

这篇关于ERRO 003尝试连接到本地对等时出错:超出了上下文期限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆