阿里云centos7.4运行hyperledger fabric1.3.0/1.4.0的fabric-sample(first_network) - Go语言中文社区

阿里云centos7.4运行hyperledger fabric1.3.0/1.4.0的fabric-sample(first_network)


参考hyperledger fabric官方文档运行启动的build your first network例子,始终得到如下的错误提示:

2019-01-21 02:34:16.384 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2019-01-21 02:34:16.426 UTC [channelCmd] executeJoin -> INFO 002 Successfully submitted proposal to join channel
===================== peer0.org1 joined channel 'mychannel' ===================== 

+ peer channel join -b mychannel.block
+ res=1
+ set +x
Error: error getting endorser client for channel: endorser client failed to connect to peer1.org1.example.com:7051: failed to create new connection: context deadline exceeded
peer1.org1 failed to join the channel, Retry after 3 seconds

尝试按照文章后面的解决方式依然无法解决问题。
1、删除docker运行的container;
2、删除images重新下载;
3、删除网络docker network prune;
4、删除磁盘卷 docker volume prune。
上述几种方式针对正常环境是没有问题,至此得出结论是centos环境的问题。接着分析运行的docker,通过日志查询问题。

#查看运行的docker,发现没有运行peer。这就断定peer启动产生问题。
docker ps
#通过如下命令,找到peer对应的container的id,并通过lods命令查看ca29ddbebfd0的日志
docker ps -a 
docker logs ca29ddbebfd0

下面的日志中, segmentation violation是核心问题所在,立即联想到之前解决过这个问题。

2019-01-21 02:43:50.098 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-01-21 02:43:50.116 UTC [nodeCmd] serve -> INFO 002 Starting peer:
 Version: 1.4.0
 Commit SHA: d700b43
 Go version: go1.11.1
 OS/Arch: linux/amd64
 Chaincode:
  Base Image Version: 0.4.14
  Base Docker Namespace: hyperledger
  Base Docker Label: org.hyperledger.fabric
  Docker Namespace: hyperledger
2019-01-21 02:43:50.116 UTC [ledgermgmt] initialize -> INFO 003 Initializing ledger mgmt
2019-01-21 02:43:50.117 UTC [kvledger] NewProvider -> INFO 004 Initializing ledger provider
2019-01-21 02:43:50.203 UTC [kvledger] NewProvider -> INFO 005 ledger provider Initialized
2019-01-21 02:43:50.242 UTC [ledgermgmt] initialize -> INFO 006 ledger mgmt initialized
2019-01-21 02:43:50.242 UTC [peer] func1 -> INFO 007 Auto-detected peer address: 172.24.0.6:7051
2019-01-21 02:43:50.242 UTC [peer] func1 -> INFO 008 Returning peer1.org1.example.com:7051
2019-01-21 02:43:50.242 UTC [peer] func1 -> INFO 009 Auto-detected peer address: 172.24.0.6:7051
2019-01-21 02:43:50.243 UTC [peer] func1 -> INFO 00a Returning peer1.org1.example.com:7051
2019-01-21 02:43:50.244 UTC [nodeCmd] serve -> INFO 00b Starting peer with TLS enabled
2019-01-21 02:43:50.246 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00c Entering computeChaincodeEndpoint with peerHostname: peer1.org1.example.com
2019-01-21 02:43:50.246 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00d Exit with ccEndpoint: peer1.org1.example.com:7052
2019-01-21 02:43:50.246 UTC [nodeCmd] createChaincodeServer -> WARN 00e peer.chaincodeListenAddress is not set, using peer1.org1.example.com:7052
2019-01-21 02:43:50.250 UTC [sccapi] registerSysCC -> INFO 00f system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2019-01-21 02:43:50.250 UTC [sccapi] registerSysCC -> INFO 010 system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2019-01-21 02:43:50.250 UTC [sccapi] registerSysCC -> INFO 011 system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered
2019-01-21 02:43:50.250 UTC [sccapi] registerSysCC -> INFO 012 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle,true) disabled
2019-01-21 02:43:50.253 UTC [gossip.service] func1 -> INFO 013 Initialize gossip with endpoint peer1.org1.example.com:7051 and bootstrap set [peer0.org1.example.com:7051]
2019-01-21 02:43:50.258 UTC [gossip.gossip] NewGossipService -> INFO 014 Creating gossip service with self membership of Endpoint: peer1.org1.example.com:7051, InternalEndpoint: peer1.org1.example.com:7051, PKI-ID: 8172f9aa616828cfb8e330fc995f481b054caa4a7fadd329e1f502d3350666a9, Metadata: 
2019-01-21 02:43:50.260 UTC [gossip.gossip] start -> INFO 015 Gossip instance peer1.org1.example.com:7051 started
2019-01-21 02:43:50.262 UTC [sccapi] deploySysCC -> INFO 016 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2019-01-21 02:43:50.263 UTC [cscc] Init -> INFO 017 Init CSCC
2019-01-21 02:43:50.263 UTC [sccapi] deploySysCC -> INFO 018 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2019-01-21 02:43:50.263 UTC [qscc] Init -> INFO 019 Init QSCC
2019-01-21 02:43:50.264 UTC [sccapi] deploySysCC -> INFO 01a system chaincode qscc/(github.com/hyperledger/fabric/core/scc/qscc) deployed
2019-01-21 02:43:50.264 UTC [sccapi] deploySysCC -> INFO 01b system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2019-01-21 02:43:50.264 UTC [nodeCmd] serve -> INFO 01c Deployed system chaincodes
2019-01-21 02:43:50.265 UTC [discovery] NewService -> INFO 01d Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000
2019-01-21 02:43:50.265 UTC [nodeCmd] registerDiscoveryService -> INFO 01e Discovery service activated
2019-01-21 02:43:50.265 UTC [nodeCmd] serve -> INFO 01f Starting peer with ID=[name:"peer1.org1.example.com" ], network ID=[dev], address=[peer1.org1.example.com:7051]
2019-01-21 02:43:50.265 UTC [nodeCmd] serve -> INFO 020 Started peer with ID=[name:"peer1.org1.example.com" ], network ID=[dev], address=[peer1.org1.example.com:7051]
2019-01-21 02:43:50.266 UTC [nodeCmd] func8 -> INFO 021 Starting profiling server with listenAddress = 0.0.0.0:6060
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7fb2c0122259]

runtime stack:
runtime.throw(0x123f0ff, 0x2a)
	/opt/go/src/runtime/panic.go:608 +0x72
runtime.sigpanic()
	/opt/go/src/runtime/signal_unix.go:374 +0x2f2

goroutine 179 [syscall]:
runtime.cgocall(0xe1bdc0, 0xc0005c0600, 0x29)

阿里云的centos7.*需要在docker启动的yaml文件配置环境变量:

- GODEBUG=netdns=go

在这里插入图片描述
参考链接:
1、阿里云环境部署Hyperledger Fabric之SIGSEGV问题分析和解决经验分享
2、hyperledger fabric的fabric-samples项目在阿里服务器运行异常

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/destiny_aqua/article/details/86570917
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-03-01 22:09:21
  • 阅读 ( 1710 )
  • 分类:Linux

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