用例是:
- 我创建了一个带有一个通道的网络,其中一个通道说, channel1 与三个组织(org1,org2 and org3)。
- org1和org2对等方已加入通道 Channel1 。
- org3仅存在于频道配置中,但尚未加入频道。
- 现在,我在系统通道和Channel1配置中添加了新的订购器端点,并删除了旧订购器端点。
- 我的新订单器工作正常,能够为两个通道提供配置。
- 我从org3 peer获取了Channel1的0块,并发出了JOIN命令。
- 该命令工作正常,但是在对等方面,我会遇到这些错误:
2022-04-20 05:28:18.210 UTC 006b WARN [peer.blocksprovider] func1 -> Encountered an error reading from deliver stream: EOF channel=channel1 orderer-address=orderer.example.com:7050
2022-04-20 05:28:18.210 UTC 006c WARN [peer.blocksprovider] DeliverBlocks -> Got error while attempting to receive blocks: received bad status SERVICE_UNAVAILABLE from orderer channel=channel1 orderer-address=orderer.example.com:7050
org3对等方仍在尝试与较旧的订单器端点连接(因为它们最初是在0块中定义的)。
那么如何解决这个问题?
我可以认为的一种方法是使用org1/org2对等的快照。
你的想法是什么?
谢谢
The use case is:
- I created a network with Raft Ordering service having one channel say, channel1 with three Organisations (Org1, Org2 and Org3).
- Org1 and Org2 peers have joined the channel channel1.
- Org3 is just present in the channel config but not joined the channel yet.
- Now I added the new orderer endpoints in the system channel and channel1 config and removed the old orderer endpoints.
- My new orderers are working fine, able to fetch the config for both channels.
- I fetched the 0 block of channel1 from Org3 peer and issued the join command.
- The command works fine, but in the peer I am getting these error:
2022-04-20 05:28:18.210 UTC 006b WARN [peer.blocksprovider] func1 -> Encountered an error reading from deliver stream: EOF channel=channel1 orderer-address=orderer.example.com:7050
2022-04-20 05:28:18.210 UTC 006c WARN [peer.blocksprovider] DeliverBlocks -> Got error while attempting to receive blocks: received bad status SERVICE_UNAVAILABLE from orderer channel=channel1 orderer-address=orderer.example.com:7050
The Org3 peer is still trying to connect with the older orderer endpoints (as they were defined in the 0 block initially).
So how to sort out this problem?
One way I can think is to use the snapshot of the Org1/Org2 peer maybe.
What are your thoughts?
Thanks
发布评论
评论(2)
我找到了解决方案,因此,如果将来有人需要它,可以在订单器端点在频道配置中更新订单器端点时使用此答案加入频道。
方法1:
在同伴配置中,您可以覆盖一些变量,以用新的订单器端点覆盖旧订购器端点。
配置文件和参数的链接是:
此方法将允许您使用Genesis Block加入对等,并得到较旧版本的织物(< = V2.2)的支持,该版本不支持加入加入通过快照。
方法2:
如果您在织物v2.2+上,则可以使用方法1或使用来自另一个对等的快照连接通道。
官方文档中有教程,请检查:
谢谢,
萨希尔
I found the solution, so if anyone in the future needs it, can use this answer to join the channel when the orderer endpoints are updated in the channel configuration.
Method 1:
In the peer configuration you can override some of the variables to override the old orderer endpoint with the new orderer endpoints.
The link to the config file and params is:
https://github.com/hyperledger/fabric/blob/main/sampleconfig/core.yaml#L382-L388
This method will allow you to join the peer using genesis block and is supported by older versions of Fabric (<=v2.2) which does not support joining by snapshot.
Method 2:
If you are on Fabric v2.2+, then you can either use the Method 1 or join the channel using a snapshot from another peer.
There is tutorial in the official docs for that, please check it:
https://hyperledger-fabric.readthedocs.io/en/release-2.3/peer_ledger_snapshot.html
Thanks,
Sahil
来自HLF文档
From HLF docs
Taking ledger snapshots and using them to join channels