Hyperledger fabric 在SWARM(覆盖)中运行的多节点网络上部署BNA
问题:我们正试图在运行于SWARM的多节点网络上部署bna 我们正在使用Hyperledger Composer创建链码 我们有两个虚拟机,分别是VM1和VM2 VM1和VM2通过SWARM作为管理者连接。 我们已经设置了一个名为“我的网络”的覆盖群名称 VM1将这些docker容器都部署在我的网络上 -order.example.com -ca.example.com -peer0.org1.example.com -couchdb0 VM2在我的网络上部署了这些docker容器 -peer1.org1.example.com -couchdb1 现在我们的connection.json如下所示。用于创建PeerAdmin卡Hyperledger fabric 在SWARM(覆盖)中运行的多节点网络上部署BNA,hyperledger-fabric,hyperledger,docker-swarm,hyperledger-composer,Hyperledger Fabric,Hyperledger,Docker Swarm,Hyperledger Composer,问题:我们正试图在运行于SWARM的多节点网络上部署bna 我们正在使用Hyperledger Composer创建链码 我们有两个虚拟机,分别是VM1和VM2 VM1和VM2通过SWARM作为管理者连接。 我们已经设置了一个名为“我的网络”的覆盖群名称 VM1将这些docker容器都部署在我的网络上 -order.example.com -ca.example.com -peer0.org1.example.com -couchdb0 VM2在我的网络上部署了这些docker容器 -peer1
{
"name": "hlfv1",
"x-type": "hlfv1",
"x-commitTimeout": 300,
"version": "1.0.0",
"client": {
"organization": "Org1",
"connection": {
"timeout": {
"peer": {
"endorser": "300",
"eventHub": "300",
"eventReg": "300"
},
"orderer": "300"
}
}
},
"channels": {
"composerchannel": {
"orderers": [
"orderer.example.com"
],
"peers": {
"peer0.org1.example.com": {},
"peer1.org1.example.com": {}
}
}
},
"organizations": {
"Org1": {
"mspid": "OrgMSP",
"peers": [
"peer0.org1.example.com",
"peer1.org1.example.com"
],
"certificateAuthorities": [
"ca.example.com"
]
}
},
"orderers": {
"orderer.example.com": {
"url": "grpc://<pee1IP>:7050"
}
},
"peers": {
"peer0.org1.example.com": {
"url": "grpc://<pee1IP>:7051",
"eventUrl": "grpc://<pee1IP>:7053"
},
"peer1.org1.example.com": {
"url": "grpc://<pee2IP>:8051",
"eventUrl": "grpc://<pee2IP>:8053"
}
},
"certificateAuthorities": {
"ca.example.com": {
"url": "http://<pee1IP>:7054",
"caName": "ca.example.com"
}
}
}
{
“名称”:“hlfv1”,
“x型”:“hlfv1”,
“x-commitTimeout”:300,
“版本”:“1.0.0”,
“客户”:{
“组织”:“Org1”,
“联系”:{
“超时”:{
“同行”:{
“背书人”:“300”,
“eventHub”:“300”,
“eventReg”:“300”
},
“订购方”:“300”
}
}
},
“频道”:{
“作曲家频道”:{
“订购方”:[
“order.example.com”
],
“同行”:{
“peer0.org1.example.com”:{},
“peer1.org1.example.com”:{}
}
}
},
“组织”:{
“Org1”:{
“mspid”:“OrgMSP”,
“同行”:[
“peer0.org1.example.com”,
“peer1.org1.example.com”
],
“认证机构”:[
“ca.example.com”
]
}
},
“订购方”:{
“order.example.com”:{
“url”:“grpc://:7050”
}
},
“同行”:{
“peer0.org1.example.com”:{
“url”:“grpc://:7051”,
“事件URL”:“grpc://:7053”
},
“peer1.org1.example.com”:{
“url”:“grpc://:8051”,
“事件URL”:“grpc://:8053”
}
},
“认证机构”:{
“ca.example.com”:{
“url”:“http://:7054”,
“caName”:“ca.example.com”
}
}
}
当我们只有一个虚拟机,并且我们能够成功地在网络上部署bna时,整个过程都会运行
但是,当我们向my net添加另一个VM时,我们无法在网络上安装bna
我们认为我们无法在connection.json中放入正确的IP,因为我们失败了
注意事项:
我们能够在Peer0上创建通道,并且能够成功地将Peer0和peer1连接到同一通道中。
我们确实认为这可能是connection.json问题,但我们无法找出错误所在
这是我们在安装BNA时看到的错误
安装业务网络。这可能需要一分钟。。。错误:错误
正在尝试安装业务网络。错误:没有来自任何服务器的有效响应
同龄人。来自尝试的对等通信的响应为错误:错误:14
不可用:连接失败
我一直在使用docker swarm处理此类问题。为了能够使用不同的主机启动和运行这种infra,我现在使用Rancher来管理docker容器之间的网络通信。希望这对您有所帮助。尝试将频道的值更改为:
"channels": {
"composerchannel": {
"orderers": [
"orderer.example.com"
],
"peers": {
"peer0.org1.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
},
"peer1.org1.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
}
}
}
}
好的,应用这个只会识别同龄人的行为。您是否在swarm网络上进行过.bna部署,因为据我所知,您描述的对等设置都是默认设置,即使您不使用这些设置,它们也已经暗示了。是的,与您的设置相同,一个组织中的两个对等节点使用docker swarm。您创建的频道的名称是什么?由于您已成功创建频道,这意味着网络配置正常。它实际上在connection.json设置中。你真的确定你使用的端口是正确的吗?根据rocket chat-此错误
错误:14不可用:连接失败
通常会立即返回,没有明显延迟,这意味着客户端(可能是composer network安装
)找不到结构服务器(对等方)在connection.json文件中指定的地址-这看起来像是网络解析/路由错误。在swarm模式下运行docker需要打开的端口很少。您可以在此处找到这些引用:。