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安装命令了。

posted @ 2020-10-14 00:04  CoderZjz  阅读(40)  评论(0编辑  收藏