open-source - 无法跨机器运行节点 [corda]
问题描述
我正在尝试使用 java 版本源代码(源代码: https ://github.com/corda/samples/cordapp-example)跨机器运行 CORDA 区块链网络,但无法连接单个网络中的节点。
如果有人可以建议任何缺少的步骤或检查连接失败的方法,那将非常感激。谢谢!
我按照https://docs.corda.net/tutorial-cordapp.html#running-nodes-across-machines的说明进行网络设置并形成如下网络:
- 机器1:公证人、甲方、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"
}
推荐阅读
- javascript - AngularJS + webpack如何散列模板html
- python - 使用 einsum 在傅立叶域中实现 conv2d --> ValueError: einstein sum subscripts string contains too many subscripts for operand 0
- reactjs - 如何在
标签? - c++ - 试图在 C++ 中重载后自增运算符,但答案与预期不符
- android - 使用 Android 应用程序将表单发送到电子邮件
- sql - 某些行的期初余额错误
- javascript - 在 React 中没有在函数内部获取 ref
- git - 发现路径下有变化的分支
- javascript - JavaScript API for Office - 如何使用控制台?
- python - 我如何在 google colab 中解压缩预训练的 word2vec?