启动网络时出错.不同VM中的节点-连接到orderer0.tec.com:7050失败,错误:超出了上下文期限 [英] Error starting up a network. Nodes in different VM - Failed connecting to orderer0.tec.com:7050 , error: context deadline exceeded

查看:102
本文介绍了启动网络时出错.不同VM中的节点-连接到orderer0.tec.com:7050失败,错误:超出了上下文期限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在启动一个网络,该网络将有3个对等方和一个订购者.我有4个不同的虚拟机,每个节点一个.

I'm starting up a network, which will have 3 peers and an orderer. I have 4 different Virtual Machines, one for each node.

我遵循Hyperledger Fabric入门手册.我执行所有步骤都没有问题.但是,在执行以下命令peer channel join -b channeldemo.block之后,我开始出现一些错误.在我看来,上一条命令生成得很好,因为我得到了以下日志:

I follow the Getting Started manual for Hyperledger Fabric. I execute all the steps without any problem. However, after executing the following command peer channel join -b channeldemo.block, I start getting some erros. It seems to me that the previous command is generated well, because I get the following logs:

2017-06-27 08:26:23.247 UTC [channelCmd] executeJoin -> INFO 00a Peer joined the channel!
2017-06-27 08:26:23.247 UTC [main] main -> INFO 00b Exiting.....

但是,在那之后,我在同级中获得了以下日志:

But then, after that, I get the following logs in the peer:

peer0.proveedor.com    | 2017-06-27 08:26:29.241 UTC [deliveryClient] StartDeliverForChannel -> DEBU 2d8 This peer will pass blocks from orderer service to other peers for channel canaltraza
peer0.proveedor.com    | 2017-06-27 08:26:32.242 UTC [ConnProducer] NewConnection -> ERRO 2d9 Failed connecting to orderer0.tec.com:7050 , error: context deadline exceeded
peer0.proveedor.com    | 2017-06-27 08:26:32.242 UTC [deliveryClient] connect -> ERRO 2da Failed obtaining connection: Could not connect to any of the endpoints: [orderer0.tec.com:7050]

但是,如果我在本地主机上启动网络,则不会收到任何错误日志.一个Peer加入该频道后,我收到以下消息(有来自Peer和Orderer的消息):

However, if I start up the network in my localhost, I don't get any error log. After one Peer joins the channel, I get the following messages (there are messages from the peer and the orderer):

