zoukankan      html  css  js  c++  java
  • fabric启动samples遇到的报错

    禁止访问

    Build your first network (BYFN) end-to-end test
    
    Channel name : mychannel
    + 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
    Creating channel...
    + res=1
    + set +x
    2020-10-13 15:17:51.712 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
    Error: got unexpected status: FORBIDDEN -- implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied
    !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
    ========= ERROR !!! FAILED to execute End-2-End Scenario ===========
    
    ERROR !!!! Test failed
    

    查看一下orderer的日志,看清楚它到底是具体的哪一个部分有问题,看到大多数的问题在于:

    报错信息

    2020-10-13 15:17:51.712 UTC [nodeCmd] serve -> INFO 01e Started peer with ID=[name:"peer0.org1.example.com" ], network ID=[dev], address=[peer0.org1.example.com:7051]
    2020-10-13 15:17:51.712 UTC [kvledger] LoadPreResetHeight -> INFO 01f Loading prereset height from path [/var/hyperledger/production/ledgersData/chains]
    2020-10-13 15:17:51.712 UTC [fsblkstorage] LoadPreResetHeight -> INFO 020 Loading Pre-reset heights
    2020-10-13 15:17:51.712 UTC [fsblkstorage] preRestHtFiles -> INFO 021 Dir [/var/hyperledger/production/ledgersData/chains/chains] missing... exiting
    2020-10-13 15:17:51.712 UTC [fsblkstorage] LoadPreResetHeight -> INFO 022 Pre-reset heights loaded
    2020-10-13 15:17:51.712 UTC [nodeCmd] func7 -> INFO 023 Starting profiling server with listenAddress = 0.0.0.0:6060
    fatal error: unexpected signal during runtime execution
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7f67665ee259]
    

    错误原因

    没有删除干净的环境中启动复用的之前的volume

    解决方案

    执行如下三条命令删除卷

    docker-compose -f docker-compose-cli.yaml down --volumes --remove-orphans
    docker rm -f $(docker ps -a | grep "hyperledger/*" | awk "{print $1}")
    docker volume prune
    

    【node】- npm install时报错:npm WARN enoent ENOENT: no such file or directory

    解决方法:

    cmd命令行中输入:

    npm config set registry https://registry.npm.taobao.org

    npm config set disturl https://npm.taobao.org/dist

    再输入npm install -g koa -g表示安装在全局

    npm安装模块的 npm WARN root@1.0.0 No description 和 npm WARN root@1.0.0 No repository filed 的解决方法

    在这里插入图片描述

    报错分析

    是因为系统在给你配置package.json文件的时候并没有帮你设置description字段和存储库字段,需要我们自己手动设置。直接用vim打开这个文件编辑:

    解决方法

    如图设置:description字段的内容无所谓,不为空即可;第二个权限设置成私有的即可。接下来就可以正常使用npm安装命令了。

    Error: got unexpected status: BAD_REQUEST

    @Error: got unexpected status: BAD_REQUEST – error applying config update to existing channel ‘mychannel’

    原因分析

    此问题是历史数据未清除干净,可能造成的原因:由于在本机尝试过fabric的e2e_cli,fabric-samples的first-network启动部署测试,多个启动时未正常关闭,根源是由于有一个已经存在的channel,阻止进一步的执行而引起的

    解决办法

    ./byfn.sh -m restart -c mychannel

    Error: error getting endorser client for channel: endorser client failed to connect to peer0

    解决办法

    sudo vim /etc/resolv.conf 首先修改文件最后一行为 #options edns0
    :wq! 保存退出
    ./byfn.sh -m up -c jschannel 即可启动

  • 相关阅读:
    UML的相关基础知识
    easyui的datagrid、treegrid增加表头菜单,用于显示或隐藏列
    easyui datagrid load的时候,提交的时候多了name为数字的参数
    Easyui Dialog 设置初始位置
    投票系统的代码总结
    部门组织机构树的使用
    TCP连接客户端的方法
    播放M3U8的js代码
    JAVA的split的用法
    BOLB转word文件,和word文件转换BOLB
  • 原文地址:https://www.cnblogs.com/coderzjz/p/13812451.html
Copyright © 2011-2022 走看看