Hyperledger Fabric链码实例化返回超时已过期 [英] Hyperledger Fabric chaincode instantiation returns timeout expired

查看:255
本文介绍了Hyperledger Fabric链码实例化返回超时已过期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经与Fabric合作了几个月,并且我一直在尝试在一个链式代码中运行一个稍微复杂的虚拟机,即以太坊虚拟机.它是用JavaScript编写的,因此我使用了nodeJS链码版本.我用链代码将VM打包在我安装并实例化到对等方的目录中.安装完成并退出,没有错误,但是挂了几分钟后的实例化向我返回了一个错误:

I've been working around with Fabric for a a few months now, and I've been trying to run a somewhat complex virtual machine, the Ethereum Virtual Machine within a chaincode. It is written in JavaScript so I worked with the nodeJS chaincode version. I packed the the VM with my chaincode in a directory that i install and instantiate onto the peer. The install completes and exits with no errors, however the instantiation after hanging for a few minutes returns me an error:

Error: Error endorsing chaincode: rpc error: code = Unknown desc = timeout expired while starting chaincode mychaincode:1.0(networkid:dev,peerid:peer0.org1.example.com,tx:.... 

根据示例中的nodejs链代码运行至少一分钟的情况,它应该至少运行几分钟,因为添加的软件包约为15MB.

It should run for quite a few minutes at least as the added packages are ~15MB, according to the example nodejs chaincode runs for a minute at least.

示例nodejs链码(chaincode_example02)在本教程的BYFN网络和我已经开始的基本网络上均能完美运行.我的环境是根据fabric-samples存储库(v1.1.0)中的文档(v1.1.0)设置的.即使我只使用require方法将一个包添加到示例链代码中,它也会挂起,而不是返回错误.

The example nodejs chaincode (chaincode_example02) runs perfectly on both BYFN network from the tutorial and on a basic-network that I've started. My environment was set up according to the documentation (v1.1.0) from the fabric-samples repository (v1.1.0). Even if I only add one package to the example chaincode with the require method, it hangs, than return error.

我一直在寻找一个标志或配置,可以在其中设置链码实例化的超时值,但是没有运气.在哪里可以增加超时值?我应该提供哪个日志以便进一步搜索搜索结果?

I've been searching for a flag or config where I can set the timeout value for chaincode instantiation, but with no luck. Where could I increase the timeout value? Which log should I provide in order to step forward in searching for the soution?

谢谢前进,巴林特

推荐答案

您可以通过将 CORE_CHAINCODE_STARTUPTIMEOUT 环境变量添加到base/peer-base.yaml码头工人组成文件中来修改chaincode.startuptimeout配置.指定默认值以外的其他值.

You can modify the chaincode.startuptimeout config by adding a CORE_CHAINCODE_STARTUPTIMEOUT environment variable to the base/peer-base.yaml docker compose file specifying something other than the default.

这篇关于Hyperledger Fabric链码实例化返回超时已过期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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