hyperledger-labs / minifabric

Do fabric network the right and easy way.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chaincode on multi-org error

LeoGCRocha opened this issue · comments

Good afternoon, I'm carrying out studies in the minifabric tool and I'm having some problems. In the current environment I created a network with two networks, one with 2 organizations each with 2 peers and another with 1 organization with 2 peers. I used the command orgjoin, and nodeimport,join to make both part of the same channel. However, I'm having trouble installing chaincode. Initially, the site1 network has a chaincode that was created in the command: "minifab up -e 7000 -n chaincode1 -o site1.org.br", so I can install chaincode1 on site 2 that joined later. Despite this, I tried to do the reverse operation now, on site2 I tried to install chaincode2 in its definition with the commands:

site2

minifab install,approve,discover -n chaincode2 -v 0.1
Unfortunately discover is generating an empty "vars/discover/mychannel/chaincode2_endorsers.json". Even so, I tried to continue the process by approving the chaincode on site1.

site1

minifab approve,discover,commit -n chaincode2 -v 0.1 and I got the following error:

image

Is this a minifabric limitation? Do I need chaincodes to be defined and installed initially on the first site so others can join?

### create first university
####
## site 1
#### 
minifab up -e 7000 -n chaincode1 -v 0.1 -p '' -o site1.org.br
### site 2
minifab netup -e 7050 -o site2.org.br
cp vars/JoinRequest_site2-org-br.json ../site1/vars/NewOrgJoinRequest.json
#### site 1
minifab orgjoin
cp vars/profiles/endpoints.yaml ../site2/vars/endpoints.yaml
#### site 2
minifab nodeimport,join -c mychannel
# minifab profilegen
#### Install chaincode on site2
minifab install,approve -n chaincode1 -v 0.1 -p ''
#### site 1
minifab approve,discover,commit
# Works until here
### site 2
minifab install,approve,discover -n chaincode2 -v 0.1 -p ''
# Generate a empty file
#### site 1
minifab approve,discover,commit
# Layout errors

@litong01 Do you have any suggestions for this error? I would greatly appreciate it.