【问题标题】:Corda: Newly added Corda node on a local machine can't be reached by other nodesCorda:本地机器上新添加的 Corda 节点,其他节点无法访问
【发布时间】:2019-11-16 05:06:40
【问题描述】:

我在 Linux 实例上创建了一个 3 节点 Corda 网络,可以启动和完成网络的 3 个节点之间的流。但是,当我在同一个 Linux 实例上向网络添加第 4 个节点时,现有网络中的任何节点都无法完成与第 4 个节点的流。

这是现有节点的配置:

myLegalName="O=PartyA,L=Mumbai,C=IN"
p2pAddress="198.136.234.245:10005"
rpcSettings {
    address="localhost:10006"
    adminAddress="localhost:10046"
}
rpcUsers=[
    {
        password=test
        permissions=[
            ALL
        ]
        user=user1
    }
]
dataSourceProperties = {
    dataSourceClassName = "org.postgresql.ds.PGSimpleDataSource"
    "dataSource.url" = "jdbc:postgresql://10.0.0.4:5432/postgres"
    "dataSource.user" = test2
    "dataSource.password" = test2p
}

database = {
    transactionIsolationLevel = READ_COMMITTED
    schema = test2
}

jarDirs = ['/home/ubuntu/java/postgres']
webAddress="198.136.234.245:10007"

Here is the configuration of a newly added node:

myLegalName="O=PartyB,L=Delhi,C=IN"
p2pAddress="198.136.234.245:10014"
rpcSettings {
    address="localhost:10015"
    adminAddress="localhost:10055"
}
rpcUsers=[
    {
        password=test
        permissions=[
            ALL
        ]
        user=user1
    }
]
dataSourceProperties = {
    dataSourceClassName = "org.postgresql.ds.PGSimpleDataSource"
    "dataSource.url" = "jdbc:postgresql://10.0.0.4:5432/postgres"
    "dataSource.user" = test5
    "dataSource.password" = test5p
}

database = {
    transactionIsolationLevel = READ_COMMITTED
    schema = test5
}

jarDirs = ['/home/ubuntu/java/postgres']
webAddress="198.136.234.245:10016"

Here's the message in PartyA's log file:
[INFO ] 2019-07-05T13:27:02,457Z [Node thread-1] flow.[ae2549c0-9bfd-4226-9625-653bc79322b0].initiateSession - Initiating flow session with party O=PartyB, L=Delhi, C=IN. Session id for tracing purposes is SessionId(toLong=5939067804807479907). {}



[INFO ] 2019-07-05T13:27:14,277Z [nioEventLoopGroup-2-4] netty.AMQPClient.operationComplete - Failed to connect to 198.136.234.245:10014 {}

...

[INFO ] 2019-07-05T13:27:15,278Z [nioEventLoopGroup-2-5] netty.AMQPClient.run - Retry connect to 198.136.234.245:10014 {}

【问题讨论】:

    标签: corda


    【解决方案1】:

    deployNodes 引导网络。简而言之,生成的节点彼此了解,而不是其他。在不运行deployNodes 的情况下将新节点添加到网络将使原始节点相互通信,但他们不会看到新节点。新节点也不会看到原来的节点。

    要解决此问题,您可以使用 deployNodes 重建网络。

    或者,您将需要一个网络图来处理节点加入网络时的身份分布。可以在here 找到一个实现。

    【讨论】:

    • 谢谢你,丹!我会尝试网络地图,当我们进入生产环境并添加节点时,我不想不断运行 deployNodes。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-28
    • 1970-01-01
    • 2019-03-30
    • 2018-10-01
    相关资源
    最近更新 更多