在同一台机器上部署两个不同的Fabric网络

问题描述

我需要在两个环境(开发/测试)下部署Fabric网络。我在docker-compose.yaml,configtx.yaml文件中分别更改了端口和容器名称,但在创建通道时仍然遇到错误

我启动了我的结构网络并部署了chaincode。然后,我将该网络目录克隆到另一个名为fabricApp_TEST的文件夹中。现在,我可以启动容器了,但是对等端没有加入测试网络中的频道

2020-08-24 11:08:28.798 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-08-24 11:08:28.819 UTC [cli.common] readBlock -> INFO 002 Expect block,but got status: &{NOT_FOUND}
2020-08-24 11:08:28.821 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-08-24 11:08:29.090 UTC [cli.common] readBlock -> INFO 004 Expect block,but got status: &{SERVICE_UNAVAILABLE}
2020-08-24 11:08:29.096 UTC [channelCmd] InitCmdFactory -> INFO 005 Endorser and orderer connections initialized
2020-08-24 11:08:29.297 UTC [cli.common] readBlock -> INFO 006 Expect block,but got status: &{SERVICE_UNAVAILABLE}
2020-08-24 11:08:29.300 UTC [channelCmd] InitCmdFactory -> INFO 007 Endorser and orderer connections initialized
2020-08-24 11:08:29.501 UTC [cli.common] readBlock -> INFO 008 Expect block,but got status: &{SERVICE_UNAVAILABLE}
2020-08-24 11:08:29.504 UTC [channelCmd] InitCmdFactory -> INFO 009 Endorser and orderer connections initialized
2020-08-24 11:08:29.705 UTC [cli.common] readBlock -> INFO 00a Expect block,but got status: &{SERVICE_UNAVAILABLE}
2020-08-24 11:08:29.708 UTC [channelCmd] InitCmdFactory -> INFO 00b Endorser and orderer connections initialized
2020-08-24 11:08:29.910 UTC [cli.common] readBlock -> INFO 00c Expect block,but got status: &{SERVICE_UNAVAILABLE}
2020-08-24 11:08:29.912 UTC [channelCmd] InitCmdFactory -> INFO 00d Endorser and orderer connections initialized
2020-08-24 11:08:30.115 UTC [cli.common] readBlock -> INFO 00e Received block: 0
Error: error getting endorser client for channel: endorser client Failed to connect to localhost:3051: Failed to create new connection: connection error: desc = "transport: authentication handshake Failed: read tcp 127.0.0.1:35300->127.0.0.1:3051: read: connection reset by peer"
Error: error getting endorser client for channel: endorser client Failed to connect to localhost:4051: Failed to create new connection: connection error: desc = "transport: authentication handshake Failed: read tcp 127.0.0.1:54586->127.0.0.1:4051: read: connection reset by peer"
Error: error getting endorser client for channel: endorser client Failed to connect to localhost:5051: Failed to create new connection: connection error: desc = "transport: authentication handshake Failed: read tcp 127.0.0.1:56322->127.0.0.1:5051: read: connection reset by peer"
Error: error getting endorser client for channel: endorser client Failed to connect to localhost:6051: Failed to create new connection: connection error: desc = "transport: authentication handshake Failed: read tcp 127.0.0.1:56248->127.0.0.1:6051: read: connection reset by peer"
2020-08-24 11:08:30.356 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-08-24 11:08:30.372 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update
2020-08-24 11:08:30.476 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-08-24 11:08:30.491 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update

检查对等容器的日志后,

DEBU 04b constructing CouchDB VersionedDBProvider
2020-08-24 11:05:48.410 UTC [couchdb] VerifyCouchConfig -> DEBU 04c Entering VerifyCouchConfig()
2020-08-24 11:05:48.410 UTC [couchdb] handleRequest -> DEBU 04d Entering handleRequest()  method=GET  url=http://couchdb0-test:1984/  dbname=
2020-08-24 11:05:48.410 UTC [couchdb] handleRequest -> DEBU 04e Request URL: http://couchdb0-test:1984/
2020-08-24 11:05:48.413 UTC [couchdb] handleRequest -> WARN 04f retrying couchdb request in 125ms. Attempt:1  Error:Get "http://couchdb0-test:1984/": dial tcp 172.22.0.4:1984: connect: connection refused

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)