Hyperledger Fabric версия 1.4, раздел учебников, Написание вашего первого приложения, ./startFabric.sh javascript - PullRequest
0 голосов
/ 28 сентября 2019

Я выполнил все шаги и предварительные требования в документации, но застрял в этой команде ./startFabric.sh javascript https://hyperledger -fabric.readthedocs.io / en / release-1.4 / write_first_app.html Может кто-нибудь помочь, пожалуйста?

Я пытался использовать более старую версию, 1.1, и она работала, но мне любопытно, почему это не работает, я попытался создать папку channel-artifacts и внутри нее файл genesis.block, но онне помогло

Ниже приведен вывод в командной строке при запуске команды

$ ./startFabric.sh javascript
Stopping for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds
proceeding ...
WARNING: The BYFN_CA1_PRIVATE_KEY variable is not set. Defaulting to a blank string.
WARNING: The BYFN_CA2_PRIVATE_KEY variable is not set. Defaulting to a blank string.
Removing network net_byfn
WARNING: Network net_byfn not found.
Removing volume net_orderer.example.com
WARNING: Volume net_orderer.example.com not found.
Removing volume net_peer0.org1.example.com
WARNING: Volume net_peer0.org1.example.com not found.
Removing volume net_peer1.org1.example.com
WARNING: Volume net_peer1.org1.example.com not found.
Removing volume net_peer0.org2.example.com
WARNING: Volume net_peer0.org2.example.com not found.
Removing volume net_peer1.org2.example.com
WARNING: Volume net_peer1.org2.example.com not found.
Removing volume net_orderer2.example.com
WARNING: Volume net_orderer2.example.com not found.
Removing volume net_orderer3.example.com
WARNING: Volume net_orderer3.example.com not found.
Removing volume net_orderer4.example.com
WARNING: Volume net_orderer4.example.com not found.
Removing volume net_orderer5.example.com
WARNING: Volume net_orderer5.example.com not found.
Removing volume net_peer0.org3.example.com
WARNING: Volume net_peer0.org3.example.com not found.
Removing volume net_peer1.org3.example.com
WARNING: Volume net_peer1.org3.example.com not found.
---- No containers available for deletion ----
---- No images available for deletion ----

Starting for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds and using database 'couchdb'
proceeding ...
LOCAL_VERSION=1.4.3
DOCKER_IMAGE_VERSION=1.4.3
/c/Users/Marina/Test/fabric-samples/bin/cryptogen

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
+ cryptogen generate --config=./crypto-config.yaml
org1.example.com
org2.example.com
+ res=0
+ set +x

Generate CCP files for Org1 and Org2
/c/Users/Marina/Test/fabric-samples/bin/configtxgen
##########################################################
#########  Generating Orderer Genesis block ##############
##########################################################
CONSENSUS_TYPE=solo
+ '[' solo == solo ']'
+ configtxgen -profile TwoOrgsOrdererGenesis -channelID byfn-sys-channel -outputBlock ./channel-artifacts/genesis.block
2019-09-28 01:46:41.269 EET [common.tools.configtxgen] main -> INFO 001 Loading configuration
2019-09-28 01:46:41.271 EET [common.tools.configtxgen.localconfig] Load -> PANI 002 Error reading configuration:  Unsupported Config Type ""
2019-09-28 01:46:41.276 EET [common.tools.configtxgen] func1 -> PANI 003 Error reading configuration:  Unsupported Config Type ""
panic: Error reading configuration:  Unsupported Config Type "" [recovered]
        panic: Error reading configuration:  Unsupported Config Type ""

goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0000e9ce0, 0x0, 0x0, 0x0)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x51c
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000006190, 0xc000095804, 0xc00002c900, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xfd
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc000006190, 0xc00002c900, 0x38, 0x0, 0x0, 0x0)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x80
github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc000006198, 0xc000095908, 0x1, 0x1)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x7c
main.main.func1()
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:260 +0x1b0
panic(0xa3c820, 0xc000063f70)
        /opt/go/go1.11.5.linux.amd64/src/runtime/panic.go:513 +0x1c7
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0000e9ce0, 0x0, 0x0, 0x0)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x51c
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000006170, 0xc000095c04, 0xc00002c800, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xfd
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc000006170, 0xc00002c800, 0x38, 0x0, 0x0, 0x0)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x80
github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc000006178, 0xc000095d88, 0x2, 0x2)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x7c
github.com/hyperledger/fabric/common/tools/configtxgen/localconfig.Load(0xc00006c0c0, 0x15, 0x0, 0x0, 0x0, 0xc000422380)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:276 +0x426
main.main()
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:271 +0xce7
+ res=2
+ set +x
Failed to generate orderer genesis block...

1 Ответ

0 голосов
/ 28 сентября 2019

Попробуйте определить переменную среды с именем FABRIC_CFG_PATH и установить ее в папку, содержащую configtx.yaml (у вас должна быть такая папка где-то в этом примере)

...