hyperledger fabric的fabric-samples项目在阿里服务器运行异常

fabric-samples的first-network项目,在本地的linux、腾讯云服务器运行正常,但是在阿里的服务器报错[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7fcd47490259]。

一、运行说明

  1. 环境安装 go/git.
  2. git clone hyperledger/fabric-samples.git" rel="nofollow">https://github.com/hyperledge...

  3. 准备环境脚本下载

cd fabric-samples
curl -sSL https://goo.gl/PabWJX | bash

此脚本下载较慢,内容可以参见https://github.com/windspear0...

  1. 启动网络

cd first-network
./byfn.sh -m generate
./byfn.sh -m up

二、问题

  1. 在阿里的服务器(CentOS 7.3、CentOS 7.2、Ubuntu 16)运行first-network报错

运行cli容器的script.sh时候,创建渠道时cli控制台错误摘要:

2017-10-01 06:59:13.810 UTC [msp] GetLocalMSP -> DEBU 00e Returning existing local MSP
2017-10-01 06:59:13.810 UTC [msp] GetDefaultSigningIdentity -> DEBU 00f Obtaining default signing identity
2017-10-01 06:59:13.810 UTC [msp] GetLocalMSP -> DEBU 010 Returning existing local MSP
2017-10-01 06:59:13.810 UTC [msp] GetDefaultSigningIdentity -> DEBU 011 Obtaining default signing identity
2017-10-01 06:59:13.810 UTC [msp/identity] Sign -> DEBU 012 Sign: plaintext: 0AC3060A1508021A0608C1B0D7CE0522...B543B0048F0326ED62C37E23C47D969C
2017-10-01 06:59:13.810 UTC [msp/identity] Sign -> DEBU 013 Sign: digest: 6FCEB24F9FBEDA051049618A9D4C37FEC111F9FE7D844B23990B385892E5D5E4
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7fcd47490259]

runtime stack:
runtime.throw(0xdbb36f, 0x2a)

/opt/go/src/runtime/panic.go:566 +0x95

runtime.sigpanic()

/opt/go/src/runtime/sigpanic_unix.go:12 +0x2cc

goroutine 35 [syscall, locked to thread]:
runtime.cgocall(0xb038c0, 0xc42002ddf8, 0xc400000000)

/opt/go/src/runtime/cgocall.go:131 +0x110 fp=0xc42002ddb0 sp=0xc42002dd70

net._C2func_getaddrinfo(0x7fcd380008c0, 0x0, 0xc420357710, 0xc42002e1e0, 0x0, 0x0, 0x0)

??:0 +0x68 fp=0xc42002ddf8 sp=0xc42002ddb0

net.cgoLookupIPCNAME(0x7ffd57ddd4b9, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)

orderer.example.com控制台错误摘要:

2017-10-01 07:40:27.554 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 0e6 Remaining bytes=[9061], Going to peek [8] bytes
2017-10-01 07:40:27.554 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 0e7 Returning blockbytes - length=[9059], placementInfo={fileNum=[0], startOffset=[0], bytesOffset=[2]}
2017-10-01 07:40:27.554 UTC [orderer/multichain] newChainSupport -> DEBU 0e8 [channel: testchainid] Retrieved metadata for tip of chain (blockNumber=0, lastConfig=0, lastConfigSeq=0):
2017-10-01 07:40:27.554 UTC [orderer/multichain] NewManagerImpl -> INFO 0e9 Starting with system channel testchainid and orderer type solo
2017-10-01 07:40:27.554 UTC [orderer/main] main -> INFO 0ea Beginning to serve requests
2017-10-01 07:40:27.877 UTC [orderer/main] Deliver -> DEBU 0eb Starting new Deliver handler
2017-10-01 07:40:27.877 UTC [orderer/common/deliver] Handle -> DEBU 0ec Starting new deliver loop
2017-10-01 07:40:27.877 UTC [orderer/common/deliver] Handle -> DEBU 0ed Attempting to read seek info message
2017-10-01 07:40:27.885 UTC [orderer/common/deliver] Handle -> WARN 0ee Error reading from stream: rpc error: code = Canceled desc = context canceled
2017-10-01 07:40:27.885 UTC [orderer/main] func1 -> DEBU 0ef Closing Deliver stream

  1. 尝试:在本地的linux(CentOS 7.3、CentOS 7.2、Ubuntu 16)、腾讯云服务器(CentOS 7.2)内一样的程序运行正常。
  2. 尝试:怀疑在阿里服务器内容器通信有问题,但是各个容器直接均可以ping通,开放的端口也可以互相telnet上。
  3. 按说云服务器、docker都进行了统一抽象,但是为什么还会出现一样的问题?
  4. 目前对fabric源码不熟悉,没有做底层协议通信方面的分析。

各位高手有什么建议。多谢!

回答:

在阿里云上确实会出现这个问题,解决方法,添加一行代码到docker-compose-simple目录下 docker-compose-simple.yaml文件中。图片描述

回答:

我也碰到了同样问题,请问,你解决了吗?能否分享一下。多谢。

回答:

我也遇到相同的问题了,在阿里云上出现了一样的报错。 你解决了吗?

回答:

这个问题我也遇到了,很有可能是go语言并发访问的问题。参见如下链接。
https://marcan.st/2017/12/deb...

回答:

应该是阿里云的服务器内部文件/etc/resolv.conf导致的,可以看看这两篇文章:
https://yq.aliyun.com/article...
https://ywandy.github.io/Fabr...

以上是 hyperledger fabric的fabric-samples项目在阿里服务器运行异常 的全部内容, 来源链接: utcz.com/p/182356.html

回到顶部