【问题标题】:Fail to run nodes across machines [corda]无法跨机器运行节点 [corda]
【发布时间】:2019-05-21 09:59:40
【问题描述】:

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

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

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

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}

【问题讨论】:

  • 能不能把localhost改成机器ip
  • 正如 Akkapong 所说,您必须指定每台机器的 ipAddress。此外,假设所有节点都在同一个本地网络下运行,您的计算机应该打开这些端口以通过本地网络访问。

标签: open-source blockchain corda


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 2020-07-19
    • 1970-01-01
    • 2019-11-16
    • 2020-03-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多