Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fabric deployment fails at creating channel #440

Open
benny1693 opened this issue Dec 28, 2022 · 0 comments
Open

Fabric deployment fails at creating channel #440

benny1693 opened this issue Dec 28, 2022 · 0 comments

Comments

@benny1693
Copy link

I'm trying to write code in Obsidian, but the deployment on the blockchain doesn't work. I followed very precisely the steps described in the README.MD file.
I tried to deploy the chaincode using both the VSCode extension and the script mentioned in the instructions. I also tried to reinstall the tool, but nothing changed.
It seems that the script can't create the channel for the orderer. In particular, in the log I find:
Error: got unexpected status: BAD_REQUEST -- error validating channel creation transaction for new channel 'mychannel', could not succesfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied

Steps to reproduce the behavior:

  1. Compile the contracts using the terminal
  2. Use the "Obsidian: Deploy smart contract and start Fabric network" in VSCode command palette or run the up.sh script from the network-framework directory
  3. In the log, the mentioned errors shows up

Here the complete log:

org/hyperledger/fabric/example/Contract.java
org/hyperledger/fabric/example/Main.java
org/hyperledger/fabric/example/Money.java
org/hyperledger/fabric/example/Person.java
Successfully generated Fabric chaincode at /home/benedetto/Documenti/tesi_magistrale/build/Main

 *  Executing task: obsidianautoup -s /home/benedetto/Documenti/tesi_magistrale/build/Main 

no network
network down; starting
LOCAL_VERSION=1.4.4
DOCKER_IMAGE_VERSION=1.4.4
/home/benedetto/Obsidian/network-framework/../bin/cryptogen

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
+ cryptogen generate --config=./crypto-config.yaml
org1.example.com
org2.example.com
+ res=0
+ set +x

