fabric 2.3 创建通道问题

在手动搭建Fabricv2.3生产网络时遇到问题,尝试创建通道但因TLS证书路径错误导致失败。已将原有网络样本的organizations文件夹复制到新目录,但运行osnadmin命令后仍然报错找不到证书文件。同时,订单服务节点的状态显示为follower而非预期的consenter,且高度为0,可能需要重新初始化或配置以正确设置共识关系。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题1

根据2.3官方文档,创建通道时进行到如下步骤

osnadmin channel list -o localhost:7053 --ca-file "$ORDERER_CA" --client-cert "$ORDERER_ADMIN_TLS_SIGN_CERT" --client-key "$ORDERER_ADMIN_TLS_PRIVATE_KEY"

运行结果

osnadmin: error: parsing arguments: reading orderer CA certificate: open /home/geneg/twonodes/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem: no such file or directory. Try --help

原因是osnadmin通道命令与订购节点使用相互TLS通信,需要提供以下证书:

  • --ca-file: Specify the location and file name of the orderer organization TLS CA root certificate.
  • --client-cert: Specify the location and file name of admin client signed certificate from the TLS CA.
  • --client-key: Specify the location and file name of admin client private key from the TLS CA.

由于我是再新建的/home/geneg/twonodes下进行手动搭建生产网络,之间安装的fabric v2.3位置在/usr/local/test/下,进入/usr/local/test/fabric-samples/test-network中,存在organizations文件夹,于是将其复制到/home/geneg/twonodes中。再次运行之前出错的指令,结果如下而官方给出的运行成功结果为

问题2

 这个是脏数据问题,只能重新来过了5555

仍在解决 

可以看到,官方的"consensusRelation"为"consenter"(共识关系为理事会),status值为onboarding,并且height值为1。而我自己生成的是"follower",height值为0。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值