peer0.proveedor.com | 2017-06-29 11:17:16.027 UTC [deliveryClient] StartDeliverForChannel -> DEBU 2d8 This peer will pass blocks from orderer service to other peers for channel canaltraza
orderer0.tec.com | 2017-06-29 11:17:16.031 UTC [orderer/main] Deliver -> DEBU c22 Starting new Deliver handler
orderer0.tec.com | 2017-06-29 11:17:16.031 UTC [orderer/common/deliver] Handle -> DEBU c23 Starting new deliver loop
orderer0.tec.com | 2017-06-29 11:17:16.031 UTC [orderer/common/deliver] Handle -> DEBU c24 Attempting to read seek info message
orderer0.tec.com | 2017-06-29 11:17:16.032 UTC [policies] GetPolicy -> DEBU c25 Returning policy Readers for evaluation
orderer0.tec.com | 2017-06-29 11:17:16.032 UTC [cauthdsl] func1 -> DEBU c26 0xc42010d530 gate 1498735036032103426 evaluation starts 
orderer0.tec.com | 2017-06-29 11:17:16.032 UTC [cauthdsl] func2 -> DEBU c27 0xc42010d530 signed by 0 principal evaluation starts (used [false])
orderer0.tec.com | 2017-06-29 11:17:16.032 UTC [cauthdsl] func2 -> DEBU c28 0xc42010d530 processing identity 0 with bytes of 0a0950726f766565646f7212f4052d2d2d2d2d424547494e202d2d2d2d2d0a4d49494345444343416265674177494241674952414c595177764d593852483533594d4a7970767977457777436759494b6f5a497a6a3045417749776254454c0a4d416b474131554542684d4356564d78457a415242674e5642416754436b4e6862476c6d62334a7561574578466a415542674e564241635444564e68626942470a636d467559326c7a59323878466a415542674e5642416f544458427962335a6c5a5752766369356a623230784754415842674e5642414d5445474e684c6e42790a62335a6c5a5752766369356a623230774868634e4d5463774e6a49354d4467304d7a41335768634e4d6a63774e6a49334d4467304d7a4133576a42594d5173770a435159445651514745774a56557a45544d4245474131554543424d4b5132467361575a76636d3570595445574d4251474131554542784d4e5532467549455a790a5957356a61584e6a627a45634d426f474131554541784d546347566c636a417563484a76646d566c5a4739794c6d4e766254425a4d424d4742797147534d34390a4167454743437147534d34394177454841304941424b5137324e78684f744648354b62666876744e3068624a484f714d6c56734c37695262794e75626a5264630a785039784554507153313169492b33724b46336f4e622b7679777756555058376335653877616f2b6a46366a5454424c4d41344741315564447745422f7751450a417749486744414d42674e5648524d4241663845416a41414d437347413155644977516b4d434b4149496631483567312b535164576369307753386b536136370a45305a4d4651516944776f426a466978786d48434d416f4743437147534d343942414d43413063414d4551434945497a7451796f476e512f6d74334c685561640a3563585172415a6b5978656b4777524f655947326e6a56694169417a6449472f4f2f4a4f57466e566c50727569567332734844724a676356496f70446a4d76360a64696f4e31773d3d0a2d2d2d2d2d454e44202d2d2d2d2d0a
orderer0.tec.com | 2017-06-29 11:17:16.032 UTC [msp/identity] newIdentity -> DEBU c29 Creating identity instance for ID &{Proveedor 0bf7d673709e14cef044e09025b8511a590e2c758697ae07f2eef5283757787d}
orderer0.tec.com | 2017-06-29 11:17:16.032 UTC [cauthdsl] func2 -> DEBU c2a 0xc42010d530 identity 0 does not satisfy principal: The identity is a member of a different MSP (expected Usuario, got Proveedor
orderer0.tec.com | 2017-06-29 11:17:16.032 UTC [cauthdsl] func2 -> DEBU c2b 0xc42010d530 principal evaluation fails
orderer0.tec.com | 2017-06-29 11:17:16.032 UTC [cauthdsl] func1 -> DEBU c2c 0xc42010d530 gate 1498735036032103426 evaluation fails
orderer0.tec.com | 2017-06-29 11:17:16.032 UTC [cauthdsl] func1 -> DEBU c2d 0xc42010d530 gate 1498735036032902403 evaluation starts
orderer0.tec.com | 2017-06-29 11:17:16.032 UTC [cauthdsl] func2 -> DEBU c2e 0xc42010d530 signed by 0 principal evaluation starts (used [false])
orderer0.tec.com | 2017-06-29 11:17:16.032 UTC [cauthdsl] func2 -> DEBU c2f 0xc42010d530 processing identity 0 with bytes of 0a0950726f766565646f7212f4052d2d2d2d2d424547494e202d2d2d2d2d0a4d49494345444343416265674177494241674952414c595177764d593852483533594d4a7970767977457777436759494b6f5a497a6a3045417749776254454c0a4d416b474131554542684d4356564d78457a415242674e5642416754436b4e6862476c6d62334a7561574578466a415542674e564241635444564e68626942470a636d467559326c7a59323878466a415542674e5642416f544458427962335a6c5a5752766369356a623230784754415842674e5642414d5445474e684c6e42790a62335a6c5a5752766369356a623230774868634e4d5463774e6a49354d4467304d7a41335768634e4d6a63774e6a49334d4467304d7a4133576a42594d5173770a435159445651514745774a56557a45544d4245474131554543424d4b5132467361575a76636d3570595445574d4251474131554542784d4e5532467549455a790a5957356a61584e6a627a45634d426f474131554541784d546347566c636a417563484a76646d566c5a4739794c6d4e766254425a4d424d4742797147534d34390a4167454743437147534d34394177454841304941424b5137324e78684f744648354b62666876744e3068624a484f714d6c56734c37695262794e75626a5264630a785039784554507153313169492b33724b46336f4e622b7679777756555058376335653877616f2b6a46366a5454424c4d41344741315564447745422f7751450a417749486744414d42674e5648524d4241663845416a41414d437347413155644977516b4d434b4149496631483567312b535164576369307753386b536136370a45305a4d4651516944776f426a466978786d48434d416f4743437147534d343942414d43413063414d4551434945497a7451796f476e512f6d74334c685561640a3563585172415a6b5978656b4777524f655947326e6a56694169417a6449472f4f2f4a4f57466e566c50727569567332734844724a676356496f70446a4d76360a64696f4e31773d3d0a2d2d2d2d2d454e44202d2d2d2d2d0a
orderer0.tec.com | 2017-06-29 11:17:16.033 UTC [msp/identity] newIdentity -> DEBU c30 Creating identity instance for ID &{Proveedor 0bf7d673709e14cef044e09025b8511a590e2c758697ae07f2eef5283757787d}
orderer0.tec.com | 2017-06-29 11:17:16.033 UTC [msp] SatisfiesPrincipal -> DEBU c31 Checking if identity satisfies MEMBER role for Proveedor
orderer0.tec.com | 2017-06-29 11:17:16.033 UTC [msp] Validate -> DEBU c32 MSP Proveedor validating identity
orderer0.tec.com | 2017-06-29 11:17:16.033 UTC [cauthdsl] func2 -> DEBU c33 0xc42010d530 principal matched by identity 0
orderer0.tec.com | 2017-06-29 11:17:16.034 UTC [msp/identity] Verify -> DEBU c34 Verify: digest = 00000000 b0 ac 91 ca 2f e9 0d 5e 0d 48 d0 dc 11 06 3b 53 |..../..^.H....;S| orderer0.tec.com | 00000010 a1 d7 f9 d6 2f fe 7d fb 19 2c 90 cb 0f 67 4a 7e |..../.}..,...gJ~|
orderer0.tec.com | 2017-06-29 11:17:16.034 UTC [msp/identity] Verify -> DEBU c35 Verify: sig = 00000000 30 45 02 21 00 99 07 ef f1 72 66 96 f6 bc 5f cf |0E.!.....rf..._.| orderer0.tec.com | 00000010 ca a7 4c fd 86 de a2 5c 9e 87 02 ec 35 be df 8d |..L........5...| orderer0.tec.com | 00000020 65 3f 8a 48 67 02 20 38 6b 1d aa 86 f6 53 9c 76 |e?.Hg. 8k....S.v| orderer0.tec.com | 00000030 c1 10 f7 81 5d 1f 65 9a fd 92 fb 35 84 e1 71 ba |....].e....5..q.| orderer0.tec.com | 00000040 7f ce 14 54 d7 0a a7 |...T...|
orderer0.tec.com | 2017-06-29 11:17:16.034 UTC [cauthdsl] func2 -> DEBU c36 0xc42010d530 principal evaluation succeeds for identity 0
orderer0.tec.com | 2017-06-29 11:17:16.034 UTC [cauthdsl] func1 -> DEBU c37 0xc42010d530 gate 1498735036032902403 evaluation succeeds
orderer0.tec.com | 2017-06-29 11:17:16.034 UTC [orderer/common/sigfilter] Apply -> DEBU c38 Forwarding validly signed message for policy &{%!s(*common.ImplicitMetaPolicy=&{Readers 0}) %!s(int=1) [%!s(*policies.implicitMetaPolicy=&{0xc4201dcde0 1 [0xc42010d2a8 0xc42010d370 0xc42010d408]}) %!s(*policies.implicitMetaPolicy=&{0xc4201dc3a0 1 [0xc42010d228]})]}
orderer0.tec.com | 2017-06-29 11:17:16.034 UTC [orderer/common/deliver] Handle -> DEBU c39 [channel: canaltraza] Received seekInfo (0xc42081b260) start: > stop: >
orderer0.tec.com | 2017-06-29 11:17:16.034 UTC [fsblkstorage] retrieveBlockByNumber -> DEBU c3a retrieveBlockByNumber() - blockNum = [1]
orderer0.tec.com | 2017-06-29 11:17:16.034 UTC [fsblkstorage] newBlockfileStream -> DEBU c3b newBlockfileStream(): filePath=[/var/hyperledger/production/orderer/chains/canaltraza/blockfile_000000], startOffset=[14553]
orderer0.tec.com | 2017-06-29 11:17:16.034 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU c3c Remaining bytes=[16306], Going to peek [8] bytes
orderer0.tec.com | 2017-06-29 11:17:16.034 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU c3d Returning blockbytes - length=[16304], placementInfo={fileNum=[0], startOffset=[14553], bytesOffset=[14555]}
orderer0.tec.com | 2017-06-29 11:17:16.034 UTC [orderer/common/deliver] Handle -> DEBU c3e [channel: canaltraza] Delivering block for (0xc42081b260)
peer0.proveedor.com | 2017-06-29 11:17:16.031 UTC [deliveryClient] RequestBlocks -> DEBU 2d9 Starting deliver with block [1] for channel canaltraza
peer0.proveedor.com | 2017-06-29 11:17:16.038 UTC [blocksProvider] DeliverBlocks -> DEBU 2da [canaltraza] Adding payload locally, buffer seqNum = [1], peers number [0] peer0.proveedor.com | 2017-06-29 11:17:16.038 UTC [blocksProvider] DeliverBlocks -> DEBU 2db [canaltraza] Gossiping block [1], peers number [0]
peer0.proveedor.com | 2017-06-29 11:17:16.038 UTC [committer] Commit -> DEBU 2dc Validating block

