【问题标题】:Chaincode container getting created but not starting链码容器已创建但未启动
【发布时间】:2021-11-20 18:11:09
【问题描述】:

Hyperledger-Fabric:v2.3.3

对等 docker 映像:标记 2.3.3

提交链码后对等日志出错:

ERRO 036 start-could not start container: API error (400): failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "chaincode": executable file not found in $PATH: unknown

WARN 037 could not launch chaincode 'test_v1_v1:65f5b95ca7ff438e02a86aea4205bcd697a2afa0f4e37c314d3011667357fe50': error starting container: error starting container: API error (400): failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "chaincode": executable file not found in $PATH: unknown

  • docker ps -a 显示链码容器状态:已创建。
  • 我尝试重启 peers 和 orderer,但同样的错误

*注意:如果我应该提供任何具体配置或任何内容来理解问题,请发表评论。

【问题讨论】:

    标签: docker hyperledger-fabric hyperledger-chaincode


    【解决方案1】:

    问题是chaincode文件中的包名不是“main”(我认为我们必须将其命名为父目录)。

    因此,在提交链码后,二进制文件并未生成。结果,当对等方尝试启动/运行链代码容器时,它说我没有要运行的二进制/可执行文件。

    将包名更改为“main”并进行打包、安装和提交过程后,链码容器启动。


    *注意:这是我对问题的理解,如果上面写的任何内容是误解/错误,请告诉我。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-22
      • 2020-10-27
      • 2012-05-28
      • 2012-08-04
      • 1970-01-01
      相关资源
      最近更新 更多