Creating the orderer genesis file but not getting expected output - hyperledger-fabric

Creating the orderer genesis file in channel-artifacts folder using below command:
configtxgen –profile OrdererGenesis -channelID system-channel -outputBlock ./channel-artifacts/genesis.block
configtx.yaml file:
OrdererGenesis:
<<: *ChannelDefaults
Capabilities:
<<: *ChannelCapabilities
Orderer:
<<: *OrdererDefaults
Organizations:
- *OrdererOrg
Capabilities:
<<: *OrdererCapabilities
Consortiums:
CertificationConsortium:
Organizations:
- *manufacturer
Getting Output:
2020-07-21 23:02:29.961 IST [common.tools.configtxgen] main -> INFO 001 Loading configuration
2020-07-21 23:02:30.020 IST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 002 orderer type: solo
2020-07-21 23:02:30.020 IST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO 003 Loaded configuration: /home/upgrad/workspace/pharma-network/network/configtx.yaml
Output should be:
2020-07-21 23:02:29.961 IST [common.tools.configtxgen] main -> INFO 001 Loading configuration
2020-07-21 23:02:30.020 IST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 002 orderer type: solo
2020-07-21 23:02:30.020 IST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO 003 Loaded configuration: /home/upgrad/workspace/pharma-network/network/configtx.yaml
2020-07-21 23:02:30.020 IST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 004 orderer type: solo
2020-07-21 23:02:30.020 IST [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO 005 Loaded configuration: /home/upgrad/workspace/pharma-network/network/configtx.yaml
**2020-07-21 23:02:30.020 IST [common.tools.configtxgen] doOutputBlock -> INFO 006 Generating genesis block
2020-07-21 23:02:30.020 IST [common.tools.configtxgen] doOutputBlock -> INFO 007 Writing genesis block**

Related

channel Got error &{FORBIDDEN} while joining new peer to a channel

I created my network with a script like:
docker-compose -f $COMPOSE_FILE up -d $CA
docker-compose -f $COMPOSE_FILE up -d $ORDERER1 $PEER0 $PEER1
docker-compose -f $COMPOSE_FILE up -d $CLI
docker exec cli peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f /etc/hyperledger/config/channel.tx
The channel is created and if I enter the cli, inside the working directory, I can find with ls the new generated file beerchannel.block. In this directory I also have crypto, which contains genesis block and other config files, and crypto-config that contains msp and certificates.
At this point containers logs seems good.
Now I want to join peer0 to the channel with:
docker exec -e $ENV_ADDRESSP0 $CLI peer channel join -b $CHANNEL_NAME.block
As soon as I do this command, I cannot join peer0 to the channel.
The strange thing is that running the script return this message:
2019-11-22 10:04:00.868 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-11-22 10:04:00.922 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
So, everything seems fine.
But when I enter the logs of orderer, I get this message repeated:
2019-11-22 09:59:07.429 UTC [fsblkstorage] newBlockfileMgr -> INFO 009 Getting block information from block storage
2019-11-22 09:59:07.438 UTC [orderer.commmon.multichannel] newChain -> INFO 00a Created and starting new chain beerchannel
2019-11-22 09:59:07.440 UTC [comm.grpc.server] 1 -> INFO 00b streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=172.29.0.6:41778 grpc.code=OK grpc.call_duration=25.385144ms
2019-11-22 10:04:06.923 UTC [common.deliver] deliverBlocks -> WARN 00c [channel: beerchannel] Client authorization revoked for deliver request from 172.29.0.4:48406: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied: permission denied
2019-11-22 10:04:06.923 UTC [comm.grpc.server] 1 -> INFO 00d streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=172.29.0.4:48406 grpc.code=OK grpc.call_duration=1.001442ms
2019-11-22 10:04:07.026 UTC [common.deliver] deliverBlocks -> WARN 00e [channel: beerchannel] Client authorization revoked for deliver request from 172.29.0.4:48408: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied: permission denied
2019-11-22 10:04:07.026 UTC [comm.grpc.server] 1 -> INFO 00f streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=172.29.0.4:48408 grpc.code=OK grpc.call_duration=582.912µs
Since the peer involved is peer0, I also entered in peer0 logs and found this errors:
2019-11-22 10:04:00.870 UTC [endorser] callChaincode -> INFO 029 [][ec4f5097] Entry chaincode: name:"cscc"
2019-11-22 10:04:00.870 UTC [ledgermgmt] CreateLedger -> INFO 02a Creating ledger [beerchannel] with genesis block
2019-11-22 10:04:00.874 UTC [fsblkstorage] newBlockfileMgr -> INFO 02b Getting block information from block storage
2019-11-22 10:04:00.896 UTC [kvledger] CommitWithPvtData -> INFO 02c [beerchannel] Committed block [0] with 1 transaction(s) in 16ms (state_validation=0ms block_and_pvtdata_commit=10ms state_commit=2ms) commitHash=[]
2019-11-22 10:04:00.899 UTC [ledgermgmt] CreateLedger -> INFO 02d Created ledger [beerchannel] with genesis block
2019-11-22 10:04:00.902 UTC [gossip.gossip] JoinChan -> INFO 02e Joining gossip network of channel beerchannel with 1 organizations
2019-11-22 10:04:00.902 UTC [gossip.gossip] learnAnchorPeers -> INFO 02f No configured anchor peers of Org1MSP for channel beerchannel to learn about
2019-11-22 10:04:00.917 UTC [gossip.state] NewGossipStateProvider -> INFO 030 Updating metadata information, current ledger sequence is at = 0, next expected block is = 1
2019-11-22 10:04:00.919 UTC [sccapi] deploySysCC -> INFO 031 system chaincode lscc/beerchannel(github.com/hyperledger/fabric/core/scc/lscc) deployed
2019-11-22 10:04:00.919 UTC [cscc] Init -> INFO 032 Init CSCC
2019-11-22 10:04:00.920 UTC [sccapi] deploySysCC -> INFO 033 system chaincode cscc/beerchannel(github.com/hyperledger/fabric/core/scc/cscc) deployed
2019-11-22 10:04:00.920 UTC [qscc] Init -> INFO 034 Init QSCC
2019-11-22 10:04:00.920 UTC [sccapi] deploySysCC -> INFO 035 system chaincode qscc/beerchannel(github.com/hyperledger/fabric/core/scc/qscc) deployed
2019-11-22 10:04:00.920 UTC [sccapi] deploySysCC -> INFO 036 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2019-11-22 10:04:00.921 UTC [endorser] callChaincode -> INFO 037 [][ec4f5097] Exit chaincode: name:"cscc" (51ms)
2019-11-22 10:04:00.921 UTC [comm.grpc.server] 1 -> INFO 038 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.29.0.6:42736 grpc.code=OK grpc.call_duration=51.473337ms
2019-11-22 10:04:06.919 UTC [gossip.election] beLeader -> INFO 039 42a5181dbddcff9d15ae32b05300e849fbcad1cf138e62f3d8b726d7b5db25d3 : Becoming a leader
2019-11-22 10:04:06.919 UTC [gossip.service] func1 -> INFO 03a Elected as a leader, starting delivery service for channel beerchannel
2019-11-22 10:04:06.923 UTC [blocksProvider] DeliverBlocks -> ERRO 03b [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:04:07.026 UTC [blocksProvider] DeliverBlocks -> ERRO 03c [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:04:07.239 UTC [blocksProvider] DeliverBlocks -> ERRO 03d [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:04:07.643 UTC [blocksProvider] DeliverBlocks -> ERRO 03e [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:04:08.445 UTC [blocksProvider] DeliverBlocks -> ERRO 03f [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:04:10.051 UTC [blocksProvider] DeliverBlocks -> ERRO 040 [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:04:13.254 UTC [blocksProvider] DeliverBlocks -> ERRO 041 [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:04:19.657 UTC [blocksProvider] DeliverBlocks -> ERRO 042 [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:04:29.662 UTC [blocksProvider] DeliverBlocks -> ERRO 043 [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:04:39.668 UTC [blocksProvider] DeliverBlocks -> ERRO 044 [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:04:49.671 UTC [blocksProvider] DeliverBlocks -> ERRO 045 [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:04:49.671 UTC [blocksProvider] DeliverBlocks -> ERRO 046 [beerchannel] Wrong statuses threshold passed, stopping block provider
2019-11-22 10:04:49.671 UTC [gossip.election] stopBeingLeader -> INFO 047 42a5181dbddcff9d15ae32b05300e849fbcad1cf138e62f3d8b726d7b5db25d3 Stopped being a leader
2019-11-22 10:04:49.671 UTC [gossip.service] func1 -> INFO 048 Renounced leadership, stopping delivery service for channel beerchannel
2019-11-22 10:05:56.924 UTC [gossip.election] beLeader -> INFO 049 42a5181dbddcff9d15ae32b05300e849fbcad1cf138e62f3d8b726d7b5db25d3 : Becoming a leader
2019-11-22 10:05:56.924 UTC [gossip.service] func1 -> INFO 04a Elected as a leader, starting delivery service for channel beerchannel
2019-11-22 10:05:56.929 UTC [blocksProvider] DeliverBlocks -> ERRO 04b [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:05:57.032 UTC [blocksProvider] DeliverBlocks -> ERRO 04c [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:05:57.235 UTC [blocksProvider] DeliverBlocks -> ERRO 04d [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:05:57.638 UTC [blocksProvider] DeliverBlocks -> ERRO 04e [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:05:58.441 UTC [blocksProvider] DeliverBlocks -> ERRO 04f [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:06:00.044 UTC [blocksProvider] DeliverBlocks -> ERRO 050 [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:06:03.247 UTC [blocksProvider] DeliverBlocks -> ERRO 051 [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:06:09.652 UTC [blocksProvider] DeliverBlocks -> ERRO 052 [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:06:19.656 UTC [blocksProvider] DeliverBlocks -> ERRO 053 [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:06:29.659 UTC [blocksProvider] DeliverBlocks -> ERRO 054 [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:06:39.662 UTC [blocksProvider] DeliverBlocks -> ERRO 055 [beerchannel] Got error &{FORBIDDEN}
2019-11-22 10:06:39.662 UTC [blocksProvider] DeliverBlocks -> ERRO 056 [beerchannel] Wrong statuses threshold passed, stopping block provider
2019-11-22 10:06:39.662 UTC [gossip.election] stopBeingLeader -> INFO 057 42a5181dbddcff9d15ae32b05300e849fbcad1cf138e62f3d8b726d7b5db25d3 Stopped being a leader
2019-11-22 10:06:39.662 UTC [gossip.service] func1 -> INFO 058 Renounced leadership, stopping delivery service for channel beerchannel
It seems something related to permissions but I cannot understand what's wrong in here.
The cli contains the beerchannel.block file, successfully generated it and now I just want to add peer0 to the channel.
Adding configtx.yaml
Organizations:
- &OrdererOrg
Name: OrdererOrg
ID: OrdererMSP
MSPDir: crypto-config/ordererOrganizations/c.com/msp
Policies:
Readers:
Type: Signature
Rule: "OR('OrdererMSP.member')"
Writers:
Type: Signature
Rule: "OR('OrdererMSP.member')"
Admins:
Type: Signature
Rule: "OR('OrdererMSP.admin')"
- &s
Name: sMSP
ID: sMSP
MSPDir: crypto-config/peerOrganizations/s.c.com/msp
Policies:
Readers:
Type: Signature
Rule: "OR('sMSP.admin', 'sMSP.peer', 'sMSP.client')"
Writers:
Type: Signature
Rule: "OR('sMSP.admin', 'sMSP.client')"
Admins:
Type: Signature
Rule: "OR('sMSP.admin')"
AnchorPeers:
- Host: peer1.s.c.com
Port: 7051
- Host: peer2.s.c.com
Port: 8051
Capabilities:
Channel: &ChannelCapabilities
V1_4_3: true
V1_3: false
V1_1: false
Orderer: &OrdererCapabilities
V1_4_2: true
V1_1: false
Application: &ApplicationCapabilities
V1_4_2: true
V1_3: false
V1_2: false
V1_1: false
Application: &ApplicationDefaults
Organizations:
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Capabilities:
<<: *ApplicationCapabilities
Orderer: &OrdererDefaults
OrdererType: solo
Addresses:
- orderer1.c.com:7050
BatchTimeout: 500ms
BatchSize:
MaxMessageCount: 15
AbsoluteMaxBytes: 99 MB
PreferredMaxBytes: 512 kb
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
BlockValidation:
Type: ImplicitMeta
Rule: "ANY Writers"
Capabilities:
<<: *OrdererCapabilities
Channel: &ChannelDefaults
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Capabilities:
<<: *ChannelCapabilities
Profiles:
OneOrgOrdererGenesis:
<<: *ChannelDefaults
Orderer:
<<: *OrdererDefaults
Organizations:
- *OrdererOrg
Consortiums:
SampleConsortium:
Organizations:
- *s
OneOrgChannel:
<<: *ChannelDefaults
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *s
SampleMultiNodeEtcdRaft:
<<: *ChannelDefaults
Capabilities:
<<: *ChannelCapabilities
Orderer:
<<: *OrdererDefaults
OrdererType: etcdraft
EtcdRaft:
Consenters:
- Host: orderer1.c.com
Port: 7050
ClientTLSCert: crypto-config/ordererOrganizations/c.com/orderers/orderer1.c.com/tls/server.crt
ServerTLSCert: crypto-config/ordererOrganizations/c.com/orderers/orderer1.c.com/tls/server.crt
- Host: orderer2.c.com
Port: 7050
ClientTLSCert: crypto-config/ordererOrganizations/c.com/orderers/orderer2.c.com/tls/server.crt
ServerTLSCert: crypto-config/ordererOrganizations/c.com/orderers/orderer2.c.com/tls/server.crt
- Host: orderer3.c.com
Port: 7050
ClientTLSCert: crypto-config/ordererOrganizations/c.com/orderers/orderer3.c.com/tls/server.crt
ServerTLSCert: crypto-config/ordererOrganizations/c.com/orderers/orderer3.c.com/tls/server.crt
Addresses:
- orderer1.c.com:7050
- orderer2.c.com:7050
- orderer3.c.com:7050
Organizations:
- *OrdererOrg
Capabilities:
<<: *OrdererCapabilities
Application:
<<: *ApplicationDefaults
Organizations:
- <<: *OrdererOrg
Consortiums:
SampleConsortium:
Organizations:
- *s
Check for the Reader policies that you have defined in your configtx.yaml this error is generated because of the policy mismatch. You have defined some specific user type(admin, peer, client) in your Reader policies but this specific user type is not passed into certificates that you have generated for your peer.
Edited:
If you want to make it generic and not specific to the identity type then you can edit the s org policies like this:
- &s
Name: sMSP
ID: sMSP
MSPDir: crypto-config/peerOrganizations/s.c.com/msp
Policies:
Readers:
Type: Signature
Rule: "OR('sMSP.member')"
Writers:
Type: Signature
Rule: "OR('sMSP.member')"
Admins:
Type: Signature
Rule: "OR('sMSP.admin')"
Check your crypto-config.yaml under peerOrgs section and add EnableNodeOUs property if missing then regenerate the crypto materials. Config example:
PeerOrgs:
- Name: Org1
Domain: org1.example.com
EnableNodeOUs: true

Hyperledger Fabric's Idemix usage

I want to try the idemix feature introduced by Fabric 1.3 version. based on the repo. I did some changes in order to support idemix. But when I run java -cp blockchain-client.jar org.example.chaincode.invocation.InvokeChaincode
,btw, I omitted the step 5 for Register and enroll users, I came across
2019-10-18 03:20:10.312 UTC [protoutils] ValidateProposalMessage -> WARN 049 channel [mychannel]: creator certificate is not valid: Failed verifing with opts [&{<nil> <nil> [] [{1 [111 114 103 49]} {2 1} {0 <nil>} {0 <nil>}] 3 [] 0 0xc00000fab8 0}]: signature invalid: APrime and ABar don't have the expected structure
2019-10-18 03:20:10.312 UTC [comm.grpc.server] 1 -> INFO 04a unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.22.0.1:33960 error="access denied: channel [mychannel] creator org [idemixMSPID1]" grpc.code=Unknown grpc.call_duration=82.6484ms` from peer container.
I set up a fabric network with minimal components. Two organizations, each has two peers and a CA. The demo is from repo. The demo's network with no idemix feature supported works well. When I add idemix section to configtx.yaml, regenerate crypto material, create a channel, etc. And the network finally is up. All containers are work well. But I interact with fab car chaincode using java-sdk, the above error info was thrown.
The following are from configtx.yaml file(just show key parts here):
Organizations:
- &OrdererOrg
Name: OrdererOrg
ID: OrdererMSP
MSPDir: crypto-config/ordererOrganizations/example.com/msp
- &Org1
Name: Org1MSP
ID: Org1MSP
MSPDir: crypto-config/peerOrganizations/org1.example.com/msp
- &Org2
Name: Org2MSP
ID: Org2MSP
MSPDir: crypto-config/peerOrganizations/org2.example.com/msp
- &Org1Idemix
Name: idemixMSP1
ID: idemixMSPID1
msptype: idemix
MSPDir: crypto-config/peerOrganizations/org3.example.com
- &Org2Idemix
Name: idemixMSP2
ID: idemixMSPID2
msptype: idemix
MSPDir: crypto-config/peerOrganizations/org4.example.com
Capabilities:
Channel: &ChannelCapabilities
V1_3: true
Orderer: &OrdererCapabilities
V1_1: true
Application: &ApplicationCapabilities
V1_3: true
#V1_2: false
#V1_1: false
Application: &ApplicationDefaults
Organizations:
Channel: &ChannelDefaults
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Capabilities:
<<: *ChannelCapabilities
Profiles:
TwoOrgsOrdererGenesis:
Capabilities:
<<: *ChannelCapabilities
Orderer:
<<: *OrdererDefaults
Organizations:
- *OrdererOrg
Capabilities:
<<: *OrdererCapabilities
Consortiums:
SampleConsortium:
Organizations:
- *Org1
- *Org2
- *Org1Idemix
- *Org2Idemix
Application:
<<: *ApplicationDefaults
Organizations:
- *OrdererOrg
Capabilities:
<<: *ApplicationCapabilities
TwoOrgsChannel:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org1
- *Org2
- *Org1Idemix
- *Org2Idemix
Capabilities:
<<: *ApplicationCapabilities
The code I add in InvokeChaincode.java before creating channel client as follows:
// org/example/chaincode/invocation.java
UserContext normalUserContext = new UserContext();
String name = "user"+System.currentTimeMillis();
normalUserContext.setName(name);
normalUserContext.setAffiliation(Config.ORG1);
normalUserContext.setMspId(Config.ORG3_IDEMIX_MSP);
String enrollmentSecret = caClient.registerUser(name, Config.ORG1);
normalUserContext = caClient.idemixEnrollUser(normalUserContext, enrollmentSecret,normalUserContext.getMspId());
FabricClient fabClient = new FabricClient(normalUserContext);
The configuration file added code:
// org/example/config/Config.java
public static final String ORG3 = "org3";
public static final String ORG3_IDEMIX_MSP = "idemixMSPID1";
And docker-composer.yaml file remains unchanged.
All the images used are 1.4.1
I expect the endorser peer able to verify tx proposal from client with idemix enabled. But now the peer side report 2019-10-18 03:20:10.312 UTC [protoutils] ValidateProposalMessage -> WARN 049 channel [mychannel]: creator certificate is not valid: Failed verifing with opts [&{<nil> <nil> [] [{1 [111 114 103 49]} {2 1} {0 <nil>} {0 <nil>}] 3 [] 0 0xc00000fab8 0}]: signature invalid: APrime and ABar don't have the expected structure
2019-10-18 03:20:10.312 UTC [comm.grpc.server] 1 -> INFO 04a unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.22.0.1:33960 error="access denied: channel [mychannel] creator org [idemixMSPID1]" grpc.code=Unknown grpc.call_duration=82.6484ms
I don't know why. I guess that if a peer does not support idemix tx verification. Are there some switches not open on peers? Help. Any replies will be thankful.

Got error &{NOT_FOUND} after joining a recently created channel

I am running a custom Hyperledger Fabric network that follows this arquitecture:
org1
peer0 (anchor)
peer1
orderer0
org2
peer0 (anchor)
peer1
orderer0
org3
orderer0
Once deployed, everything seems to work correctly. But, if I create a channel and join it from each one of the peers, I get the following log warning in them. Even when it is a warning, I guess it means that is not working correctly.
2019-10-07 10:38:17.323 UTC [blocksProvider] DeliverBlocks -> WARN 044 [global] Got error &{NOT_FOUND}
No errors are shown on the CLI (when I join the channel) neither on the orderers, but there is some activity in these ones after the peers join the channel, so the change is detected. The channel name is global and includes all the organizations and peers.
This is the complete log (without gossip or grpc messages):
2019-10-07 10:38:10.875 UTC [endorser] callChaincode -> INFO 024 [][ae2945c0] Entry chaincode: name:"cscc"
2019-10-07 10:38:10.877 UTC [ledgermgmt] CreateLedger -> INFO 025 Creating ledger [global] with genesis block
2019-10-07 10:38:10.886 UTC [fsblkstorage] newBlockfileMgr -> INFO 026 Getting block information from block storage
2019-10-07 10:38:10.899 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 027 Created state database global_
2019-10-07 10:38:10.960 UTC [kvledger] CommitWithPvtData -> INFO 028 [global] Committed block [0] with 1 transaction(s) in 60ms (state_validation=0ms block_and_pvtdata_commit=7ms state_commit=52ms) commitHash=[]
2019-10-07 10:38:10.961 UTC [ledgermgmt] CreateLedger -> INFO 029 Created ledger [global] with genesis block
2019-10-07 10:38:10.997 UTC [sccapi] deploySysCC -> INFO 034 system chaincode lscc/global(github.com/hyperledger/fabric/core/scc/lscc) deployed
2019-10-07 10:38:10.998 UTC [cscc] Init -> INFO 035 Init CSCC
2019-10-07 10:38:10.998 UTC [sccapi] deploySysCC -> INFO 036 system chaincode cscc/global(github.com/hyperledger/fabric/core/scc/cscc) deployed
2019-10-07 10:38:10.998 UTC [qscc] Init -> INFO 037 Init QSCC
2019-10-07 10:38:10.998 UTC [sccapi] deploySysCC -> INFO 038 system chaincode qscc/global(github.com/hyperledger/fabric/core/scc/qscc) deployed
2019-10-07 10:38:10.998 UTC [sccapi] deploySysCC -> INFO 039 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2019-10-07 10:38:10.998 UTC [endorser] callChaincode -> INFO 03a [][ae2945c0] Exit chaincode: name:"cscc" (123ms)
2019-10-07 10:38:17.002 UTC [blocksProvider] DeliverBlocks -> WARN 040 [global] Got error &{NOT_FOUND}
Is there a way I can get rid of the NOT_FOUND warning? I have not tried to follow and deploy chaincode but I am pretty sure it is not going to work.
Thank you for your help.
Update: This is my configtx.yaml file:
Capabilities:
Global: &ChannelCapabilities
V1_3: true
Orderer: &OrdererCapabilities
V1_1: true
Application: &ApplicationCapabilities
V1_3: true
Organizations:
- &org1
Name: org1
ID: org1MSP
MSPDir: /data/orgs/org1/msp
AdminPrincipal: Role.ADMIN
Policies:
Readers:
Type: Signature
Rule: "OR('org1MSP.member')"
Writers:
Type: Signature
Rule: "OR('org1MSP.member')"
Admins:
Type: Signature
Rule: "OR('org1MSP.admin')"
AnchorPeers:
- Host: peer0.org1
Port: 7051
- &org2
Name: org2
ID: org2MSP
MSPDir: /data/orgs/org2/msp
AdminPrincipal: Role.ADMIN
Policies:
Readers:
Type: Signature
Rule: "OR('org2MSP.member')"
Writers:
Type: Signature
Rule: "OR('org2MSP.member')"
Admins:
Type: Signature
Rule: "OR('org2MSP.admin')"
AnchorPeers:
- Host: peer0.org2
Port: 7051
- &org3
Name: org3
ID: org3MSP
MSPDir: /data/orgs/org3/msp
AdminPrincipal: Role.ADMIN
Policies:
Readers:
Type: Signature
Rule: "OR('org3MSP.member')"
Writers:
Type: Signature
Rule: "OR('org3MSP.member')"
Admins:
Type: Signature
Rule: "OR('org3MSP.admin')"
Orderer: &OrdererDefaults
OrdererType: kafka
Addresses:
- orderer0.org1:7050
- orderer0.org2:7050
- orderer0.org3:7050
BatchTimeout: 2s
BatchSize:
MaxMessageCount: 10
AbsoluteMaxBytes: 98 MB
PreferredMaxBytes: 512 KB
MaxChannels: 0
Kafka:
Brokers:
- bootstrap.kafka:9092
Organizations:
- *org1
- *org2
- *org3
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
BlockValidation:
Type: ImplicitMeta
Rule: "ANY Writers"
Capabilities:
<<: *OrdererCapabilities
Channel: &ChannelDefaults
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Capabilities:
<<: *ChannelCapabilities
Application: &ApplicationDefaults
ACLs: &ACLsDefault
lscc/ChaincodeExists: /Channel/Application/Readers
lscc/GetDeploymentSpec: /Channel/Application/Readers
lscc/GetChaincodeData: /Channel/Application/Readers
lscc/GetInstantiatedChaincodes: /Channel/Application/Readers
qscc/GetChainInfo: /Channel/Application/Readers
qscc/GetBlockByNumber: /Channel/Application/Readers
qscc/GetBlockByHash: /Channel/Application/Readers
qscc/GetTransactionByID: /Channel/Application/Readers
qscc/GetBlockByTxID: /Channel/Application/Readers
cscc/GetConfigBlock: /Channel/Application/Readers
cscc/GetConfigTree: /Channel/Application/Readers
cscc/SimulateConfigTreeUpdate: /Channel/Application/Readers
peer/Propose: /Channel/Application/Writers
peer/ChaincodeToChaincode: /Channel/Application/Readers
event/Block: /Channel/Application/Readers
event/FilteredBlock: /Channel/Application/Readers
Organizations:
Policies: &ApplicationDefaultPolicies
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Capabilities:
<<: *ApplicationCapabilities
Profiles:
OrgsOrdererGenesis:
<<: *ChannelDefaults
Orderer:
<<: *OrdererDefaults
Organizations:
- *org1
- *org2
- *org3
Capabilities:
<<: *OrdererCapabilities
Application:
<<: *ApplicationDefaults
Organizations:
- *org1
- *org2
- *org3
Capabilities:
<<: *ApplicationCapabilities
Consortiums:
SampleConsortium:
Organizations:
- *org1
- *org2
OrgsChannel:
Capabilities:
<<: *ChannelCapabilities
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *org1
- *org2
Capabilities:
<<: *ApplicationCapabilities
The error is because you are using genesis block to join channel instead when you create channel using file channel.tx a file would be generated named channel.block pass that in your peer channel join command
peer channel join -b channel.block

Hyperledger Fabric: 'Orderer' has invalid keys: EtcdRaft

while using the configtx.yaml from official Hyperledger repo we get below error when trying to create a genesis block:
root#774983db9864:/home# configtxgen -profile OrgsOrdererGenesis -outputBlock genesis.block -channelID 4chan
2019-03-05 19:25:44.240 UTC [common/tools/configtxgen] main -> INFO 001 Loading configuration
2019-03-05 19:25:44.261 UTC [common/tools/configtxgen/localconfig] Load -> CRIT 002 Error unmarshaling config into struct: 2 error(s) decoding:
* 'Orderer' has invalid keys: EtcdRaft
* 'Profiles[OrgsOrdererGenesis].Orderer' has invalid keys: EtcdRaft
2019-03-05 19:25:44.262 UTC [common/tools/configtxgen] func1 -> CRIT 003 Error unmarshaling config into struct: 2 error(s) decoding:
* 'Orderer' has invalid keys: EtcdRaft
* 'Profiles[OrgsOrdererGenesis].Orderer' has invalid keys: EtcdRaft
panic: Error unmarshaling config into struct: 2 error(s) decoding:
* 'Orderer' has invalid keys: EtcdRaft
* 'Profiles[OrgsOrdererGenesis].Orderer' has invalid keys: EtcdRaft [recovered]
panic: Error unmarshaling config into struct: 2 error(s) decoding:
* 'Orderer' has invalid keys: EtcdRaft
* 'Profiles[OrgsOrdererGenesis].Orderer' has invalid keys: EtcdRaft
goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc420195e00, 0xc420523560, 0x1, 0x1)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:188 +0xbd
main.main.func1()
/opt/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:254 +0x1ae
panic(0xc6ea00, 0xc420523550)
/opt/go/src/runtime/panic.go:505 +0x229
github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc420195c50, 0xc42054e120, 0x2, 0x2)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:188 +0xbd
github.com/hyperledger/fabric/common/tools/configtxgen/localconfig.Load(0x7fffbcd538da, 0x12, 0x0, 0x0, 0x0, 0xc4201b3540)
/opt/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:284 +0x607
main.main()
/opt/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:265 +0xce7
How can we fix this please?
Solution is to delete the EtcdRaft section as the Raft based consensus is not yet implemented in Hyperledger Fabric v1.3 or 1.4. The configtx.yaml in the repo should not be having this section.
SampleMultiNodeEtcdRaft:
<<: *ChannelDefaults
Capabilities:
<<: *ChannelCapabilities
Orderer:
<<: *OrdererDefaults
OrdererType: etcdraft
EtcdRaft:
Options:
TickInterval: 500ms
ElectionTick: 10
HeartbeatTick: 1
MaxInflightBlocks: 5
SnapshotIntervalSize: 20971520
Consenters:
...

Hyperledger Fabric channel creation failure

I'm running the following steps:
cryptogen generate --config./crypto-config.yaml
export FABRIC_CFG_PATH=$PWD
mkdir channel-artifacts
configtxgen -profile TwoOrgsOrdererGenesis -channelID byfn-sys-channel -outputBlock ./channel-artifacts/genesis.block
configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID "mychannel"
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID "mychannel" -asOrg Org1MSP
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID "mychannel" -asOrg Org2MSP
docker-compose -f docker-compose-cli.yaml up -d
docker exec -it cli bash
ORDERER_CA=/work/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
PEER0_ORG1_CA=/work/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
PEER0_ORG2_CA=/work/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
CORE_PEER_LOCALMSPID="OrdererMSP"
CORE_PEER_TLS_ROOTCERT_FILE=/work/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
CORE_PEER_MSPCONFIGPATH=/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp
CHANNEL="mychannel"
CC_SRC_PATH="/chaincode/"
peer channel create -o orderer.example.com:7050 -c $CHANNEL -f /work/channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA
Creating the channel yields:
peer channel create -o orderer.example.com:7050 -c mychannel -f /work/channel-artifacts/channel.tx --tls true --cafile /work/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
2018-12-21 05:58:02.995 UTC [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP
2018-12-21 05:58:02.996 UTC [viperutil] getKeysRecursively -> DEBU 002 Found map[string]interface{} value for peer.BCCSP.SW
2018-12-21 05:58:02.996 UTC [viperutil] unmarshalJSON -> DEBU 003 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2018-12-21 05:58:02.997 UTC [viperutil] getKeysRecursively -> DEBU 004 Found real value for peer.BCCSP.SW.Hash setting to string SHA2
2018-12-21 05:58:02.998 UTC [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value is not a string: 256
2018-12-21 05:58:02.998 UTC [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.SW.Security setting to int 256
2018-12-21 05:58:02.998 UTC [viperutil] getKeysRecursively -> DEBU 007 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore
2018-12-21 05:58:02.998 UTC [viperutil] unmarshalJSON -> DEBU 008 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input
2018-12-21 05:58:02.999 UTC [viperutil] getKeysRecursively -> DEBU 009 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string
2018-12-21 05:58:02.999 UTC [viperutil] getKeysRecursively -> DEBU 00a Found map[string]interface{} value for peer.BCCSP.PKCS11
2018-12-21 05:58:03.000 UTC [viperutil] unmarshalJSON -> DEBU 00b Unmarshal JSON: value is not a string: <nil>
2018-12-21 05:58:03.000 UTC [viperutil] getKeysRecursively -> DEBU 00c Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil>
2018-12-21 05:58:03.001 UTC [viperutil] getKeysRecursively -> DEBU 00d Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore
2018-12-21 05:58:03.002 UTC [viperutil] unmarshalJSON -> DEBU 00e Unmarshal JSON: value is not a string: <nil>
2018-12-21 05:58:03.003 UTC [viperutil] getKeysRecursively -> DEBU 00f Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil>
2018-12-21 05:58:03.003 UTC [viperutil] unmarshalJSON -> DEBU 010 Unmarshal JSON: value is not a string: <nil>
2018-12-21 05:58:03.004 UTC [viperutil] getKeysRecursively -> DEBU 011 Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil>
2018-12-21 05:58:03.005 UTC [viperutil] unmarshalJSON -> DEBU 012 Unmarshal JSON: value is not a string: <nil>
2018-12-21 05:58:03.006 UTC [viperutil] getKeysRecursively -> DEBU 013 Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil>
2018-12-21 05:58:03.007 UTC [viperutil] unmarshalJSON -> DEBU 014 Unmarshal JSON: value is not a string: <nil>
2018-12-21 05:58:03.007 UTC [viperutil] getKeysRecursively -> DEBU 015 Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil>
2018-12-21 05:58:03.008 UTC [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: <nil>
2018-12-21 05:58:03.009 UTC [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil>
2018-12-21 05:58:03.010 UTC [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2018-12-21 05:58:03.010 UTC [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.Default setting to string SW
2018-12-21 05:58:03.011 UTC [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]] PKCS11:map[Hash:<nil> Security:<nil> FileKeyStore:map[KeyStore:<nil>] Library:<nil> Label:<nil> Pin:<nil>] Default:SW]]
2018-12-21 05:58:03.020 UTC [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore]...done
2018-12-21 05:58:03.023 UTC [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW]
2018-12-21 05:58:03.024 UTC [msp] getPemMaterialFromDir -> DEBU 01d Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/signcerts
2018-12-21 05:58:03.041 UTC [msp] getPemMaterialFromDir -> DEBU 01e Inspecting file /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/signcerts/Admin#example.com-cert.pem
2018-12-21 05:58:03.049 UTC [msp] getPemMaterialFromDir -> DEBU 01f Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/cacerts
2018-12-21 05:58:03.058 UTC [msp] getPemMaterialFromDir -> DEBU 020 Inspecting file /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/cacerts/ca.example.com-cert.pem
2018-12-21 05:58:03.062 UTC [msp] getPemMaterialFromDir -> DEBU 021 Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/admincerts
2018-12-21 05:58:03.067 UTC [msp] getPemMaterialFromDir -> DEBU 022 Inspecting file /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/admincerts/Admin#example.com-cert.pem
2018-12-21 05:58:03.071 UTC [msp] getPemMaterialFromDir -> DEBU 023 Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/intermediatecerts
2018-12-21 05:58:03.075 UTC [msp] getMspConfig -> DEBU 024 Intermediate certs folder not found at [/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/intermediatecerts]. Skipping. [stat /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/intermediatecerts: no such file or directory]
2018-12-21 05:58:03.075 UTC [msp] getPemMaterialFromDir -> DEBU 025 Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/tlscacerts
2018-12-21 05:58:03.082 UTC [msp] getPemMaterialFromDir -> DEBU 026 Inspecting file /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/tlscacerts/tlsca.example.com-cert.pem
2018-12-21 05:58:03.085 UTC [msp] getPemMaterialFromDir -> DEBU 027 Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/tlsintermediatecerts
2018-12-21 05:58:03.086 UTC [msp] getMspConfig -> DEBU 028 TLS intermediate certs folder not found at [/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/tlsintermediatecerts]. Skipping. [stat /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/tlsintermediatecerts: no such file or directory]
2018-12-21 05:58:03.086 UTC [msp] getPemMaterialFromDir -> DEBU 029 Reading directory /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/crls
2018-12-21 05:58:03.088 UTC [msp] getMspConfig -> DEBU 02a crls folder not found at [/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/crls]. Skipping. [stat /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/crls: no such file or directory]
2018-12-21 05:58:03.089 UTC [msp] getMspConfig -> DEBU 02b MSP configuration file not found at [/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/config.yaml]: [stat /work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/config.yaml: no such file or directory]
2018-12-21 05:58:03.092 UTC [msp] newBccspMsp -> DEBU 02c Creating BCCSP-based MSP instance
2018-12-21 05:58:03.093 UTC [msp] New -> DEBU 02d Creating Cache-MSP instance
2018-12-21 05:58:03.093 UTC [msp] loadLocaMSP -> DEBU 02e Created new local MSP
2018-12-21 05:58:03.095 UTC [msp] Setup -> DEBU 02f Setting up MSP instance OrdererMSP
2018-12-21 05:58:03.096 UTC [msp/identity] newIdentity -> DEBU 030 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICMDCCAdagAwIBAgIRAJMJ50AFi4DVbfmy2tZwr8swCgYIKoZIzj0EAwIwaTEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt
cGxlLmNvbTAeFw0xODEyMjEwNTUxMDBaFw0yODEyMTgwNTUxMDBaMGkxCzAJBgNV
BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp
c2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEXMBUGA1UEAxMOY2EuZXhhbXBsZS5j
b20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQz7AEO7XsDC3ovSn4KoU9bMiu1
oZL6rYNG3IwlEiLIRTdF9YjkNadjxev769Nfe6zPBDQ7mxcjAeW96v3HD1Fqo18w
XTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMBAf8EBTAD
AQH/MCkGA1UdDgQiBCAX+J5Ayk0WYWPq+x/0rjbTs+m/RLvoqoGbt5slt3V8rDAK
BggqhkjOPQQDAgNIADBFAiEAqpwE5/Rkik0BKPgtbsiivijQ4pjwfjY5qOVZJeni
9G0CIAIdM34UbsWMnBXE31XGlMczGMqAmvu3keGDcEFOxgEb
-----END CERTIFICATE-----
2018-12-21 05:58:03.098 UTC [msp/identity] newIdentity -> DEBU 031 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICCjCCAbCgAwIBAgIQNvIOivt9quw48gGIQH5xUzAKBggqhkjOPQQDAjBpMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w
bGUuY29tMB4XDTE4MTIyMTA1NTEwMFoXDTI4MTIxODA1NTEwMFowVjELMAkGA1UE
BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz
Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI
zj0DAQcDQgAEHRUSNwy5tPgTCW8n75BDjAPImpFjGHP2LWHOJMC4m8ffZ7xbjvpo
oEcUTfp4K4K/TeEcmGeYQeM0scPEnOVtW6NNMEswDgYDVR0PAQH/BAQDAgeAMAwG
A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgF/ieQMpNFmFj6vsf9K4207Ppv0S76KqB
m7ebJbd1fKwwCgYIKoZIzj0EAwIDSAAwRQIhAMo50UA2es1ZPleNNXgXXA0Dun7c
CiUjOH7ZbvLt5SUrAiBlcwDp/lNcF2O8UfxposYdcignY2yfzbW/eXmnYMkj0Q==
-----END CERTIFICATE-----
2018-12-21 05:58:03.127 UTC [msp/identity] newIdentity -> DEBU 032 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICCjCCAbCgAwIBAgIQNvIOivt9quw48gGIQH5xUzAKBggqhkjOPQQDAjBpMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w
bGUuY29tMB4XDTE4MTIyMTA1NTEwMFoXDTI4MTIxODA1NTEwMFowVjELMAkGA1UE
BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz
Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI
zj0DAQcDQgAEHRUSNwy5tPgTCW8n75BDjAPImpFjGHP2LWHOJMC4m8ffZ7xbjvpo
oEcUTfp4K4K/TeEcmGeYQeM0scPEnOVtW6NNMEswDgYDVR0PAQH/BAQDAgeAMAwG
A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgF/ieQMpNFmFj6vsf9K4207Ppv0S76KqB
m7ebJbd1fKwwCgYIKoZIzj0EAwIDSAAwRQIhAMo50UA2es1ZPleNNXgXXA0Dun7c
CiUjOH7ZbvLt5SUrAiBlcwDp/lNcF2O8UfxposYdcignY2yfzbW/eXmnYMkj0Q==
-----END CERTIFICATE-----
2018-12-21 05:58:03.136 UTC [bccsp_sw] loadPrivateKey -> DEBU 033 Loading private key [f402b6fb650fc38fb9a4ae8b21abe98abbc3bf1786186fbc52a4fcf4e0cadeec] at [/work/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore/f402b6fb650fc38fb9a4ae8b21abe98abbc3bf1786186fbc52a4fcf4e0cadeec_sk]...
2018-12-21 05:58:03.143 UTC [msp/identity] newIdentity -> DEBU 034 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICCjCCAbCgAwIBAgIQNvIOivt9quw48gGIQH5xUzAKBggqhkjOPQQDAjBpMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w
bGUuY29tMB4XDTE4MTIyMTA1NTEwMFoXDTI4MTIxODA1NTEwMFowVjELMAkGA1UE
BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz
Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI
zj0DAQcDQgAEHRUSNwy5tPgTCW8n75BDjAPImpFjGHP2LWHOJMC4m8ffZ7xbjvpo
oEcUTfp4K4K/TeEcmGeYQeM0scPEnOVtW6NNMEswDgYDVR0PAQH/BAQDAgeAMAwG
A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgF/ieQMpNFmFj6vsf9K4207Ppv0S76KqB
m7ebJbd1fKwwCgYIKoZIzj0EAwIDSAAwRQIhAMo50UA2es1ZPleNNXgXXA0Dun7c
CiUjOH7ZbvLt5SUrAiBlcwDp/lNcF2O8UfxposYdcignY2yfzbW/eXmnYMkj0Q==
-----END CERTIFICATE-----
2018-12-21 05:58:03.143 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2028-12-18 05:51:00 +0000 UTC
2018-12-21 05:58:03.143 UTC [msp] Validate -> DEBU 036 MSP OrdererMSP validating identity
2018-12-21 05:58:03.144 UTC [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity
2018-12-21 05:58:03.152 UTC [grpc] DialContext -> DEBU 038 parsed scheme: ""
2018-12-21 05:58:03.155 UTC [grpc] DialContext -> DEBU 039 scheme "" not registered, fallback to default scheme
2018-12-21 05:58:03.156 UTC [grpc] watcher -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0 <nil>}]
2018-12-21 05:58:03.157 UTC [grpc] switchBalancer -> DEBU 03b ClientConn switching balancer to "pick_first"
2018-12-21 05:58:03.158 UTC [grpc] HandleSubConnStateChange -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4202a1a30, CONNECTING
2018-12-21 05:58:03.179 UTC [grpc] HandleSubConnStateChange -> DEBU 03d pickfirstBalancer: HandleSubConnStateChange: 0xc4202a1a30, READY
2018-12-21 05:58:03.183 UTC [channelCmd] InitCmdFactory -> INFO 03e Endorser and orderer connections initialized
2018-12-21 05:58:03.192 UTC [msp] GetDefaultSigningIdentity -> DEBU 03f Obtaining default signing identity
2018-12-21 05:58:03.193 UTC [msp] GetDefaultSigningIdentity -> DEBU 040 Obtaining default signing identity
2018-12-21 05:58:03.193 UTC [msp/identity] Sign -> DEBU 041 Sign: plaintext: 0A90060A0A4F7264657265724D535012...53616D706C65436F6E736F727469756D
2018-12-21 05:58:03.194 UTC [msp/identity] Sign -> DEBU 042 Sign: digest: 92BB1016BFDAC4274F151AA23E3A16A90E71F4D7BBEC266CDC566B398D1DC25B
2018-12-21 05:58:03.195 UTC [msp] GetDefaultSigningIdentity -> DEBU 043 Obtaining default signing identity
2018-12-21 05:58:03.195 UTC [msp] GetDefaultSigningIdentity -> DEBU 044 Obtaining default signing identity
2018-12-21 05:58:03.196 UTC [msp/identity] Sign -> DEBU 045 Sign: plaintext: 0AC7060A1508021A0608EB81F2E00522...060A56072CF60B8F5697E4ED67FD0157
2018-12-21 05:58:03.198 UTC [msp/identity] Sign -> DEBU 046 Sign: digest: F0D279F148EC9853919A36DED749B885E48E562B9450E6ED02F2D5B8CF42B47A
2018-12-21 05:58:03.211 UTC [grpc] DialContext -> DEBU 047 parsed scheme: ""
2018-12-21 05:58:03.212 UTC [grpc] DialContext -> DEBU 048 scheme "" not registered, fallback to default scheme
2018-12-21 05:58:03.212 UTC [grpc] watcher -> DEBU 049 ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0 <nil>}]
2018-12-21 05:58:03.212 UTC [grpc] switchBalancer -> DEBU 04a ClientConn switching balancer to "pick_first"
2018-12-21 05:58:03.212 UTC [grpc] HandleSubConnStateChange -> DEBU 04b pickfirstBalancer: HandleSubConnStateChange: 0xc420486a60, CONNECTING
2018-12-21 05:58:03.226 UTC [grpc] HandleSubConnStateChange -> DEBU 04c pickfirstBalancer: HandleSubConnStateChange: 0xc420486a60, READY
Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining
I use the following crypto-config.yaml
OrdererOrgs:
- Name: Orderer
Domain: example.com
Specs:
- Hostname: orderer
PeerOrgs:
- Name: Org1
Domain: org1.example.com
EnableNodeOUs: false
Template:
Count: 1
Users:
Count: 1
- Name: Org2
Domain: org2.example.com
EnableNodeOUs: false
Template:
Count: 1
Users:
Count: 1
and this configtx.yaml:
---
Organizations:
- &OrdererOrg
Name: OrdererOrg
ID: OrdererMSP
MSPDir: crypto-config/ordererOrganizations/example.com/msp
Policies:
Readers:
Type: Signature
Rule: "OR('OrdererMSP.member')"
Writers:
Type: Signature
Rule: "OR('OrdererMSP.member')"
Admins:
Type: Signature
Rule: "OR('OrdererMSP.admin')"
- &Org1
Name: Org1MSP
ID: Org1MSP
MSPDir: crypto-config/peerOrganizations/org1.example.com/msp
Policies:
Readers:
Type: Signature
Rule: "OR('Org1MSP.admin', 'Org1MSP.peer', 'Org1MSP.client')"
Writers:
Type: Signature
Rule: "OR('Org1MSP.admin', 'Org1MSP.client')"
Admins:
Type: Signature
Rule: "OR('Org1MSP.admin')"
AnchorPeers:
- Host: peer0.org1.example.com
Port: 7051
- &Org2
Name: Org2MSP
ID: Org2MSP
MSPDir: crypto-config/peerOrganizations/org2.example.com/msp
Policies:
Readers:
Type: Signature
Rule: "OR('Org2MSP.admin', 'Org2MSP.peer', 'Org2MSP.client')"
Writers:
Type: Signature
Rule: "OR('Org2MSP.admin', 'Org2MSP.client')"
Admins:
Type: Signature
Rule: "OR('Org2MSP.admin')"
AnchorPeers:
- Host: peer0.org2.example.com
Port: 7051
Capabilities:
Channel: &ChannelCapabilities
V1_3: true
Orderer: &OrdererCapabilities
V1_1: true
Application: &ApplicationCapabilities
V1_3: true
V1_2: false
V1_1: false
Application: &ApplicationDefaults
Organizations:
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Orderer: &OrdererDefaults
OrdererType: solo
Addresses:
- orderer.example.com:7050
BatchTimeout: 2s
BatchSize:
MaxMessageCount: 10
AbsoluteMaxBytes: 99 MB
PreferredMaxBytes: 512 KB
Kafka:
Brokers:
- 127.0.0.1:9092
Organizations:
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
BlockValidation:
Type: ImplicitMeta
Rule: "ANY Writers"
Channel: &ChannelDefaults
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
Capabilities:
<<: *ChannelCapabilities
Profiles:
TwoOrgsOrdererGenesis:
<<: *ChannelDefaults
Orderer:
<<: *OrdererDefaults
Organizations:
- *OrdererOrg
Capabilities:
<<: *OrdererCapabilities
Consortiums:
SampleConsortium:
Organizations:
- *Org1
- *Org2
TwoOrgsChannel:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org1
- *Org2
Capabilities:
<<: *ApplicationCapabilities
My docker-compose-cli.yaml file:
version: '2'
volumes:
orderer.example.com:
peer0.org1.example.com:
peer1.org1.example.com:
peer0.org2.example.com:
peer1.org2.example.com:
networks:
byfn:
services:
orderer.example.com:
extends:
file: base/docker-compose-base.yaml
service: orderer.example.com
container_name: orderer.example.com
networks:
- byfn
peer0.org1.example.com:
container_name: peer0.org1.example.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org1.example.com
networks:
- byfn
peer1.org1.example.com:
container_name: peer1.org1.example.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org1.example.com
networks:
- byfn
peer0.org2.example.com:
container_name: peer0.org2.example.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org2.example.com
networks:
- byfn
peer1.org2.example.com:
container_name: peer1.org2.example.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org2.example.com
networks:
- byfn
cli:
container_name: cli
image: hyperledger/fabric-tools:$IMAGE_TAG
tty: true
stdin_open: true
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_LOGGING_LEVEL=DEBUG
#- CORE_LOGGING_LEVEL=INFO
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/work/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/work/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/work/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
- CORE_PEER_MSPCONFIGPATH=/work/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: /bin/bash
volumes:
- ./channel-artifacts:/work/channel-artifacts
- ./crypto-config:/work/crypto-config
- ./scripts:/work/
depends_on:
- orderer.example.com
- peer0.org1.example.com
- peer1.org1.example.com
- peer0.org2.example.com
- peer1.org2.example.com
networks:
- byfn
Someone faced a similiar problem?
Update
Starting first to orderer service and then peer0 gives the following log:
docker-compose -f docker-compose-cli.yaml up peer0.org1.example.com
Starting peer0.org1.example.com ... done
Attaching to peer0.org1.example.com
peer0.org1.example.com | 2018-12-21 07:22:09.355 UTC [nodeCmd] serve -> INFO 001 Starting peer:
peer0.org1.example.com | Version: 1.3.0
peer0.org1.example.com | Commit SHA: ab0a67a
peer0.org1.example.com | Go version: go1.10.4
peer0.org1.example.com | OS/Arch: linux/amd64
peer0.org1.example.com | Experimental features: false
peer0.org1.example.com | Chaincode:
peer0.org1.example.com | Base Image Version: 0.4.13
peer0.org1.example.com | Base Docker Namespace: hyperledger
peer0.org1.example.com | Base Docker Label: org.hyperledger.fabric
peer0.org1.example.com | Docker Namespace: hyperledger
peer0.org1.example.com | 2018-12-21 07:22:09.355 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
peer0.org1.example.com | 2018-12-21 07:22:09.355 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
peer0.org1.example.com | 2018-12-21 07:22:09.466 UTC [kvledger] NewProvider -> INFO 004 ledger provider Initialized
peer0.org1.example.com | 2018-12-21 07:22:09.485 UTC [ledgermgmt] initialize -> INFO 005 ledger mgmt initialized
peer0.org1.example.com | 2018-12-21 07:22:09.485 UTC [peer] func1 -> INFO 006 Auto-detected peer address: 172.26.0.3:7051
peer0.org1.example.com | 2018-12-21 07:22:09.486 UTC [peer] func1 -> INFO 007 Returning peer0.org1.example.com:7051
peer0.org1.example.com | 2018-12-21 07:22:09.486 UTC [peer] func1 -> INFO 008 Auto-detected peer address: 172.26.0.3:7051
peer0.org1.example.com | 2018-12-21 07:22:09.486 UTC [peer] func1 -> INFO 009 Returning peer0.org1.example.com:7051
peer0.org1.example.com | 2018-12-21 07:22:09.487 UTC [nodeCmd] serve -> INFO 00a Starting peer with TLS enabled
peer0.org1.example.com | 2018-12-21 07:22:09.487 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00b Entering computeChaincodeEndpoint with peerHostname: peer0.org1.example.com
peer0.org1.example.com | 2018-12-21 07:22:09.488 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00c Exit with ccEndpoint: peer0.org1.example.com:7052
peer0.org1.example.com | 2018-12-21 07:22:09.488 UTC [nodeCmd] createChaincodeServer -> WARN 00d peer.chaincodeListenAddress is not set, using peer0.org1.example.com:7052
peer0.org1.example.com | 2018-12-21 07:22:09.490 UTC [sccapi] registerSysCC -> INFO 00e system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
peer0.org1.example.com | 2018-12-21 07:22:09.490 UTC [sccapi] registerSysCC -> INFO 00f system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
peer0.org1.example.com | 2018-12-21 07:22:09.490 UTC [sccapi] registerSysCC -> INFO 010 system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered
peer0.org1.example.com | 2018-12-21 07:22:09.490 UTC [sccapi] registerSysCC -> INFO 011 system chaincode +lifecycle(github.com/hyperledger/fabric/core/chaincode/lifecycle) registered
peer0.org1.example.com | 2018-12-21 07:22:09.492 UTC [gossip/service] func1 -> INFO 012 Initialize gossip with endpoint peer0.org1.example.com:7051 and bootstrap set [peer1.org1.example.com:7051]
peer0.org1.example.com | 2018-12-21 07:22:09.494 UTC [gossip/gossip] NewGossipService -> INFO 013 Creating gossip service with self membership of {peer0.org1.example.com:7051 [] [132 133 191 71 241 248 154 220 155 96 230 124 237 186 150 131 247 243 69 99 70 223 16 116 157 162 26 216 63 117 58 153] peer0.org1.example.com:7051 <nil> <nil>}
peer0.org1.example.com | 2018-12-21 07:22:09.495 UTC [gossip/gossip] start -> INFO 014 Gossip instance peer0.org1.example.com:7051 started
peer0.org1.example.com | 2018-12-21 07:22:09.495 UTC [sccapi] deploySysCC -> INFO 015 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
peer0.org1.example.com | fatal error: unexpected signal during runtime execution
peer0.org1.example.com | [signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7fd604040259]
peer0.org1.example.com |
peer0.org1.example.com | runtime stack:
peer0.org1.example.com | runtime.throw(0x111434c, 0x2a)
peer0.org1.example.com | /opt/go/src/runtime/panic.go:616 +0x81
peer0.org1.example.com | runtime.sigpanic()
peer0.org1.example.com | /opt/go/src/runtime/signal_unix.go:372 +0x28e
This is kind of a general error which occurs in fabric. I remember getting BAD Request
error on subsequent execution of peer channel create command when the first one took a bit longer and the request got timed out. However, in this case, the error says that the channel create request is not able to satisfy the implicit policy - i.e., doesn't have appropriate permissions to execute the command. Try setting the msp path in the peer to admin folder, using export CORE_PEER_MSPCONFIGPATH=<path to admin msp>, such that peer signs the channel create command with admincerts instead of peer certificates. Here is an useful link explaining the issue in detail - peer channel creation fails in Hyperledger Fabric
Checked each container log files, paths were incorrect - adjusting peer template to 2 fixed it

Resources