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
- 212 LFX Mentorship
- 212 LFX Mentorship: Linux Kernel
- 744 Linux Foundation IT Professional Programs
- 341 Cloud Engineer IT Professional Program
- 168 Advanced Cloud Engineer IT Professional Program
- 70 DevOps Engineer IT Professional Program
- 134 Cloud Native Developer IT Professional Program
- 132 Express Training Courses
- 132 Express Courses - Discussion Forum
- 6.1K Training Courses
- 44 LFC110 Class Forum - Discontinued
- 70 LFC131 Class Forum
- 42 LFD102 Class Forum
- 225 LFD103 Class Forum
- 18 LFD110 Class Forum
- 36 LFD121 Class Forum
- 18 LFD133 Class Forum
- 7 LFD134 Class Forum
- 18 LFD137 Class Forum
- 71 LFD201 Class Forum
- 4 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 2 LFD233 Class Forum
- 4 LFD237 Class Forum
- 24 LFD254 Class Forum
- 692 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 11 LFD273 Class Forum
- 131 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- 4 LFS142 Class Forum
- 5 LFS144 Class Forum
- 4 LFS145 Class Forum
- 2 LFS146 Class Forum
- 3 LFS147 Class Forum
- LFS148 Class Forum
- 14 LFS151 Class Forum
- 2 LFS157 Class Forum
- 22 LFS158 Class Forum
- 6 LFS162 Class Forum
- 2 LFS166 Class Forum
- 4 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 3 LFS178 Class Forum
- 3 LFS180 Class Forum
- 2 LFS182 Class Forum
- 5 LFS183 Class Forum
- 31 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム
- 18 LFS203 Class Forum
- 125 LFS207 Class Forum
- 2 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum
- 56 LFS216 Class Forum
- 52 LFS241 Class Forum
- 48 LFS242 Class Forum
- 38 LFS243 Class Forum
- 15 LFS244 Class Forum
- 2 LFS245 Class Forum
- LFS246 Class Forum
- 48 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 149 LFS253 Class Forum
- 1 LFS254 Class Forum
- 1 LFS255 Class Forum
- 7 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 117 LFS260 Class Forum
- 159 LFS261 Class Forum
- 42 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 24 LFS267 Class Forum
- 21 LFS268 Class Forum
- 30 LFS269 Class Forum
- 201 LFS272 Class Forum
- 2 LFS272-JP クラス フォーラム
- 1 LFS274 Class Forum
- 4 LFS281 Class Forum
- 9 LFW111 Class Forum
- 259 LFW211 Class Forum
- 181 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 794 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 101 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 755 Linux Distributions
- 82 Debian
- 67 Fedora
- 16 Linux Mint
- 13 Mageia
- 23 openSUSE
- 147 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 352 Ubuntu
- 468 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 93 Linux Security
- 78 Network Management
- 102 System Management
- 47 Web Management
- 60 Mobile Computing
- 17 Android
- 31 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 369 Off Topic
- 114 Introductions
- 173 Small Talk
- 21 Study Material
- 674 Programming and Development
- 296 Kernel Development
- 360 Software Development
- 1.8K Software
- 236 Applications
- 182 Command Line
- 3 Compiling/Installing
- 985 Games
- 316 Installation
- 92 All In Program
- 92 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)