minifabric
minifabric copied to clipboard
minifab command fails with latest version of Fabric: 2.4.3
I used the command:
./minifab up -i 2.4.3
The startup sequence failed pretty early on:
Using default spec file
Minifab Execution Context:
FABRIC_RELEASE=2.4.3
CHANNEL_NAME=mychannel
PEER_DATABASE_TYPE=golevel
CHAINCODE_LANGUAGE=go
CHAINCODE_NAME=simple
CHAINCODE_VERSION=1.0
CHAINCODE_INIT_REQUIRED=true
CHAINCODE_PARAMETERS="init","a","200","b","300"
CHAINCODE_PRIVATE=false
CHAINCODE_POLICY=
TRANSIENT_DATA=
BLOCK_NUMBER=newest
EXPOSE_ENDPOINTS=false
CURRENT_ORG=org0.example.com
HOST_ADDRESSES=192.168.1.199,192.168.1.218
WORKING_DIRECTORY: /Users/jjs/mywork
.......
# Preparing for the following operations: *********************
verify options, download images, generate certificates, start network, network status, channel create, channel join, anchor update, profile generation, cc install, cc approve, cc commit, cc initialize, discover
.......
# Running operation: ******************************************
verify options
.
# Running operation: ******************************************
download images
............
# Running operation: ******************************************
generate certificates
..
# Running operation: ******************************************
start network
....................
# Running operation: ******************************************
network status
...
# Current Minifabric image ID and created at date time ********
bca4eee8a45f 2022-02-17 21:29:10 +0000 UTC
.....
# Docker node status ******************************************
mysite : Up 9 seconds
ca1.org1.example.com : Up 11 seconds
ca1.org0.example.com : Up 13 seconds
orderer3.example.com : Up 15 seconds
orderer2.example.com : Up 17 seconds
orderer1.example.com : Up 19 seconds
peer2.org1.example.com : Up 21 seconds
peer1.org1.example.com : Up 23 seconds
peer2.org0.example.com : Up 24 seconds
peer1.org0.example.com : Up 24 seconds
# Fabric network peer and orderer node health status **********
peer1.org0.example.com "OK"
peer2.org0.example.com "OK"
peer1.org1.example.com "OK"
peer2.org1.example.com "OK"
orderer1.example.com "OK"
orderer2.example.com "OK"
orderer3.example.com "OK"
Network Status: 100%
# Running operation: ******************************************
channel create
.....
# Run the channel creation script on cli container ************
non-zero return code
2022-03-09 00:05:12.222 UTC 0001 INFO [common.tools.configtxgen] main -> Loading configuration
2022-03-09 00:05:12.267 UTC 0002 INFO [common.tools.configtxgen.localconfig] Load -> Loaded configuration: /vars/configtx.yaml
2022-03-09 00:05:12.267 UTC 0003 INFO [common.tools.configtxgen] doOutputChannelCreateTx -> Generating new channel configtx
2022-03-09 00:05:12.565 UTC 0004 INFO [common.tools.configtxgen] doOutputChannelCreateTx -> Writing new channel tx
2022-03-09 00:05:12.764 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized
Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'mychannel': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application be at version 0, but it is currently at version 1
# STATS *******************************************************
minifab: ok=89 failed=1
The version of the Fabric that used by default is 2.3.0 and this starts up cleanly.
Any ideas or a work-around -- e.g. how to change Channel/Application version that is used?
Well it seems that I needed to do a cleanup
option with minifab BEFORE I ran the up
option with the i 2.4.3
version specified. Doing the down
option was NOT enough. If someone can confirm this as a basic user error, I will close the issue.
@jsolderitsch jim, down is basically kills the containers (nodes), it will not remove any data such as ledger, so when you try to bring things up again, it should fail using different version. This is actually the expected behavior, cleanup removes everything. I think you can close this issue.
Thanks Tong for the quick reply. I will close the issue as user error.
Well I am re-opening this issue because while I can use minifab up -i 2.4.3
to startup Minifabric successfully, I can't use it again after I run minifab down
. But once again, maybe doing an up
, and then a down
, and then an up
again is not normal user behavior.
Should minifab restart
be used instead?
Also, this command fails in the CC install step: ./minifab up -i 2.4.3 -l node -e true
Here is the output: non-zero return code Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "+ INPUT_DIR=/chaincode/input
- OUTPUT_DIR=/chaincode/output
- cp -R /chaincode/input/src/. /chaincode/output
- cd /chaincode/output
- '[' -f package-lock.json -o -f npm-shrinkwrap.json ]
- npm install --production
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^8.17.0', npm: '^6.13.4' },
npm WARN EBADENGINE current: { node: 'v16.14.2', npm: '8.5.0' }
npm WARN EBADENGINE }
npm notice
npm notice New minor version of npm available! 8.5.0 -> 8.12.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.12.1
npm notice Run
npm install -g [email protected]
to update! npm notice npm ERR! code 1 npm ERR! path /chaincode/output/node_modules/fabric-shim/node_modules/grpc npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using [email protected] npm ERR! gyp info using [email protected] | linux | x64 npm ERR! gyp info find Python using Python version 3.9.7 found at "/usr/bin/python3" npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz npm ERR! gyp http 200 https://unofficial-builds.nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v16.14.2/SHASUMS256.txt npm ERR! gyp http 200 https://unofficial-builds.nodejs.org/download/release/v16.14.2/SHASUMS256.txt npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/chaincode/output/node_modules/fabric-shim/node_modules/grpc/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/root/.cache/node-gyp/16.14.2/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/16.14.2', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.14.2/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/chaincode/output/node_modules/fabric-shim/node_modules/grpc', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error:gyp
failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Linux 5.10.104-linuxkit npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /chaincode/output/node_modules/fabric-shim/node_modules/grpc npm ERR! gyp ERR! node -v v16.14.2 npm ERR! gyp ERR! node-gyp -v v8.4.1 npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-06-06T14_30_21_173Z-debug-0.log "
STATS *******************************************************
minifab: ok=29 failed=1