/home/benedetto/Obsidian/network-framework/../bin/configtxgen
##########################################################
#########  Generating Orderer Genesis block ##############
##########################################################
+ configtxgen -profile TwoOrgsOrdererGenesis -channelID byfn-sys-channel -outputBlock ./channel-artifacts/genesis.block
2022-12-28 13:11:41.011 CET [common.tools.configtxgen] main -> INFO 001 Loading configuration
2022-12-28 13:11:41.041 CET [common.tools.configtxgen.localconfig] completeInitialization -> INFO 002 orderer type: solo
2022-12-28 13:11:41.041 CET [common.tools.configtxgen.localconfig] Load -> INFO 003 Loaded configuration: /home/benedetto/Obsidian/network-framework/configtx.yaml
2022-12-28 13:11:41.070 CET [common.tools.configtxgen.localconfig] completeInitialization -> INFO 004 orderer type: solo
2022-12-28 13:11:41.070 CET [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO 005 Loaded configuration: /home/benedetto/Obsidian/network-framework/configtx.yaml
2022-12-28 13:11:41.071 CET [common.tools.configtxgen] doOutputBlock -> INFO 006 Generating genesis block
2022-12-28 13:11:41.071 CET [common.tools.configtxgen] doOutputBlock -> INFO 007 Writing genesis block
+ res=0
+ set +x

#################################################################
### Generating channel configuration transaction 'channel.tx' ###
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID mychannel
2022-12-28 13:11:41.121 CET [common.tools.configtxgen] main -> INFO 001 Loading configuration
2022-12-28 13:11:41.154 CET [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /home/benedetto/Obsidian/network-framework/configtx.yaml
2022-12-28 13:11:41.183 CET [common.tools.configtxgen.localconfig] completeInitialization -> INFO 003 orderer type: solo
2022-12-28 13:11:41.183 CET [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO 004 Loaded configuration: /home/benedetto/Obsidian/network-framework/configtx.yaml
2022-12-28 13:11:41.183 CET [common.tools.configtxgen] doOutputChannelCreateTx -> INFO 005 Generating new channel configtx
2022-12-28 13:11:41.183 CET [common.tools.configtxgen.encoder] NewChannelGroup -> WARN 006 Default policy emission is deprecated, please include policy specifications for the channel group in configtx.yaml
2022-12-28 13:11:41.184 CET [common.tools.configtxgen.encoder] NewChannelGroup -> WARN 007 Default policy emission is deprecated, please include policy specifications for the channel group in configtx.yaml
2022-12-28 13:11:41.185 CET [common.tools.configtxgen] doOutputChannelCreateTx -> INFO 008 Writing new channel tx
+ res=0
+ set +x

#################################################################
#######    Generating anchor peer update for Org1MSP   ##########
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID mychannel -asOrg Org1MSP
2022-12-28 13:11:41.218 CET [common.tools.configtxgen] main -> INFO 001 Loading configuration
2022-12-28 13:11:41.251 CET [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /home/benedetto/Obsidian/network-framework/configtx.yaml
2022-12-28 13:11:41.278 CET [common.tools.configtxgen.localconfig] completeInitialization -> INFO 003 orderer type: solo
2022-12-28 13:11:41.278 CET [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO 004 Loaded configuration: /home/benedetto/Obsidian/network-framework/configtx.yaml
2022-12-28 13:11:41.278 CET [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 005 Generating anchor peer update
2022-12-28 13:11:41.279 CET [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 006 Writing anchor peer update
+ res=0
+ set +x

#################################################################
#######    Generating anchor peer update for Org2MSP   ##########
#################################################################
+ configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID mychannel -asOrg Org2MSP
2022-12-28 13:11:41.306 CET [common.tools.configtxgen] main -> INFO 001 Loading configuration
2022-12-28 13:11:41.335 CET [common.tools.configtxgen.localconfig] Load -> INFO 002 Loaded configuration: /home/benedetto/Obsidian/network-framework/configtx.yaml
2022-12-28 13:11:41.376 CET [common.tools.configtxgen.localconfig] completeInitialization -> INFO 003 orderer type: solo
2022-12-28 13:11:41.376 CET [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO 004 Loaded configuration: /home/benedetto/Obsidian/network-framework/configtx.yaml
2022-12-28 13:11:41.376 CET [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 005 Generating anchor peer update
2022-12-28 13:11:41.376 CET [common.tools.configtxgen] doOutputAnchorPeersUpdate -> INFO 006 Writing anchor peer update
+ res=0
+ set +x

Creating network "net_byfn" with the default driver
Creating volume "net_orderer.example.com" with default driver
Creating volume "net_peer0.org1.example.com" with default driver
Creating volume "net_peer1.org1.example.com" with default driver
Creating volume "net_peer0.org2.example.com" with default driver
Creating volume "net_peer1.org2.example.com" with default driver
Creating orderer.example.com    ... done
Creating peer1.org2.example.com ... done
Creating peer0.org2.example.com ... done
Creating peer1.org1.example.com ... done
Creating peer0.org1.example.com ... done
Creating cli                    ... done
value of COMPOSE_FILE: 
docker-compose-cli.yaml
value of IMAGE_TAG: 

value of CHANNEL_NAME: 
mychannel
value of time out: 
5

 ____    _____      _      ____    _____ 
/ ___|  |_   _|    / \    |  _ \  |_   _|
\___ \    | |     / _ \   | |_) |   | |  
 ___) |   | |    / ___ \  |  _ <    | |  
|____/    |_|   /_/   \_\ |_| \_\   |_|  

Start your network and all the peers!

CC_SRC_PATH : /opt/gopath/src/github.com/Main/
Channel name : mychannel
Creating channel...
+ peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=1
+ set +x
2022-12-28 12:11:54.076 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
Error: got unexpected status: BAD_REQUEST -- error validating channel creation transaction for new channel 'mychannel', could not succesfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group]  /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========

ERROR !!!! Test failed

 *  The terminal process "/bin/bash '-c', 'obsidianautoup -s /home/benedetto/Documenti/tesi_magistrale/build/Main'" terminated with exit code: 1. 

 *  Executing task: obsidiandown 

Stopping cli                    ... done
Stopping peer0.org1.example.com ... done
Stopping peer1.org1.example.com ... done
Stopping peer0.org2.example.com ... done
Stopping peer1.org2.example.com ... done
Stopping orderer.example.com    ... done
Removing cli                    ... done
Removing peer0.org1.example.com ... done
Removing peer1.org1.example.com ... done
Removing peer0.org2.example.com ... done
Removing peer1.org2.example.com ... done
Removing orderer.example.com    ... done
Removing network net_byfn
Removing volume net_orderer.example.com
Removing volume net_peer0.org1.example.com
Removing volume net_peer1.org1.example.com
Removing volume net_peer0.org2.example.com
Removing volume net_peer1.org2.example.com
Removing volume net_peer0.org3.example.com
WARNING: Volume net_peer0.org3.example.com not found.
Removing volume net_peer1.org3.example.com
WARNING: Volume net_peer1.org3.example.com not found.
---- No containers available for deletion ----
---- No images available for deletion ----

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant