无法执行端-2-端方案超级账本结构第一个网络



我已经克隆了结构样本项目,我正在运行第一个网络模块。我已经成功地生成了加密材料

$`./byfn generate 

'当我尝试使用以下命令启动网络时

$ ./byfn up

尽管删除了容器和网络,但错误仍会重复出现。

正在创建容器,我遇到了以下问题,

proposal failed (err: rpc error: code = Unavailable desc = transport is closing)

总日志如下所示

Creating peer1.org2.example.com ... done
Creating peer0.org1.example.com ... done
Creating orderer.example.com    ... done
Creating peer0.org2.example.com ... done
Creating peer1.org1.example.com ... done
Creating cli                    ... done
____    _____      _      ____    _____ 
/ ___|  |_   _|    /     |  _   |_   _|
___     | |     / _    | |_) |   | |  
___) |   | |    / ___   |  _ <    | |  
|____/    |_|   /_/   _ |_| _   |_|  
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=0
+ set +x
2018-10-04 09:52:41.909 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-10-04 09:52:42.241 UTC [channelCmd] InitCmdFactory -> INFO 002 Endorser and orderer connections initialized
2018-10-04 09:52:42.467 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-10-04 09:52:42.694 UTC [main] main -> INFO 004 Exiting.....
===================== Channel 'mychannel' created ===================== 
Having all peers join the channel...
+ peer channel join -b mychannel.block
+ res=1
+ set +x
2018-10-04 09:52:42.841 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
Error: proposal failed (err: rpc error: code = Unavailable desc = transport is closing)
Usage:
peer channel join [flags]
Flags:
-b, --blockpath string   Path to file containing genesis block
Global Flags:
--cafile string                       Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
--certfile string                     Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint
--clientauth                          Use mutual TLS when communicating with the orderer endpoint
--keyfile string                      Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint
--logging-level string                Default logging level and overrides, see core.yaml for full syntax
-o, --orderer string                      Ordering service endpoint
--ordererTLSHostnameOverride string   The hostname override to use when validating the TLS connection to the orderer.
--tls                                 Use TLS when communicating with the orderer endpoint
-v, --version                             Display current version of fabric peer server
peer0.org1 failed to join the channel, Retry after 3 seconds
+ peer channel join -b mychannel.block
+ res=1
+ set +x
Error: Error getting endorser client channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded
Usage:
peer channel join [flags]
Flags:
-b, --blockpath string   Path to file containing genesis block
Global Flags:
--cafile string                       Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
--certfile string                     Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint
--clientauth                          Use mutual TLS when communicating with the orderer endpoint
--keyfile string                      Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint
--logging-level string                Default logging level and overrides, see core.yaml for full syntax
-o, --orderer string                      Ordering service endpoint
--ordererTLSHostnameOverride string   The hostname override to use when validating the TLS connection to the orderer.
--tls                                 Use TLS when communicating with the orderer endpoint
-v, --version                             Display current version of fabric peer server
peer0.org1 failed to join the channel, Retry after 3 seconds
+ peer channel join -b mychannel.block
+ res=1
+ set +x
Error: Error getting endorser client channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded
Usage:
peer channel join [flags]
Flags:
-b, --blockpath string   Path to file containing genesis block
Global Flags:
--cafile string                       Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
--certfile string                     Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint
--clientauth                          Use mutual TLS when communicating with the orderer endpoint
--keyfile string                      Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint
--logging-level string                Default logging level and overrides, see core.yaml for full syntax
-o, --orderer string                      Ordering service endpoint
--ordererTLSHostnameOverride string   The hostname override to use when validating the TLS connection to the orderer.
--tls                                 Use TLS when communicating with the orderer endpoint
-v, --version                             Display current version of fabric peer server
peer0.org1 failed to join the channel, Retry after 3 seconds
+ peer channel join -b mychannel.block
+ res=1
+ set +x
Error: Error getting endorser client channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded
Usage:
peer channel join [flags]
Flags:
-b, --blockpath string   Path to file containing genesis block
Global Flags:
--cafile string                       Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
--certfile string                     Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint
--clientauth                          Use mutual TLS when communicating with the orderer endpoint
--keyfile string                      Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint
--logging-level string                Default logging level and overrides, see core.yaml for full syntax
-o, --orderer string                      Ordering service endpoint
--ordererTLSHostnameOverride string   The hostname override to use when validating the TLS connection to the orderer.
--tls                                 Use TLS when communicating with the orderer endpoint
-v, --version                             Display current version of fabric peer server
peer0.org1 failed to join the channel, Retry after 3 seconds
+ peer channel join -b mychannel.block
+ res=1
+ set +x
Error: Error getting endorser client channel: endorser client failed to connect to peer0.org1.example.com:7051: failed to create new connection: context deadline exceeded
Usage:
peer channel join [flags]
Flags:
-b, --blockpath string   Path to file containing genesis block
Global Flags:
--cafile string                       Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
--certfile string                     Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint
--clientauth                          Use mutual TLS when communicating with the orderer endpoint
--keyfile string                      Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint
--logging-level string                Default logging level and overrides, see core.yaml for full syntax
-o, --orderer string                      Ordering service endpoint
--ordererTLSHostnameOverride string   The hostname override to use when validating the TLS connection to the orderer.
--tls                                 Use TLS when communicating with the orderer endpoint
-v, --version                             Display current version of fabric peer server
!!!!!!!!!!!!!!! After 5 attempts, peer0.org1 has failed to join channel 'mychannel'  !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========
ERROR !!!! Test failed

我正在使用

  • 码头工人 18.03.1-CE
  • docker-compose 1.22.0
  • 节点 8.9.4
  • npm 5.6.0
  • 围棋 1.11
  • 乌班图 16.04

peer0.org1 容器日志

Version: 1.1.0
Go version: go1.9.2
OS/Arch: linux/amd64
Experimental features: false
Chaincode:
Base Image Version: 0.4.6
Base Docker Namespace: hyperledger
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
2018-10-09 04:45:58.815 UTC [ledgermgmt] initialize -> INFO 003 Initializing ledger mgmt
2018-10-09 04:45:58.835 UTC [kvledger] NewProvider -> INFO 004 Initializing ledger provider
2018-10-09 04:46:13.391 UTC [kvledger] NewProvider -> INFO 005 ledger provider Initialized
2018-10-09 04:46:13.391 UTC [ledgermgmt] initialize -> INFO 006 ledger mgmt initialized
2018-10-09 04:46:13.392 UTC [peer] func1 -> INFO 007 Auto-detected peer address: 172.19.0.2:7051
2018-10-09 04:46:13.392 UTC [peer] func1 -> INFO 008 Returning peer0.org1.example.com:7051
2018-10-09 04:46:13.393 UTC [peer] func1 -> INFO 009 Auto-detected peer address: 172.19.0.2:7051
2018-10-09 04:46:13.393 UTC [peer] func1 -> INFO 00a Returning peer0.org1.example.com:7051
2018-10-09 04:46:13.858 UTC [nodeCmd] serve -> INFO 00b Starting peer with TLS enabled
2018-10-09 04:46:13.861 UTC [eventhub_producer] start -> INFO 00c Event processor started
2018-10-09 04:46:13.861 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00d Entering computeChaincodeEndpoint with peerHostname: peer0.org1.example.com
.
.
.
Orderer/OrdererOrg/Readers:0xc4217e8780 Application/Admins:0xc42179ad80] map[Orderer:0xc4217e8960 Application:0xc4217e8ea0]})}] incompatible Application capability V1_2 is required but not supported
goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panicf(0xc4202ca660, 0xefeec0, 0x1c, 0xc4217e9160, 0x2, 0x2)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:194 +0x134
github.com/hyperledger/fabric/core/peer.capabilitiesSupportedOrPanic(0x166ba20, 0xc42193e280)
/opt/gopath/src/github.com/hyperledger/fabric/core/peer/peer.go:131 +0x338
github.com/hyperledger/fabric/core/peer.createChain(0xc4220c9640, 0x9, 0x166e8a0, 0xc4217412a0, 0xc4217414e0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/core/peer/peer.go:300 +0xdc
github.com/hyperledger/fabric/core/peer.Initialize(0xf33be0)
/opt/gopath/src/github.com/hyperledger/fabric/core/peer/peer.go:224 +0x748
github.com/hyperledger/fabric/peer/node.serve(0x16c5708, 0x0, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:280 +0x1048
github.com/hyperledger/fabric/peer/node.glob..func1(0x164ce80, 0x16c5708, 0x0, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hyperledger/fabric/peer/node/start.go:87 +0x3f
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0x164ce80, 0x16c5708, 0x0, 0x0, 0x164ce80, 0x16c5708)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:599 +0x3e8
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x164d4e0, 0x11, 0xc42030e230, 0x5)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:689 +0x2fe
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x164d4e0, 0x1b, 0xc4200160b5)
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:648 +0x2b
main.main()
/opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:112 +0x5e1

PS :我没有粘贴容器的中间日志。

任何帮助,不胜感激。 谢谢

首先检查您的cryptogen tool(您在路径中设置的那个(是否与您在示例中使用的是指向旧版本工具的,这很常见。

如果您打算重新启动所有内容以清理所有正在运行的容器,我强烈建议

  1. ./byfn.sh -m 向下
  2. docker stop $(docker ps -a -q(
  3. docker rm $(docker ps -a -q(

之后重新运行启动命令./byfn.sh -m up -s couchdb -a

如果您仍然遇到问题,也许您可以从一个更简单的示例开始,我想出了如何使用基本网络示例设置 Fabric (v1.2( 和 2 个不同的主机。

在多台物理机中设置超级账本结构

希望这有帮助!

您应该点击以下链接

生成加密材料后,运行以下命令以启动网络

./byfn.sh -m up -s couchdb -a

如果您遇到相同的问题,只需将其拆毁并再次将其抬起即可

./byfn.sh -m down

然后

./byfn.sh -m up -s couchdb -a

最新更新