推荐答案

该错误是对等方的内部错误.对方无法连接到订购者.这是因为您创建的Docker容器的默认配置.

The error was an internal error of the Peer. The peer couldn't connect to the orderer. It was because of the default configuration of the Docker containers that you create.

创建Docker容器时,请定义其网络.默认情况下,您创建的容器位于网桥网络内.该网络将容器与其他主机中的其他容器隔离.

When you create a docker container, you define its network. By default, the containers that you create are locaten inside the bridge network. This networks isolates the containers from other containers that are in other hosts.

我将此配置更改为主机",但未收到错误消息.一切顺利.

I changed this configuration to Host, and I don't get the error. It goes well.

  • 我评论了默认网络network: byfn
  • 我在每个容器中添加了属性network_mode: host
  • 我定义了- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host
  • I commented the default network network: byfn
  • I added the property network_mode: host to each container
  • I define the - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=host

我应该阅读更多有关docker网络的信息,因为还有其他可能性,例如覆盖.我想这会更好.另外,我认为使用docker-machien是个好主意,但是我还没有做到.

I should read more about docker networks, because there are other posibilities like overlay. I thin that this would be better. Also, I thin that it would be a good idea using docker-machien, but I haven't done it. There is more info about it here.

这篇关于启动网络时出错.不同VM中的节点-连接到orderer0.tec.com:7050失败,错误:超出了上下文期限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