无法在多台机器上运行节点 [corda]

4
我正在尝试使用Java版本的源代码(源代码:https://github.com/corda/samples/cordapp-example)在多台计算机上运行CORDA区块链网络,但是无法连接单个网络中的节点。
如果有人能指导任何缺失的步骤或检查连接失败的方法,我们将不胜感激。谢谢!
我按照https://docs.corda.net/tutorial-cordapp.html#running-nodes-across-machines 的说明进行网络设置,并形成以下网络:
- 机器1:公证人,PartyA,运行节点,运行节点.bat,运行节点.jar - 机器2:PartyB,运行节点,运行节点.bat,运行节点.jar - 网络启动程序工具: https://www.corda.net/develop/resources.html Notary_node.conf
devMode=true
myLegalName="O=Notary,L=London,C=GB"
notary {
    validating=false
}
p2pAddress="IP_address_of_machineA:10000"
rpcSettings {
    address="localhost:10001"
    adminAddress="localhost:10002"
}

PartyA_node.conf

devMode=true
myLegalName="O=PartyA,L=London,C=GB"
p2pAddress="IP_address_of_machineA:10004"
rpcSettings {
    address="localhost:10005"
    adminAddress="localhost:10006"
}
security {
    authService {
        dataSource {
            type=INMEMORY
            users=[
                {
                    password=test
                    permissions=[
                        ALL
                    ]
                    user=user1
                }
            ]
        }
    }
}

PartyB_node.conf

devMode=true
myLegalName="O=PartyB,L=New York,C=US"
p2pAddress="IP_address_of_machineB:10008"
rpcSettings {
    address="localhost:10009"
    adminAddress="localhost:10010"
}
security {
    authService {
        dataSource {
            type=INMEMORY
            users=[
                {
                    password=test
                    permissions=[
                        ALL
                    ]
                    user=user1
                }
            ]
        }
    }
}

我在节点日志中看到以下错误:
[ERROR] 15:18:45+0800 [Node thread-1] corda.flow.processEventsUntilFlowIsResumed - Flow interrupted while waiting for events, aborting immediately {actor_id=internalShell, actor_owning_identity=O=PartyA, L=London, C=GB, actor_store_id=NODE_CONFIG, fiber-id=10000003, flow-id=86f29b02-f5d2-4eac-9803-1de797cb43b3, invocation_id=e3c19de7-1052-412f-bc2a-05c1014f7fc3, invocation_timestamp=2019-05-21T06:57:58.807Z, origin=internalShell, session_id=7639f617-f126-4e0c-b4d1-5515f62a85cd, session_timestamp=2019-05-21T06:56:57.730Z, thread-id=181}

1
你能试着将localhost改为机器IP吗? - Akkapong Kajornwongwattana
正如Akkapong所提到的,您必须指定每台机器的ipAddress。此外,假设所有节点都在同一本地网络下运行,您的机器应该打开这些端口以便在本地网络上进行访问。 - XP.
1个回答

0

尝试在两个节点的node.conf中使用以下内容:

rpcSettings {
    address="0.0.0.0:10001"
    adminAddress="0.0.0.0:10002"
}


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接