Error_0
描述:
报错:
原因:
解决:
参考:
Error_22
描述:Fabric1.4.0网络启动(机器上同事启动了fabric2.2.0),使用./byfn.sh up启动网络,实例化链码这一步出现如下error
报错:Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "/chaincode/input/src/github.com/chaincode/chaincode_example02/go/chaincode_example02.go:29:2: cannot find package "github.com/hyperledger/fabric/core/chaincode/shim" in any of:.....
原因:没找到
解决:未解决
参考:cannot find package github.com/hyperledger/fabric-chaincode-go/shim in any of: /usr/local/go/src/
Error_21
描述:无
报错:Error: Invalid channel create transaction : mismatched channel ID testchannel != mychannel
原因:通道名字不匹配
解决:将通道名称修改成 export CHANNEL_NAME=testchannel
参考:无
Error_20
描述:无
报错:Failed to initialize local MSP: could not load a valid signer certificate from directory /var/hyperledger/orderer/msp/signcerts: stat /var/hyperledger/orderer/msp/signcerts: no such file or directo ry
原因:yaml文件中volumes下的映射路径有误,之前docker中orderer部分配置在docker-compose-base.yaml中,所以映射路径为- …/channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block(这里最前面有两个点),后来将orederer配置在docker-compose-orderer.yaml,所以需要修改为- ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block(这里最前面有一个点)
解决:
修改前
- ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ../crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/msp:/var/hyperledger/orderer/msp
- ../crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/tls/:/var/hyperledger/orderer/tls
修改后(…/修改成./)
- ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/msp:/var/hyperledger/orderer/msp
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/tls/:/var/hyperledger/orderer/tls
参考:hyperledger fabric 启动order服务时报错could not load a valid signer certificate from directory
Error_19
描述:在创建并生成docker容器时,orderer容器虽然创建,但是orderer容器不能运行,orderer容器状态为EXITED(2)
,容器状态如下截图
报错:
原因(1):查看日志,报错为:panic: Error retrieving consenter of type: etcdraft
,我此时的fabric orderer版本为1.4.0,raft排序服务不支持1.4.0
解决(1):需要切换到更高的版本,此处我切换到1.4.6
原因(2):orderer镜像版本切换到1.4.6以后,还是出现截图中的问题,查看docker容器日志docker logs -t --tail=100 [容器id]
,报错为panic: [channel: systemchannel] Error creating consenter: failed to parse TickInterval () to time duration
解决(2):
参考:无
Error_18
描述:无
报错:ssh: connect to host 192.168.230.130 port 22: Connection refused lost connection
原因:服务器上没有安装ssh工具
解决:解决方法:在Mint / Ubuntu上安装ssh,执行命令:sudo apt-get install ssh
参考:ssh连接服务器出现:ssh: connect to host 192.168.1.107 port 22: Connection refused 的解决方法
Error_17
描述:Fabric1.4.x网络启动时,出现如下error
报错:Error: error getting endorser client for channel: endorser client failed to connect to peer1.org1.example.com:7051: failed to create new connection: context deadline exceeded peer1.org1 failed to join the channel, Retry after 3 seconds
原因:不清楚
解决:
(1)把网络停掉 ./byfn.sh down(或./byfn.sh -m down -c jschannel)
(2)执行命令,进入文件中: sudo vim /etc/resolv.conf
(3)将options edns0 trust-ad
,这段话注释掉
参考:关于Error: error getting endorser client for channel: endorser client failed to connect to peer0问题的解决
Error_16
描述:使用命令./byf.sh up 启动网络时,第一次启动正常,当./byfn.sh down后,再次启动有时会出现下面的error
报错:Error: got unexpected status: SERVICE_UNAVAILABLE -- rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 172.20.0.8:7050: connect: connection refused"
原因:此问题是历史数据未清除干净
解决:(1)docker rm -f $(docker ps -aq)
,删除所有容器,(2)使用命令./byfn.sh down
参考:无
Error_15
描述:Fabric1.4.0,使用命令./byf.sh up
启动网络时,有时会出现下面的error
报错:Error: got unexpected status: SERVICE_UNAVAILABLE -- no Raft leader
原因:此问题是历史数据未清除干净
解决:(1)docker rm -f $(docker ps -aq)
,删除所有容器,(2)使用命令./byfn.sh down
参考:无
Error_14
描述:在部署raft共识服务的集群时,出现下面error
报错:Error: got unexpected status: SERVICE_UNAVAILABLE -- rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error:
原因:orderer节点数量没有配置好(在docker-compose-etcdraft2.yaml文件)
解决:在docker-compose-etcdraft2.yaml文件中增加了如下(原来文件中只有其他四个orderer节点的配置)
orderer.example.com:
extends:
file: base/peer-base.yaml
service: orderer-base
container_name: orderer.example.com
networks:
- byfn
volumes:
- ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
- orderer.example.com:/var/hyperledger/production/orderer
ports:
- 7050:7050
参考:无
Error_13
描述:在部署raft集群时,网络已经生成,但是启动网络时,出现如下error_1。当我使用./byfn.sh down关闭网络时又会出现error_2
报错:
error_1:Endorser and orderer connections initialized Error: got unexpected status: BAD_REQUEST -- Attempted to include a member which is not in the consortium
error_2:ERROR: error while removing network: network net_byfn id 2829b87a64c0eef2fa8bd473dd4602f9d306eac96a6f2050d3d555b5428136b9 has active endpoints
此error的解决方法看【Error_8】中的解决方法2
原因:与【Error_9】类似,此问题是历史数据未清除干净
解决:(1)docker ps
,查看运行中的容器,(2)docker rm -f $(docker ps -aq)
,删除所有容器,(3)使用命令sudo service docker restart
,参考【Error_8】,将dockers重新启动,清除历史数据 (4)使用命令./byfn.sh down
参考:无
Error_12
描述:fabric1.4.0网络中byfn.sh脚本启动时出现如下问题
报错:2021-09-25 16:31:11.559 UTC [main] InitCmd -> ERRO 001 Cannot run peer because cannot init crypto, folder "/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" does not exist
原因:网络关闭时(./byfn.sh down),运行中的容器没有清除干净
解决:使用docker rm -f $(docker ps -aq)
将运行中的容器全部清除,再关闭网络,再重新启动网络,就不会报错了。
参考:无
Error_11
描述:在将fabric网络由1.4.1升级到1.4.6时,peer节点和orderer都升级成功,但是在cli容器中执行peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'
查询账本时,出现如下错误
报错:Error: error endorsing query: rpc error: code = Unknown desc = access denied: channel [mychannel] creator org [Org1MSP] - proposal response:
原因:fabric网络节点升级时,需要备份账本,备份的路径必须在fabric中first-nework目录下(/root/go/src/github.com/hyperledger/fabric-samples/first-network/ledgers-backup
),我在配置备份路径时,将备份路径设置到了根目录下的一个新的路径中(/root/ljt/ledgers-backup
),这样就出现如上错误
解决:将备份路径配置正确即可【byfn(first network)没有建立起来也会出现这个错误】
参考:无
Error_10
描述:当升级fabric1.4.1到1.4.6后,执行命令 docker logs -t --tail=100 [容器id]
查询orderer容器日志时,出现如下错误
报错:
2021-09-23T02:44:10.396549098Z 2021-09-23 02:44:10.396 UTC [core.comm] ServerHandshake -> ERRO 034 TLS handshake failed with error remote error: tls: bad certificate server=Orderer remoteaddress=172.24.0.6:60682
2021-09-23T02:44:11.396301903Z 2021-09-23 02:44:11.396 UTC [core.comm] ServerHandshake -> ERRO 035 TLS handshake failed with error remote error: tls: bad certificate server=Orderer remoteaddress=172.24.0.6:60688
2021-09-23T02:44:13.246923212Z 2021-09-23 02:44:13.246 UTC [core.comm] ServerHandshake -> ERRO 036 TLS handshake failed with error remote error: tls: bad certificate server=Orderer remoteaddress=172.24.0.6:60694
2021-09-23T02:44:13.268751722Z 2021-09-23 02:44:13.268 UTC [core.comm] ServerHandshake -> ERRO 037 TLS handshake failed with error remote error: tls: bad certificate server=Orderer remoteaddress=172.24.0.5:51352
原因:无
解决:无
参考:无
Error_9
描述:执行 ./byfn.sh down时,出现如下error
报错: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 !!!!!!!!!!!!!!!!
原因:此问题是历史数据未清除干净,可能造成的原因:由于在本机尝试过fabric的e2e_cli,fabric-samples的first-network启动部署测试,多个启动时未正常关闭,根源是由于有一个已经存在的channel,阻止进一步的执行而引起的
解决:执行./byfn.sh -m restart -c mychannel
参考:无
Error_8
描述:执行 ./byfn.sh down时,出现如下error
报错:ERROR: error while removing network: network net_byfn id 8e6be2d33828bfe6241028cb2c07178e0333be8d94ad07ce0c57d45c220d895d has active endpoints
原因:执行docker network inspect net_byfn
解决:
docker network disconnect -f {network} {endpoint-name} #解决办法1
sudo service docker restart #解决办法2 本次使用此方法解决
参考:
[1].Docker Compose ERROR network has active endpoints
[2].ERROR: error while removing network: network net_default id has active endpoints
Error_7
描述:Fabric1.4.0,使用一个zookeeper,一个kafka节点,进行在kafka共识机制下,cli,zookeeper,kafka,两个orderer节点,4个peer节点的容器成功启动,并且链码安装、实例化也成功,在查询时出现如下错误
报错:Error: endorsement failure during query. response: status:500 message:"make sure the chaincode mycc has been successfully instantiated and try again: chaincode mycc not found"
原因:暂不清楚
解决:在配置docker-compose-base.yaml文件中的两个orderer时,两个orderer的端口应该一致。
参考:链码已实例化,但未出现在实例化代码列表中
Error_6
描述:当使用Kafka共识机制时,使用./byfn.sh启动网络时,orderer节点中,orderer1节点的容器启动了,orderer0的没有启动
报错:Error: failed to create deliver client: orderer client failed to connect to orderer0.example.com:7050: failed to create new connection: context deadline exceeded
原因:orderer1.example.com和orderer0.example.com使用的端口是同一个
解决:两个端口要不一样
参考:无
Error_5
描述:无
报错:Error: Response from server: Error Code: 20 - Authentication failure
原因:fabric-ca-server 初始化时的用户名密码与fabric-ca-client注册时的用户名密码之间不匹配
解决:将将两者的用户名密码确定一致
fabric-ca-server start -b admin:pass
fabric-ca-client enroll -u http://admin:pass@localhost:7054
参考:无
Error_4
描述:无
报错: listen tcp 127.0.0.1:9443: bind: address already in use
原因:原来我的TCP 9443端口被占用了,
解决:使用命令sudo lsof -i :9443
查看端口被哪个占用了
是PID 9528在使用我的TCP端口,使用命令kill -9 9528
,杀掉进程
参考:无
Error_3
描述:Fabric CA安装 执行make fabric-ca-server
时出现如下错误(make fabric-ca-client解决方法类似)
报错:Building fabric-ca-server in bin directory ... no required module provides package github.com/hyperledger/fabric-ca/cmd/fabric-ca-server; to add it: go get github.com/hyperledger/fabric-ca/cmd/fabric-ca-server make: *** [Makefile:116:bin/fabric-ca-server] 错误 1
原因:需要执行go get github.com/hyperledger/fabric-ca/cmd/fabric-ca-server
执行go get github.com/hyperledger/fabric-ca/cmd/fabric-ca-server
后出现新的error
go get github.com/hyperledger/fabric-ca/cmd/fabric-ca-server: github.com/hyperledger/fabric-ca@v1.5.1: verifying go.mod: github.com/hyperledger/fabric-ca@v1.5.1/go.mod: open /home/user1/go/pkg/sumdb/sum.golang.org/latest: no such file or directory
解决:终端执行 go env,发现GOPATH="/home/user1/go"
,需要将GOPATH路径修改成自己的路径,即终端执行export GOPATH="/home/lijiangtao/go
,之后终端再执行go get github.com/hyperledger/fabric-ca/cmd/fabric-ca-server
,终端日志如下
然后在终端再执行make fabric-ca-server
,执行结果如下图显示(执行成功)【make fabric-ca-client同样 *** 作】
参考:无
Error_2
描述:使用命令vim /etc/profile
写入配置时,
报错:出现 E121:无法打开并写入文件
原因:文件权限问题
解决:
(1) 保存的时候用:w !sudo tee %
(2) 输入密码即可
参考:无
Error_1
描述:Fabric1.4.0使用命令:./byfn.sh down
停止网络时,容器不能停止
报错:ERROR: for cli b'cannot stop container: 81ea509ef7934b2059d47c0c8ffd5c17e229356a8465c28ff0cf42fd7afa06e3: Cannot kill container 81ea509ef7934b2059d47c0c8ffd5c17e229356a8465c28ff0cf42fd7afa06e3: unknown error after kill: runc did not terminate sucessfully: container_linux.go:392: signaling init process caused "permission denied"\n: unknown'
Removing network net_byfn ERROR: error while removing network: network net_byfn id d1653e9134027b416f439b53828bd5f37f925eddef1d67fd6a3d7ce88e9dafe7 has active endpoints
原因:docker容器停止不了
解决:终端输入sudo aa-remove-unknown
,然后使用docker stop [容器id]
参考:无
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)