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
- 176 LFX Mentorship
- 176 LFX Mentorship: Linux Kernel
- 750 Linux Foundation IT Professional Programs
- 373 Cloud Engineer IT Professional Program
- 169 Advanced Cloud Engineer IT Professional Program
- 74 DevOps IT Professional Program - Discontinued
- 4 DevOps & GitOps IT Professional Program
- 99 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 1 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 3 Cloud & Containers Training
- 1 Cybersecurity Training
- 1 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 1 Open Source Best Practice Training
- 1 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 768 Linux Distributions
- 81 Debian
- 67 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 949 Programming and Development
- 310 Kernel Development
- 621 Software Development
- 982 Software
- 374 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class 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)
