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/[email protected]/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
- 49 LFX Mentorship
- 102 LFX Mentorship: Linux Kernel
- 552 Linux Foundation Boot Camps
- 296 Cloud Engineer Boot Camp
- 118 Advanced Cloud Engineer Boot Camp
- 52 DevOps Engineer Boot Camp
- 53 Cloud Native Developer Boot Camp
- 4 Express Training Courses
- 4 Express Courses - Discussion Forum
- 1.9K Training Courses
- 18 LFC110 Class Forum
- 6 LFC131 Class Forum
- 25 LFD102 Class Forum
- 150 LFD103 Class Forum
- 17 LFD121 Class Forum
- LFD137 Class Forum
- 61 LFD201 Class Forum
- LFD210 Class Forum
- LFD210-CN Class Forum
- 1 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum
- LFD237 Class Forum
- 23 LFD254 Class Forum
- 597 LFD259 Class Forum
- 102 LFD272 Class Forum
- 1 LFD272-JP クラス フォーラム
- LFD273 Class Forum
- 2 LFS145 Class Forum
- 24 LFS200 Class Forum
- 739 LFS201 Class Forum
- 1 LFS201-JP クラス フォーラム
- 3 LFS203 Class Forum
- 69 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
- 33 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 140 LFS253 Class Forum
- LFS254 Class Forum
- 1K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 92 LFS260 Class Forum
- 129 LFS261 Class Forum
- 32 LFS262 Class Forum
- 79 LFS263 Class Forum
- 15 LFS264 Class Forum
- 11 LFS266 Class Forum
- 17 LFS267 Class Forum
- 17 LFS268 Class Forum
- 23 LFS269 Class Forum
- 203 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS281 Class Forum
- 221 LFW211 Class Forum
- 167 LFW212 Class Forum
- SKF100 Class Forum
- 901 Hardware
- 219 Drivers
- 74 I/O Devices
- 44 Monitors
- 115 Multimedia
- 208 Networking
- 101 Printers & Scanners
- 85 Storage
- 761 Linux Distributions
- 88 Debian
- 66 Fedora
- 15 Linux Mint
- 13 Mageia
- 24 openSUSE
- 141 Red Hat Enterprise
- 33 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 477 Linux System Administration
- 41 Cloud Computing
- 69 Command Line/Scripting
- Github systems admin projects
- 95 Linux Security
- 77 Network Management
- 108 System Management
- 49 Web Management
- 66 Mobile Computing
- 23 Android
- 29 Development
- 1.2K New to Linux
- 1.1K Getting Started with Linux
- 536 Off Topic
- 131 Introductions
- 216 Small Talk
- 21 Study Material
- 817 Programming and Development
- 275 Kernel Development
- 508 Software Development
- 928 Software
- 260 Applications
- 184 Command Line
- 3 Compiling/Installing
- 76 Games
- 316 Installation
- 59 All In Program
- 59 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)