Hyperledger fabric & Composer - 多对等部署
Hyperledger fabric & Composer - multi peer deployment
我创建了 3 个组织,其中有 3 个对等点(每个 1 个对等点)、3 个 CA 和 1 个订购者。所有这些都连接在一个通道上。我可以在 Hyperledger Fabric 上启动这个网络 & 运行。我还通过部署结构示例链代码进行了测试。它部署在所有 3 个节点上,安装链码,查询链码功能正常工作。
我为同一个 3 个组织配置了一个作曲家模块,具有 3 个对等管理卡及其相应的连接配置文件,所有 3 个组织的背书策略作为签名机构。当我部署 composer .bna 时失败并出现以下错误
⠸ Starting business network definition. This may take a minute...(node:29523) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: The event hub has not been connected to the event source
(node:29523) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: The event hub has not been connected to the event source
✖ Starting business network definition. This may take a minute...
Error: Error trying to instantiate composer runtime. Error: The event hub has not been connected to the event source
请就多 Org Fabric 和 Composer 设置的解决方案提出建议
会检查您的连接配置文件 - 特别是 "eventURL":
- 您不应该在用于构建业务网卡的连接配置文件中包含来自 'other orgs' 的同行的 eventURL
可以在商业网络上进行交易。例如
"peers": [
{
"requestURL": "grpcs://hostname:9051",
"eventURL": "grpcs://localhost:9053",
"hostnameOverride": "peer0.org.domain.abc",
"cert": "-----BEGIN CERTIFICATE-----\nMblahCCAfe....QNH\n3spjHtiblfJekAgO78lvGEY25Lw=\n-----END CERTIFICATE-----\n"
},
{
"requestURL": "grpcs://hostname:10051",
"eventURL": "grpcs://localhost:10053",
"hostnameOverride": "peer1.org.domain.abc",
"cert": "-----BEGIN CERTIFICATE-----\nMIICUD....NH\n3jHtiblfJekxh8lvGEY25Lw=\n-----END CERTIFICATE-----\n"
},
{
"requestURL": "grpcs://hostname:14051",
"hostnameOverride": "peer0.other.domain.abc",
"cert": "-----BEGIN CERTIFICATE-----\nMIICVssC....4nR9w==\n-----END CERTIFICATE-----\n"
},
{
"requestURL": "grpcs://hostname:15051",
"hostnameOverride": "peer1.other.domain.abc",
"cert": "-----BEGIN CERTIFICATE-----\nMIIfDT......R9w==\n-----END CERTIFICATE-----\n"
}
]
我从连接配置文件中删除了 eventurl,它起作用了。感谢您的回复。
我创建了 3 个组织,其中有 3 个对等点(每个 1 个对等点)、3 个 CA 和 1 个订购者。所有这些都连接在一个通道上。我可以在 Hyperledger Fabric 上启动这个网络 & 运行。我还通过部署结构示例链代码进行了测试。它部署在所有 3 个节点上,安装链码,查询链码功能正常工作。 我为同一个 3 个组织配置了一个作曲家模块,具有 3 个对等管理卡及其相应的连接配置文件,所有 3 个组织的背书策略作为签名机构。当我部署 composer .bna 时失败并出现以下错误
⠸ Starting business network definition. This may take a minute...(node:29523) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: The event hub has not been connected to the event source
(node:29523) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: The event hub has not been connected to the event source
✖ Starting business network definition. This may take a minute...
Error: Error trying to instantiate composer runtime. Error: The event hub has not been connected to the event source
请就多 Org Fabric 和 Composer 设置的解决方案提出建议
会检查您的连接配置文件 - 特别是 "eventURL":
- 您不应该在用于构建业务网卡的连接配置文件中包含来自 'other orgs' 的同行的 eventURL
可以在商业网络上进行交易。例如
"peers": [
{
"requestURL": "grpcs://hostname:9051",
"eventURL": "grpcs://localhost:9053",
"hostnameOverride": "peer0.org.domain.abc",
"cert": "-----BEGIN CERTIFICATE-----\nMblahCCAfe....QNH\n3spjHtiblfJekAgO78lvGEY25Lw=\n-----END CERTIFICATE-----\n"
},
{
"requestURL": "grpcs://hostname:10051",
"eventURL": "grpcs://localhost:10053",
"hostnameOverride": "peer1.org.domain.abc",
"cert": "-----BEGIN CERTIFICATE-----\nMIICUD....NH\n3jHtiblfJekxh8lvGEY25Lw=\n-----END CERTIFICATE-----\n"
},
{
"requestURL": "grpcs://hostname:14051",
"hostnameOverride": "peer0.other.domain.abc",
"cert": "-----BEGIN CERTIFICATE-----\nMIICVssC....4nR9w==\n-----END CERTIFICATE-----\n"
},
{
"requestURL": "grpcs://hostname:15051",
"hostnameOverride": "peer1.other.domain.abc",
"cert": "-----BEGIN CERTIFICATE-----\nMIIfDT......R9w==\n-----END CERTIFICATE-----\n"
}
]
我从连接配置文件中删除了 eventurl,它起作用了。感谢您的回复。