fabric-samples icon indicating copy to clipboard operation
fabric-samples copied to clipboard

osnadmin: command not found Channel creation failed

Open jaideepkaur opened this issue 3 years ago • 2 comments

./network.sh createChannel Using docker and docker-compose Creating channel 'mychannel'. If network is not up, starting nodes with CLI timeout of '5' tries and CLI delay of '3' seconds and using database 'leveldb Network Running Already Using docker and docker-compose Generating channel genesis block 'mychannel.block' /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/../bin/configtxgen

  • configtxgen -profile TwoOrgsApplicationGenesis -outputBlock ./channel-artifacts/mychannel.block -channelID mychannel 2022-07-13 10:57:45.161 IST [common.tools.configtxgen] main -> INFO 001 Loading configuration 2022-07-13 10:57:45.170 IST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 002 orderer type: etcdraft 2022-07-13 10:57:45.170 IST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 003 Orderer.EtcdRaft.Options unset, setting to tick_interval:"500ms" election_tick:10 heartbeat_tick:1 max_inflight_blocks:5 snapshot_interval_size:16777216 2022-07-13 10:57:45.170 IST [common.tools.configtxgen.localconfig] Load -> INFO 004 Loaded configuration: /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/configtx/configtx.yaml 2022-07-13 10:57:45.173 IST [common.tools.configtxgen] doOutputBlock -> INFO 005 Generating genesis block 2022-07-13 10:57:45.174 IST [common.tools.configtxgen] doOutputBlock -> WARN 006 Genesis block does not contain a consortiums group definition. This block cannot be used for orderer bootstrap. 2022-07-13 10:57:45.174 IST [common.tools.configtxgen] doOutputBlock -> INFO 007 Writing genesis block
  • res=0 Creating channel mychannel Using organization 1
  • osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:7053 --ca-file /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem --client-cert /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt --client-key /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key
  • res=127
  • osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:7053 --ca-file /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem --client-cert /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt --client-key /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key
  • res=127
  • osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:7053 --ca-file /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem --client-cert /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt --client-key /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key
  • res=127
  • osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:7053 --ca-file /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem --client-cert /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt --client-key /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key
  • res=127 scripts/createChannel.sh: line 44: osnadmin: command not found Channel creation failed jaideep@DESKTOP-4NDC02C:~/fabric/src/github.com/jaideep/fabric-samples/test-network$ ./network.sh createChannel Using docker and docker-compose Creating channel 'mychannel'. If network is not up, starting nodes with CLI timeout of '5' tries and CLI delay of '3' seconds and using database 'leveldb Network Running Already Generating channel create transaction 'mychannel.tx'
  • configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/mychannel.tx -channelID mychannel 2022-07-13 11:00:45.044 IST [common.tools.configtxgen] main -> INFO 001 Loading configuration 2022-07-13 11:00:45.055 IST [common.tools.configtxgen.localconfig] Load -> PANI 002 Could not find profile: TwoOrgsChannel 2022-07-13 11:00:45.055 IST [common.tools.configtxgen] func1 -> ERRO 003 Could not find profile: TwoOrgsChannel. Please make sure that FABRIC_CFG_PATH or -configPath is set to a path which contains configtx.yaml with the specified profile
  • res=1 Failed to generate channel configuration transaction... jaideep@DESKTOP-4NDC02C:~/fabric/src/github.com/jaideep/fabric-samples/test-network$ ./network.sh createChannel Using docker and docker-compose Creating channel 'mychannel'. If network is not up, starting nodes with CLI timeout of '5' tries and CLI delay of '3' seconds and using database 'leveldb Network Running Already Using docker and docker-compose Generating channel genesis block 'mychannel.block' /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/../bin/configtxgen
  • configtxgen -profile TwoOrgsApplicationGenesis -outputBlock ./channel-artifacts/mychannel.block -channelID mychannel 2022-07-13 11:02:07.489 IST [common.tools.configtxgen] main -> INFO 001 Loading configuration 2022-07-13 11:02:07.499 IST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 002 orderer type: etcdraft 2022-07-13 11:02:07.499 IST [common.tools.configtxgen.localconfig] completeInitialization -> INFO 003 Orderer.EtcdRaft.Options unset, setting to tick_interval:"500ms" election_tick:10 heartbeat_tick:1 max_inflight_blocks:5 snapshot_interval_size:16777216 2022-07-13 11:02:07.499 IST [common.tools.configtxgen.localconfig] Load -> INFO 004 Loaded configuration: /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/configtx/configtx.yaml 2022-07-13 11:02:07.501 IST [common.tools.configtxgen] doOutputBlock -> INFO 005 Generating genesis block 2022-07-13 11:02:07.501 IST [common.tools.configtxgen] doOutputBlock -> WARN 006 Genesis block does not contain a consortiums group definition. This block cannot be used for orderer bootstrap. 2022-07-13 11:02:07.502 IST [common.tools.configtxgen] doOutputBlock -> INFO 007 Writing genesis block
  • res=0 Creating channel mychannel Using organization 1
  • osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:7053 --ca-file /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem --client-cert /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt --client-key /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key
  • res=127
  • osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:7053 --ca-file /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem --client-cert /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt --client-key /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key
  • res=127
  • osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:7053 --ca-file /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem --client-cert /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt --client-key /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key
  • res=127
  • osnadmin channel join --channelID mychannel --config-block ./channel-artifacts/mychannel.block -o localhost:7053 --ca-file /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem --client-cert /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt --client-key /home/jaideep/fabric/src/github.com/jaideep/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key
  • res=127 scripts/createChannel.sh: line 44: osnadmin: command not found Channel creation failed

jaideepkaur avatar Jul 13 '22 05:07 jaideepkaur

Try this command that change the version of your image and resolve the issue curl -sSL https://bit.ly/2ysbOFE | bash -s curl -sSL https://bit.ly/2ysbOFE | bash -s -- 2.3.3 1.5.2 curl -sSL https://bit.ly/2ysbOFE | bash -s -- -h export PATH=/bin:$PATH

devstacktanya avatar Jul 13 '22 11:07 devstacktanya

This error means that you need to fix this in the configtx file and add the consortium group at the bottom of the file:

2022-07-13 10:57:45.174 IST [common.tools.configtxgen] doOutputBlock -> WARN 006 Genesis block does not contain a consortiums group definition. This block cannot be used for orderer bootstrap.

Then take your network all the way down and try again.

hope this helps, Chris

On Jul 13, 2022, at 5:24 AM, devstacktanya @.***> wrote:

 same issue do you find any way to solve this?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

denali49 avatar Oct 11 '22 09:10 denali49

Comment above suggest that there is a solution to the problem observed, and this issue has been quiet for a long time. Certainly I can bring up and create a channel in the test-network without error. I will assume it is resolved and close. Please add a comment if you still see problems and we can reopen.

bestbeforetoday avatar Feb 20 '25 23:02 bestbeforetoday