加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

go – 无法找到在Windows7上运行的自定义链代码路径Hyperledger

发布时间:2020-12-14 05:45:33 所属栏目:Windows 来源:网络整理
导读:我正在尝试在我的本地Hyperledger Fabric v1.0环境中安装我的自定义链代码. 为此我遵循文档build your first network,我在github项目中使用第一个网络示例.不,它已启动并运行./byfn.sh -m并执行所有脚本以进行通道创建,链代码安装和实例化,并通过运行script.
我正在尝试在我的本地Hyperledger Fabric v1.0环境中安装我的自定义链代码.

为此我遵循文档build your first network,我在github项目中使用第一个网络示例.不,它已启动并运行./byfn.sh -m并执行所有脚本以进行通道创建,链代码安装和实例化,并通过运行script.sh文件完成所有脚本.

现在我更改了以下内容以试用我的自定义链码

peer chaincode install -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02>&log.txt

我改变了

peer chaincode install -n mycc -v 1.0 -p github.com/myuserId/fabrcicV1_chaincodes/mychaincode >&log.txt

现在运行./byfn.sh -m获取异常

2017-08-22 11:01:17.048 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2017-08-22 11:01:17.048 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2017-08-22 11:01:17.048 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
Error: Error getting chaincode code chaincode: path to chaincode does not exist: github.com/myuserId/fabrcicV1_chaincodes/mychaincode
Usage:
  peer chaincode install [flags]

Flags:
  -c,--ctor string      Constructor message for the chaincode in JSON format (default "{}")
  -l,--lang string      Language the chaincode is written in (default "golang")
  -n,--name string      Name of the chaincode
  -p,--path string      Path to chaincode
  -v,--version string   Version of the chaincode specified in install/instantiate/upgrade commands

Global Flags:
      --cafile string              Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoi
      --logging-level string       Default logging level and overrides,see core.yaml for full syntax
  -o,--orderer string             Ordering service endpoint
      --test.coverprofile string   Done (default "coverage.cov")
      --tls                        Use TLS when communicating with the orderer endpoint

!!!!!!!!!!!!!!! Chaincode installation on remote peer PEER0 has Failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========

我在github那里有存储库,那为什么它不显示不退出?

我已经在$GOPATH / src / github.com /路径下克隆了同样的Windows 7机器,并给出了本地路径,然后我也得到了同样的错误.我正在通过Windows 7的docker快速启动终端运行所有命令.

请告诉我哪里做错了.

在一些网络日志中,我找到了一个位置/opt/gopath/src/github.com / ….以及它所指向的位置.在我的Windows路径中,gopath是/ c / users / public / fabricv1.

由于我对该工具不太熟悉,请对此进行评论.

After doing some analysis from my side,it seems like the chain code
is reading from some pre-mounted directories sacc/,fabcar/,/marble02
,chaincode_example_02,hyperledger/
under the path
root@7785f8b27559:/opt/gopath/src/chaincodedev/chaincode# and
chaincode also pre-loaded at the time of making the network up
using docker image. There it seems no effect by adding chaincode in
windows folder
and it is from the above said virtual machine path.

So what can I do now to continue my work? is there any way to install
my custom chaincode to the local network. I tried with my githhub path
and local path but no use. please somebody help

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读