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
[email protected]:/opt/gopath/src/github.com/hyperledger/fabric/peer# echo $CORE_PEER_ADDRESS
peer0.org2.example.com:7051
**[email protected]:/opt/gopath/src/github.com/hyperledger/fabric/peer# echo $CORE_PEER_LOCALMSPID
**Org2MSP
**[email protected]:/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
[email protected]:/opt/gopath/src/github.com/hyperledger/fabric/peer#[email protected]:/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
[email protected]:/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
[email protected]:/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
- 10.1K All Categories
- 35 LFX Mentorship
- 88 LFX Mentorship: Linux Kernel
- 502 Linux Foundation Boot Camps
- 278 Cloud Engineer Boot Camp
- 103 Advanced Cloud Engineer Boot Camp
- 47 DevOps Engineer Boot Camp
- 41 Cloud Native Developer Boot Camp
- 2 Express Training Courses
- 2 Express Courses - Discussion Forum
- 1.7K Training Courses
- 17 LFC110 Class Forum
- 4 LFC131 Class Forum
- 19 LFD102 Class Forum
- 148 LFD103 Class Forum
- 12 LFD121 Class Forum
- 61 LFD201 Class Forum
- LFD210 Class Forum
- 1 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum
- 23 LFD254 Class Forum
- 567 LFD259 Class Forum
- 100 LFD272 Class Forum
- 1 LFD272-JP クラス フォーラム
- 1 LFS145 Class Forum
- 22 LFS200 Class Forum
- 739 LFS201 Class Forum
- 1 LFS201-JP クラス フォーラム
- 1 LFS203 Class Forum
- 45 LFS207 Class Forum
- 298 LFS211 Class Forum
- 53 LFS216 Class Forum
- 46 LFS241 Class Forum
- 40 LFS242 Class Forum
- 37 LFS243 Class Forum
- 10 LFS244 Class Forum
- 27 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- 131 LFS253 Class Forum
- 994 LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 87 LFS260 Class Forum
- 126 LFS261 Class Forum
- 31 LFS262 Class Forum
- 79 LFS263 Class Forum
- 15 LFS264 Class Forum
- 10 LFS266 Class Forum
- 17 LFS267 Class Forum
- 17 LFS268 Class Forum
- 21 LFS269 Class Forum
- 200 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- 212 LFW211 Class Forum
- 153 LFW212 Class Forum
- 899 Hardware
- 217 Drivers
- 74 I/O Devices
- 44 Monitors
- 115 Multimedia
- 208 Networking
- 101 Printers & Scanners
- 85 Storage
- 749 Linux Distributions
- 88 Debian
- 64 Fedora
- 14 Linux Mint
- 13 Mageia
- 24 openSUSE
- 133 Red Hat Enterprise
- 33 Slackware
- 13 SUSE Enterprise
- 355 Ubuntu
- 473 Linux System Administration
- 38 Cloud Computing
- 69 Command Line/Scripting
- Github systems admin projects
- 94 Linux Security
- 77 Network Management
- 108 System Management
- 49 Web Management
- 63 Mobile Computing
- 22 Android
- 27 Development
- 1.2K New to Linux
- 1.1K Getting Started with Linux
- 527 Off Topic
- 127 Introductions
- 213 Small Talk
- 19 Study Material
- 794 Programming and Development
- 262 Kernel Development
- 498 Software Development
- 922 Software
- 257 Applications
- 182 Command Line
- 2 Compiling/Installing
- 76 Games
- 316 Installation
- 53 All In Program
- 53 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)