chainHero / heroes-service

Short tutorial to build a blockchain application in Go with Hyperledger Fabric
https://chainhero.io/2018/06/tutorial-build-blockchain-app-v1-1-0/
Apache License 2.0
275 stars 146 forks source link

Channel isn't being created on other orgs is multi org network #27

Open nithinkashyapn opened 6 years ago

nithinkashyapn commented 6 years ago

I was trying to implement a multi organization network with two orgs using heroes-service as a boilerplate and i am getting the following error.

[fabsdk/fab] 2018/08/30 10:20:00 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = access denied: channel [mychannel] creator org [org1.example.com]]
[fabsdk/fab] 2018/08/30 10:20:00 UTC - peer.(*peerEndorser).sendProposal -> ERRO process proposal failed [rpc error: code = Unknown desc = access denied: channel [mychannel] creator org [org1.example.com]]
Unable to install and instantiate the chaincode: failed to instantiate the chaincode: sending deploy transaction proposal failed: Multiple errors occurred: 
Transaction processing for endorser [localhost:8051]: gRPC Transport Status Code: (2) Unknown. Description: access denied: channel [mychannel] creator org [org1.example.com]
Transaction processing for endorser [localhost:8056]: gRPC Transport Status Code: (2) Unknown. Description: access denied: channel [mychannel] creator org [org1.example.com]

Upon opening the peer logs this is the error being reflected

2018-08-30 10:20:00.940 UTC [protoutils] ValidateProposalMessage -> DEBU 10f ValidateProposalMessage starts for signed proposal 0xc42224ab40
2018-08-30 10:20:00.940 UTC [protoutils] validateChannelHeader -> DEBU 110 validateChannelHeader info: header type 3
2018-08-30 10:20:00.940 UTC [protoutils] checkSignatureFromCreator -> DEBU 111 begin
2018-08-30 10:20:00.940 UTC [protoutils] ValidateProposalMessage -> WARN 112 channel [mychannel]: MSP error: channel doesn't exist
2018-08-30 10:20:00.941 UTC [endorser] ProcessProposal -> DEBU 113 Exit: request from 172.31.0.1:53598
2018-08-30 10:20:02.488 UTC [gossip/discovery] periodicalSendAlive -> DEBU 114 Sleeping 5s
2018-08-30 10:20:07.491 UTC [gossip/discovery] periodicalSendAlive -> DEBU 115 Sleeping 5s

The error is being shown by

ccPolicy := cauthdsl.SignedByAnyMember([]string{"org1.example.com"})
resp, err := setup.admin.InstantiateCC(setup.ChannelID, resmgmt.InstantiateCCRequest{Name: setup.ChainCodeID, Path: setup.ChaincodeGoPath, Version: "0", Args: [][]byte{[]byte("init")}, Policy: ccPolicy})

I have hosted the code here GitHub Repository!!.

Can you let me know what I am doing wrong?

Hezaveh commented 5 years ago

@nithinkashyapn did you solve this issue?