Lab 5 - error changing anchor peer

Hi,
I have set up network as described in the tutorial. However, in Lab5 when I try to switch anchor peer I receive the following error:
peer channel update -o orderer.example.com:7050 -c allarewelcome -f ./config/changeanchorpeerorg1.tx
2019-07-15 13:27:13.560 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-07-15 13:27:13.565 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-07-15 13:27:13.567 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'allarewelcome': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application/Org1MSP be at version 0, but it is currently at version 1
I did obviously edit files as described in tutorial, restarted CLI container and set correct admin paths inside the CLI container. However, I still receive the same error. I also checked the ca key in the crypto config, which still match what is written in docker-compose.yml
Any tips? Thanks!
Comments
-
Obviously interested in finding the solution, without pruning the network. I guess it should be possible to fix errors without doing that each time
0 -
Also, is there a spesific command to see who (which peer) is currently anchor peers within a channel? I tried the "peer channel getinfo c- allarewelcome" command, but no info about anchor peers
0 -
I did run the teardown.sh script, and then tried to change anchor peer from peer0 to peer1. As expected, I did work without any issues then. So I assume the issue was related to old certificated being used/referenced?
However, my question is how to solve this issue without doing the teardown.sh script? Any way to delete old certificated manually?0 -
STRANGE!
If I do the same process again (not resetting the network, just trying to change anchor peer) by editing file, recreating transaction and restarting CLI container, the error message appear again!:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel update -o orderer.example.com:7050 -c allarewelcome -f ./config/changeanchorpeerorg1.tx
2019-07-16 10:00:54.654 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-07-16 10:00:54.659 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-07-16 10:00:54.660 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'allarewelcome': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application/Org1MSP be at version 0, but it is currently at version 1Now I also tried changing the admin paths by exporting within CLI container, without help, still same error message. I do not understand why??!
Does anyone know? @kmyatt
0 -
I will try to provide a vague idea. The error is due to version mismatch. In fabric the configurable elements have versions. So every committed change increases the version of the particular configurable element by one. So, from the error, we can say there has been a change already and you try to change/modify/update the same element again by issuing the same command again so, there is a version mismatch. I am not sure but, I think you have a committed a change already to the application channel.
I would like to get more details and reasoning from the experts!
0 -
To my understanding, the application channel is the channel of peers (I don't know why do they call it as such if this is true correct), and anchor peers are per organisation per channel. So, I think you have already updated the anchor peer for org1.
0 -
Thanks for reply @indirajith
Yeah I was thinking about that, but I am inside the CLI, so I tried to edit the yml file and do it for peer0, or peer1. So the same error message appears, this is why I believe this has to do with old ceritificates maybe instead? I am not sure.But it should be possible to switch anchor peers multiple times, with the same procedure, right? Obviously restarting the CLI container after editing the yml file.
?
0 -
And what is the command to find out who is currently the anchor peer on the network?
0 -
to know which the peer anchor you have to do a fetch config
1) peer channel fetch config /etc/hyperledger/configtx/config-channel.block -c allarewelcome -o orderer.example.com:70502) ../bin/configtxlator proto_decode --input config/config-channel.block --type common.Block >config/config-channel.block.json
3) inside the json filter anchor that is going to be the anchor peer
1 -
Here is the answer to this specific issue regarding changing anchor peers multiple times:
look at the configtxgen documentation ( https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/configtxgen.html#configtxgen), you'll notice the following:
-outputAnchorPeersUpdate string
Creates an config update to update an anchor peer (works only with the default channel creation, and only for the first update)The last comment explains the issue: "and only for the first update"
So you cannot use configtxgen to update the anchor peers more than once and you can only use it if no other channel updates have occurred other than channel creation.
In order to update several times, you'll need to follow the steps outlined at https://hyperledger-fabric.readthedocs.io/en/release-1.4/config_update.html in order to actually perform subsequent channel updates.
Developers of Fabric might be making better tooling for this post 2.0, but for now the above is the only documented way to do things.
0 -
https://medium.com/coinmonks/hyperledger-fabric-updating-channel-configs-45082a5dc9b2
Please refer to the attached steps for changing the configuration file and updating.
0
Categories
- All Categories
- 51 LFX Mentorship
- 104 LFX Mentorship: Linux Kernel
- 576 Linux Foundation IT Professional Programs
- 304 Cloud Engineer IT Professional Program
- 125 Advanced Cloud Engineer IT Professional Program
- 53 DevOps Engineer IT Professional Program
- 61 Cloud Native Developer IT Professional Program
- 5 Express Training Courses
- 5 Express Courses - Discussion Forum
- 2.1K Training Courses
- 19 LFC110 Class Forum
- 7 LFC131 Class Forum
- 27 LFD102 Class Forum
- 158 LFD103 Class Forum
- 21 LFD121 Class Forum
- 1 LFD137 Class Forum
- 61 LFD201 Class Forum
- 1 LFD210 Class Forum
- LFD210-CN Class Forum
- 1 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum
- LFD237 Class Forum
- 23 LFD254 Class Forum
- 613 LFD259 Class Forum
- 105 LFD272 Class Forum
- 1 LFD272-JP クラス フォーラム
- 1 LFD273 Class Forum
- 2 LFS145 Class Forum
- 25 LFS200 Class Forum
- 739 LFS201 Class Forum
- 1 LFS201-JP クラス フォーラム
- 11 LFS203 Class Forum
- 77 LFS207 Class Forum
- 300 LFS211 Class Forum
- 54 LFS216 Class Forum
- 47 LFS241 Class Forum
- 41 LFS242 Class Forum
- 37 LFS243 Class Forum
- 11 LFS244 Class Forum
- 37 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 141 LFS253 Class Forum
- LFS254 Class Forum
- 1.1K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 93 LFS260 Class Forum
- 132 LFS261 Class Forum
- 33 LFS262 Class Forum
- 80 LFS263 Class Forum
- 15 LFS264 Class Forum
- 11 LFS266 Class Forum
- 18 LFS267 Class Forum
- 18 LFS268 Class Forum
- 23 LFS269 Class Forum
- 203 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- LFS281 Class Forum
- 236 LFW211 Class Forum
- 172 LFW212 Class Forum
- 7 SKF100 Class Forum
- SKF200 Class Forum
- 903 Hardware
- 219 Drivers
- 74 I/O Devices
- 44 Monitors
- 116 Multimedia
- 209 Networking
- 101 Printers & Scanners
- 85 Storage
- 763 Linux Distributions
- 88 Debian
- 66 Fedora
- 15 Linux Mint
- 13 Mageia
- 24 openSUSE
- 142 Red Hat Enterprise
- 33 Slackware
- 13 SUSE Enterprise
- 357 Ubuntu
- 479 Linux System Administration
- 41 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 95 Linux Security
- 78 Network Management
- 108 System Management
- 49 Web Management
- 68 Mobile Computing
- 23 Android
- 30 Development
- 1.2K New to Linux
- 1.1K Getting Started with Linux
- 538 Off Topic
- 131 Introductions
- 217 Small Talk
- 22 Study Material
- 826 Programming and Development
- 278 Kernel Development
- 514 Software Development
- 928 Software
- 260 Applications
- 184 Command Line
- 3 Compiling/Installing
- 76 Games
- 316 Installation
- 61 All In Program
- 61 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)