zoukankan      html  css  js  c++  java
  • 部署Hyperledger Fabric报错Error: error getting chaincode bytes: failed to calculate dependencies: incomplete package: github.com/hyperledger/fabric-chaincode-go/shim

    报错1

    Error: error getting chaincode bytes: failed to calculate dependencies: incomplete package: github.com/hyperledger/fabric-chaincode-go/shim
    !!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed !!!!!!!!!!!!!!!!
    

    apt-get install go 的版本比较低。卸载了先。然后下载go1.13.5.linux-amd64.tar.gz进行安装。

    # tar zxvf go1.13.5.linux-amd64.tar.gz
    # mv go /usr/local/
    
    # vim /etc/profile
    #set golang env
    export GOROOT=/usr/local/go
    export GOPATH=/opt/goworkspace
    export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/go/bin
    # source /etc/profile
    # go version
    go version go1.13.5 linux/amd64
    
    

    环境变量:

    # go env
    


    换成国内代理:

    # go env -w GOPROXY=https://goproxy.cn
    # export GOPROXY=https://goproxy.cn
    


    运行测试网络

    #cd /opt/fabric/fabric-samples/first-network
    # ./byfn.sh down
    #./byfn.sh up -c mychannel -s couchdb -a
    

    报错2

    Creating channel...
    + peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
    + res=1
    + set +x
    2020-03-31 09:44:51.055 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
    Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'mychannel': error authorizing update: error validating ReadSet: proposed update requires that key [Group]  /Channel/Application be at version 0, but it is currently at version 1
    !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
    ========= ERROR !!! FAILED to execute End-2-End Scenario ===========
    
    ERROR !!!! Test failed
    root@ubuntu:/opt/fabric/fabric-samples/first-network# 
    
    

    已经存在mychannel,之前启动的fabric network没有正常停止,如果之前执行./byfn.sh up,那么相应的执行./byfn.sh down来停止fabric network。不要直接使用docker stop 或者 docker rm 停止删除容器。
    注意,环境变量的配置添加到/etc/bash.bashrc,使不论什么用户登录都生效。

  • 相关阅读:
    清理CentOS 7系统 journal日志
    漏洞修复:CVE-2018-18311 Perl_my_setenv()中的整数溢出导致缓冲区溢出
    content-script 发送消息给background : runtime.lastError: The message port closed before a response was received.
    SEO:适应百度的页面配置
    我的 .npmrc 配置
    Cordova + Vue 环境搭建
    发布一个PHP包到Packagist, 然后使用Composer安装
    vue3 问题记录
    问题记录
    小程序
  • 原文地址:https://www.cnblogs.com/zoujiaojiao/p/12606909.html
Copyright © 2011-2022 走看看