我正在尝试通过使用Java版本源代码(源代码:https://github.com/corda/samples/cordapp-example)在机器上运行CORDA区块链网络,但是无法在单个网络中连接节点。

如果有人可以建议任何缺少的步骤或方法来检查连接失败,将非常感激。谢谢!

我按照https://docs.corda.net/tutorial-cordapp.html#running-nodes-across-machines的说明进行网络设置并形成网络,如下所示:


机器1:公证人,PartyA,runnodes,runnodes.bat,runnodes.jar
机器2:PartyB,runnodes,runnodes.bat,runnodes.jar
网络Boostrapper工具: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}

最佳答案

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



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

10-04 12:31