Unable to complete Lab 7 - multiple issues with Upgrading the Endorsement Policy of Other Peers
I've been through Lab 7 three times already and I keep ending up with the same problem. I make it all the way to the end, last section "Upgrading the Endorsement Policy of Other Peers".
First issue is running
peer chaincode upgrade -n ccForAll -v 1.1 -o orderer.example.com:7050 --policy “AND(‘Org1.peer’, ‘Org2.peer’ OR (‘Org1.admin’) )” -c '{“Args”:[“Mach”, “50”]}’
This errors for not having Channel. After adding Channel it then errors for "Error: invalid policy"
I found a correction in another thread post for
peer chaincode upgrade -n ccForAll -v 1.1 -C allarewelcome -c '{"Args":["Mach","50"]}' --policy "AND('Org1.peer','Org2.peer', OR('Org1.member','org2.peer'))"
This has the channel and the correct policy with the comma before OR
When I run this I get an error
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg version already exists for chaincode with name 'ccForAll'
I did think it was strange we were using 1.1 again, so I did the following
peer chaincode install -n ccForAll -v 1.2 -p github.com/sacc
peer chaincode upgrade -n ccForAll -v 1.2 -C allarewelcome -c '{"Args":["Mach","50"]}' --policy "AND('Org1.peer','Org2.peer', OR('Org1.member','org2.peer'))"
This throws an error
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg instantiation policy violation: signature set did not satisfy policy
Not sure where to go from here. Any suggestions?
Comments
-
I was able to make some progress and instantiate/upgrade chaincode if I did it from an Org1 peer; that went through successfully. But trying to instantiate from Org2 does not work.
I also have the issue that while it instantiated to Org1.peer0 and Org1.peer1, as well as Org2.peer0, it will not instantiate to Org2.peer1.
For Org2.peer1 I get the following error message when I run this command
-peer chaincode list --installed && peer chaincode list --instantiated -C allarewelcome
Get installed chaincodes on peer:
Name: ccForAll, Version: 1.1, Path: github.com/sacc, Id: a3a8fc818cd2061693f70691c7d6a94e8af6104f2415f4cb406f878f448c9852
Name: ccForAll, Version: 1.2, Path: github.com/sacc, Id: 4526ccbfb4a752dd946a565fff4e87b9981fb17bb96a2fa7b92a49a56f8b9fb8
Name: networkChaincode, Version: 1.1, Path: github.com/sacc, Id: 61c641861cb554d2a6e8e1c8119335c0e168520fd2b42cb274e0c5052092f620
2020-05-09 17:01:16.417 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2020-05-09 17:01:16.429 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
Error: Error endorsing chaincode: rpc error: code = Unknown desc = access denied: channel [allarewelcome] creator org [Org2MSP]If I run same command on any of the other peers I get
Get installed chaincodes on peer:
Name: ccForAll, Version: 1.1, Path: github.com/sacc, Id: a3a8fc818cd2061693f70691c7d6a94e8af6104f2415f4cb406f878f448c9852
Name: ccForAll, Version: 1.2, Path: github.com/sacc, Id: 4526ccbfb4a752dd946a565fff4e87b9981fb17bb96a2fa7b92a49a56f8b9fb8
Name: networkChaincode, Version: 1.1, Path: github.com/sacc, Id: 61c641861cb554d2a6e8e1c8119335c0e168520fd2b42cb274e0c5052092f620
Get instantiated chaincodes on channel allarewelcome:
Name: ccForAll, Version: 1.1, Path: github.com/sacc, Escc: escc, Vscc: vscc
Name: networkChaincode, Version: 1.1, Path: github.com/sacc, Escc: escc, Vscc: vsccSo I have two outstanding issues I need help figuring out
1) Why couldn't I upgrade the chaincode from Org2?
2) Why can't I instantiate the chaincode(s) on Org2.peer1, but I am able to on all the other peers?0 -
I solved #2 by having Org2.peer1 rejoin channel allarewelcome.
0 -
@garycris said:
I solved #2 by having Org2.peer1 rejoin channel allarewelcome.Hi @garycris ,
Glad you resolved the issue. Seems like you maybe restarted the network in between, so that Org2.peer1 needed to rejoin before installing and instantiate the chaincode again.For your first error, it is usually because it was not signed by the admin of the organization: "Error: could not assemble transaction, err proposal response was not successful, error code 500, msg instantiation policy violation: signature set did not satisfy policy"
So for anyone else having the same issue, just remember to set correct properties in the CLI (CORE_PEER_LOCALMSPID & CORE_PEER_MSPCONFIGPATH).
0 -
Thanks for the response, but still an issue from Org2. I checked my pathing and it is correct
root@4d42335122b7:/opt/gopath/src/github.com/hyperledger/fabric/peer# echo $CORE_PEER_ADDRESS
peer0.org2.example.com:7051
**root@4d42335122b7:/opt/gopath/src/github.com/hyperledger/fabric/peer# echo $CORE_PEER_LOCALMSPID
**Org2MSP
**root@4d42335122b7:/opt/gopath/src/github.com/hyperledger/fabric/peer# echo $CORE_PEER_MSPCONFIGPATH
**/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
root@4d42335122b7:/opt/gopath/src/github.com/hyperledger/fabric/peer#root@4d42335122b7:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode list --installed
Get installed chaincodes on peer:
Name: ccForAll, Version: 1.1, Path: github.com/sacc, Id: a3a8fc818cd2061693f70691c7d6a94e8af6104f2415f4cb406f878f448c9852
Name: ccForAll, Version: 1.11, Path: github.com/sacc, Id: 860b48b99d122b651242cde573c008cdbe6edfbf54c728514114c659fd48fa7d
root@4d42335122b7:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode upgrade -n ccForAll -v 1.11 -C allarewelcome -c '{"Args":["Mach","50"]}' --policy "AND('Org1.peer','Org2.peer', OR('Org1.member','org2.peer'))"
2020-05-31 16:26:38.178 UTC [chaincodeCmd] InitCmdFactory -> INFO 001 Retrieved channel (allarewelcome) orderer endpoint: orderer.example.com:7050
2020-05-31 16:26:38.179 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default escc
2020-05-31 16:26:38.179 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg instantiation policy violation: signature set did not satisfy policy
root@4d42335122b7:/opt/gopath/src/github.com/hyperledger/fabric/peer#Should I be able to do the upgrade from Org2 or is only Org1 permitted at this point?
0 -
@praveents Please keep in mind that labs and the course changed since May. The course received a major update in November (it was expanded and updated to Fabric 2.2, and labs have changed as well). So issues and solutions related to the older version of the course may no longer be valid.
0 -
@fcioanca Labs related to Fabric v2.2 changed a lot w.r.t chaincode management. The problem I am having is specific to Fabric v1.4 and similar lab is not available in updated v2.2. Many issues with Fabric v1.4 labs are addressed in v2.2 but this particular issue with endorsement policy update from new org is not present in v2.2 lab.
0
Categories
- All Categories
- 219 LFX Mentorship
- 219 LFX Mentorship: Linux Kernel
- 793 Linux Foundation IT Professional Programs
- 354 Cloud Engineer IT Professional Program
- 179 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 147 Cloud Native Developer IT Professional Program
- 138 Express Training Courses
- 138 Express Courses - Discussion Forum
- 6.2K Training Courses
- 47 LFC110 Class Forum - Discontinued
- 71 LFC131 Class Forum
- 42 LFD102 Class Forum
- 227 LFD103 Class Forum
- 19 LFD110 Class Forum
- 38 LFD121 Class Forum
- 18 LFD133 Class Forum
- 7 LFD134 Class Forum
- 18 LFD137 Class Forum
- 71 LFD201 Class Forum
- 5 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
- 697 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 12 LFD273 Class Forum
- 151 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 5 LFS144 Class Forum
- 4 LFS145 Class Forum
- 3 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 2 LFS157 Class Forum
- 30 LFS158 Class Forum
- 7 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
- 32 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム
- 18 LFS203 Class Forum
- 134 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
- 49 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 153 LFS253 Class Forum
- 1 LFS254 Class Forum
- 1 LFS255 Class Forum
- 9 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.3K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 119 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
- 24 LFS268 Class Forum
- 30 LFS269 Class Forum
- LFS270 Class Forum
- 202 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
- 796 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 103 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 758 Linux Distributions
- 82 Debian
- 67 Fedora
- 17 Linux Mint
- 13 Mageia
- 23 openSUSE
- 148 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 353 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
- 63 Mobile Computing
- 18 Android
- 33 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 22 Study Material
- 805 Programming and Development
- 303 Kernel Development
- 484 Software Development
- 1.8K Software
- 263 Applications
- 183 Command Line
- 3 Compiling/Installing
- 987 Games
- 317 Installation
- 97 All In Program
- 97 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)