Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Failed to find installed chaincode

未关闭
#283 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@dnakashima 已经在做这个了。

开始于 2024年3月25日。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
docker, go
领域
cli, devops

调研方向

使用列出的 ff deploy fabric dev 命令重现部署,并将其已安装 chaincode 的查找结果与前面的 peer lifecycle chaincode queryinstalled --output json 输出进行比较。跟踪处理安装和查询的 CLI 入口点,然后确定为什么找不到所报告的 package;当重现的部署能够识别新安装的 chaincode,或报告清晰且可执行的错误时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Hi, i can't deploy chaincode,
here my environment version:

  • peer:
    Version: 2.2.9
    Commit SHA: 5305a89
    Go version: go1.18.7
    OS/Arch: linux/amd64
    Chaincode:
    Base Docker Label: org.hyperledger.fabric
    Docker Namespace: hyperledger
  • using fabric samples 2.2.9
  • go version go1.14 linux/amd64

Step to reproduced:

prifalab@H-LAPTOP-122:~cd fabric-samples2.2.9/asset-transfer-basic/chaincode-go
prifalab@H-LAPTOP-122:~/fabric-samples-2.2.9/asset-transfer-basic/chaincode-go$ touch core.yaml
prifalab@H-LAPTOP-122:~/fabric-samples-2.2.9/asset-transfer-basic/chaincode-go$ peer lifecycle chaincode package -p . --label asset_transfer ./asset_transfer.zip
prifalab@H-LAPTOP-122:~/fabric-samples-2.2.9/asset-transfer-basic/chaincode-go$ ff deploy fabric dev asset_transfer.zip firefly asset_transfer 1.0 -v
installing chaincode
/usr/bin/docker run --platform linux/amd64 --rm --network=dev_default -e CORE_PEER_ADDRESS=fabric_peer:7051 -e CORE_PEER_TLS_ENABLED=true -e CORE_PEER_TLS_ROOTCERT_FILE=/etc/firefly/organizations/peerOrganizations/org1.example.com/peers/fabric_peer.org1.example.com/tls/ca.crt -e CORE_PEER_LOCALMSPID=Org1MSP -e CORE_PEER_MSPCONFIGPATH=/etc/firefly/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp -v /home/prifalab/fabric-samples-2.2.9/asset-transfer-basic/chaincode-go/asset_transfer.zip:/package.tar.gz -v dev_firefly_fabric:/etc/firefly hyperledger/fabric-tools:2.3 peer lifecycle chaincode install /package.tar.gz
2024-01-11 11:31:36.271 UTC [cli.lifecycle.chaincode] submitInstallProposal -> INFO 001 Installed remotely: response:<status:200 payload:"\nOasset_transfer:792716372afe1321577882e8698479732192208d526c8f54321063edd82ab4ae\022\016asset_transfer" >
2024-01-11 11:31:36.271 UTC [cli.lifecycle.chaincode] submitInstallProposal -> INFO 002 Chaincode code package identifier: asset_transfer:792716372afe1321577882e8698479732192208d526c8f54321063edd82ab4ae
querying installed chaincode
/usr/bin/docker run --platform linux/amd64 --rm --network=dev_default -e CORE_PEER_ADDRESS=fabric_peer:7051 -e CORE_PEER_TLS_ENABLED=true -e CORE_PEER_TLS_ROOTCERT_FILE=/etc/firefly/organizations/peerOrganizations/org1.example.com/peers/fabric_peer.org1.example.com/tls/ca.crt -e CORE_PEER_LOCALMSPID=Org1MSP -e CORE_PEER_MSPCONFIGPATH=/etc/firefly/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp -v dev_firefly_fabric:/etc/firefly hyperledger/fabric-tools:2.3 peer lifecycle chaincode queryinstalled --output json
{
        "installed_chaincodes": [
                {
                        "package_id": "firefly_1.0:b8e754685421dd03e40251b9ef2dd811e49659453cd489ca7bd27585d9be06b4",
                        "label": "firefly_1.0",
                        "references": {
                                "firefly": {
                                        "chaincodes": [
                                                {
                                                        "name": "firefly",
                                                        "version": "1.0"
                                                }
                                        ]
                                }
                        }
                },
                {
                        "package_id": "asset_transfer:792716372afe1321577882e8698479732192208d526c8f54321063edd82ab4ae",
                        "label": "asset_transfer"
                }
        ]
}
Error: failed to find installed chaincode```
主要语言
Go
星标
66
派生
64
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

hyperledger-firefly/cli 的其他 Issue

查看 hyperledger-firefly/cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。