Hyperledger fabric 无法生成医嘱程序生成块
我试图用hyperledger结构构建一个网络,但每次它都显示一个错误 我还使用docker images 1.0.3Hyperledger fabric 无法生成医嘱程序生成块,hyperledger-fabric,blockchain,hyperledger,Hyperledger Fabric,Blockchain,Hyperledger,我试图用hyperledger结构构建一个网络,但每次它都显示一个错误 我还使用docker images 1.0.3 npm version: 5.6.0 nodejs version: v4.2.6 Client: Version: 18.05.0-ce API version: 1.37 Go version: go1.9.5 Git commit: f150324 Built: Wed May 9 22:16:25 2018 O
npm version: 5.6.0
nodejs version: v4.2.6
Client:
Version: 18.05.0-ce
API version: 1.37
Go version: go1.9.5
Git commit: f150324
Built: Wed May 9 22:16:25 2018
OS/Arch: linux/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.05.0-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: f150324
Built: Wed May 9 22:14:32 2018
OS/Arch: linux/amd64
Experimental: false
docker-compose version 1.16.0-rc1, build 9bea70a
docker-py version: 2.5.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t 3 May 2016
Generating certs and genesis block for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] y
proceeding ...
/home/bashayer/fabric-samples/first-network/../bin/cryptogen
##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
+ cryptogen generate --config=./crypto-config.yaml
org1.example.com
org2.example.com
+ res=0
+ set +x
/home/bashayer/fabric-samples/first-network/../bin/configtxgen
##########################################################
######### Generating Orderer Genesis block ##############
##########################################################
+ configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
2018-07-06 16:29:48.898 +03 [common/tools/configtxgen] main -> WARN 001 Omitting the channel ID for configtxgen is deprecated. Explicitly passing the channel ID will be required in the future, defaulting to 'testchainid'.
2018-07-06 16:29:48.898 +03 [common/tools/configtxgen] main -> INFO 002 Loading configuration
2018-07-06 16:29:48.906 +03 [common/tools/configtxgen/encoder] NewChannelGroup -> WARN 003 Default policy emission is deprecated, please include policy specificiations for the channel group in configtx.yaml
2018-07-06 16:29:48.906 +03 [common/tools/configtxgen/encoder] NewOrdererGroup -> WARN 004 Default policy emission is deprecated, please include policy specificiations for the orderer group in configtx.yaml
2018-07-06 16:29:48.906 +03 [common/tools/configtxgen/encoder] NewOrdererOrgGroup -> WARN 005 Default policy emission is deprecated, please include policy specificiations for the orderer org group OrdererOrg in configtx.yaml
2018-07-06 16:29:48.907 +03 [msp] getMspConfig -> INFO 006 Loading NodeOUs
2018-07-06 16:29:48.907 +03 [common/tools/configtxgen/encoder] NewOrdererOrgGroup -> WARN 007 Default policy emission is deprecated, please include policy specificiations for the orderer org group Org1MSP in configtx.yaml
2018-07-06 16:29:48.907 +03 [msp] getMspConfig -> INFO 008 Loading NodeOUs
2018-07-06 16:29:48.907 +03 [common/tools/configtxgen/encoder] NewOrdererOrgGroup -> WARN 009 Default policy emission is deprecated, please include policy specificiations for the orderer org group Org2MSP in configtx.yaml
2018-07-06 16:29:48.907 +03 [common/tools/configtxgen] doOutputBlock -> INFO 00a Generating genesis block
2018-07-06 16:29:48.908 +03 [common/tools/configtxgen] doOutputBlock -> INFO 00b Writing genesis block
2018-07-06 16:29:48.908 +03 [common/tools/configtxgen] main -> CRIT 00c Error on outputBlock: Error writing genesis block: open ./channel-artifacts/genesis.block: is a directory
+ res=1
+ set +x
Failed to generate orderer genesis block...
出现此问题是因为系统在通道工件中找不到任何genesys.block 确保已在指定位置生成genesys.block文件。
我希望它能有所帮助。在我们的例子中,是缺少的文件夹:./channel artifacts/ .block文件无论如何都是自动创建的在我的情况下(windows 10)在缺少的文件夹中生成了genesis块:
$./byfn.sh down
$../bin/cryptogen generate --config=./crypto-config.yaml
Org1.example.com
Org2.example.com
$../bin/configtxgen --profile TwoOrgsOrdererGenesis –outputBlock./channel-
artifacts/genesis.block
$./byfn.sh generate
$./byfn.sh up
我也犯了类似的错误
____ _____ _ ____ _____
/ ___| |_ _| / \ | _ \ |_ _|
\___ \ | | / _ \ | |_) | | |
___) | | | / ___ \ | _ < | |
|____/ |_| /_/ \_\ |_| \_\ |_|
Build your first network (BYFN) end-to-end test
Channel name : mychannel
Creating channel...
+ peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+ res=1
+ set +x
Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp: lookup orderer.example.com on 127.0.0.11:53: no such host"
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed
\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
/ ___| |_ _| / \ | _ \ |_ _|
\___ \ | | / _ \ | |_) | | |
___) | | | / ___ \ | _ < | |
|____/ |_| /_/ \_\ |_| \_\ |_|
构建您的第一个网络(BYFN)端到端测试
频道名称:mychannel
正在创建频道。。。
+对等通道创建-o order.example.com:7050-c mychannel-f./channel artifacts/channel.tx--tls true--cafile/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/orderorganizations/example.com/orders/order.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
+res=1
+集合+x
错误:未能创建交付客户端:订购者客户端未能连接到订购者。example.com:7050:未能创建新连接:连接错误:desc=“传输:拨号时出错:拨打tcp:lookup orderer.example.com(127.0.0.11:53):无此类主机”
!!!!!!!!!!!!!!! 频道创建失败!!!!!!!!!!!!!!!!
=========错误!!!无法执行端2端方案===========
错误!!!!测试失败
只需在
结构样本/first network/
中运行/byfn.sh up
即可解决此问题。使用此分支回购版本-1.4:
$git clone——分支版本-1.4https://github.com/hyperledger/fabric-samples.git
无论如何,第一个网络教程已被弃用
然后从10:00开始尝试此视频:尝试删除/channel artifacts/genesis.block目录并从头开始重新启动。似乎不存在
频道artifacts
您可以创建并尝试吗?