Fabirc 中创建Channel创始块时出现错误:SERVICE_UNAVAILABLE -- will not enqueue, consenter for this channel hasn't started yet

我按照《区块链开发实战:Hyperledger Fabric关键技术与案例分析》第10章的步骤进行配置。

1. 环境说明

- OS:Ubuntu 18.4

- 已经修改hosts文件:

   192.168.6.245 peer.org1.qklszzn.com

- 已经正常启动Orderer节点

  orderer start 


- 已经正常启动 peer 


peer node start


- 已经创建了fabricchannel.tx 和Org1MSPanchors.tx

2. 问题描述


在创建创始块的时候,按照书中的说明,执行了下面的命令:

export set CORE_PEER_LOCALMSPID=BcOrg1MSP

export set CORE_PEER_MSPCONFIGPATH=/var/qklszzn/crypto-config/peerOrganizations/org1.qklszzn.com/users/Admin@org1.qklszzn.com/msp 

export set FABRIC_CFG_PATH=/var/qklszzn/peer 

peer channel create -t 50 -o orderer.qklszzn.com:7050 -c fabricchannel -f /var/qklszzn/fabricchannel.tx 


3. 出现错误


在前端看到的输出错误如下:

2018-11-05 06:21:38.429 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized

Error: got unexpected status: SERVICE_UNAVAILABLE -- will not enqueue, consenter for this channel hasn't started yet

Usage:

  peer channel create [flags]


Flags:

  -c, --channelID string   In case of a newChain command, the channel ID to create.

  -f, --file string        Configuration transaction file generated by a tool such as configtxgen for submitting to orderer

  -t, --timeout int        Channel creation timeout (default 5)


Global Flags:

      --cafile string                       Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint

      --certfile string                     Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint

      --clientauth                          Use mutual TLS when communicating with the orderer endpoint

      --keyfile string                      Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint

      --logging-level string                Default logging level and overrides, see core.yaml for full syntax

  -o, --orderer string                      Ordering service endpoint

      --ordererTLSHostnameOverride string   The hostname override to use when validating the TLS connection to the orderer.

      --tls                                 Use TLS when communicating with the orderer endpoint

  -v, --version                             Display current version of fabric peer server


在Orderer节点的控制台看到的错误日志如下:

2018-11-05 06:21:38.430 UTC [orderer/common/broadcast] Handle -> WARN 016 [channel: fabricchannel] Rejecting broadcast of message from 192.168.6.245:41512 with SERVICE_UNAVAILABLE: rejected by Consenter: will not enqueue, consenter for this channel hasn't started yet
2018-11-05 06:21:38.431 UTC [common/deliver] Handle -> WARN 017 Error reading from 192.168.6.245:41510: rpc error: code = Canceled desc = context canceled


请大神们指教,我出现的错误是因为什么?


请先 登录 后评论

1 个回答

AndyCao

这应该是和你的orderer服务运行不正常有关,你可以看看你的orderer节点的log日志里面有没有提示什么错误

请先 登录 后评论
  • 1 关注
  • 0 收藏,103 浏览
  • yeseric 提出于 2018-11-05 14:29

相似问题