Chaincode 容器已创建但未启动

Chaincode container getting created but not starting

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


*注意:如果我应该提供任何特定配置或任何理解问题的内容,请评论。

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

因此,在提交链代码后没有生成二进制文件。结果,当对等方尝试 launch/run chaincode 容器时,它说我没有 binary/executable 文件到 运行.

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


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