我已经在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 {}
答案 0 :(得分:0)
deployNodes
引导网络。简而言之,生成的节点彼此了解,一无所知。在不运行deployNodes
的情况下将新节点添加到网络将使原始节点相互通信,但它们将看不到新节点。新节点也将看不到原始节点。
要解决此问题,您可以使用deployNodes
重建网络。
或者,您将需要一个网络地图,该网络地图将在节点加入网络时处理身份的分布。可以找到here的实现。