• 部署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,使不论什么用户登录都生效。

  • 相关阅读:
    FileSystemWatcher用法详解【转】
    关于TransactionScope事务的TransactionScopeOption的实例
    TransactionScope IsolationLevel 事务隔离级别
    C#中TransactionScope的使用方法和原理
    关于Qt 静态成员函数调用信号
    【Qt编程】基于QWT的曲线绘制及图例显示操作——有样点的实现功能
    使用qwt作曲线图——有网格线背景的画法
    Qt程序app添加图标复制到其它电脑后不显示的解决方法
    QUrl的使用,特别是对含特殊字符的字符串进行 URL 格式化编码
    QDateTime 本地时间和UTC时间转换问题
  • 原文地址:https://www.cnblogs.com/zoujiaojiao/p/12606909.html
Copyright © 2020-2023  润新知