【问题标题】:cordapp-example on a VM does not appear to start correctlyVM 上的 cordapp-example 似乎无法正确启动
【发布时间】:2017-11-11 02:33:55
【问题描述】:

我正在尝试将 cordapp-example 部署到 Google Compute Engine VM (Ubuntu 16.04)。我 am 使用 OpenJDK(我知道,但我无法使用 Oracle JDK)。我已尝试遵循前置要求。

但是,我认为“在另外 8 个终端窗口启动时不要单击”的建议至少会导致一个问题。 (这不会通过 ssh'ing 到远程 VM 发生)。

runnodes 永远不会导致 Webserver started up in XX.X secNode for “NodeC” started up and registered in XX.XX sec 并且(因此)不会导致进程监听 :10007。

控制台输出:

Starting nodes in /home/dazwilkin/cordapp-example/kotlin-source/build/nodes
Starting corda.jar in /home/dazwilkin/cordapp-example/kotlin-source/build/nodes/PartyB on debug port 5005
Starting corda-webserver.jar in /home/dazwilkin/cordapp-example/kotlin-source/build/nodes/PartyB on debug port 5006
Starting corda.jar in /home/dazwilkin/cordapp-example/kotlin-source/build/nodes/Controller on debug port 5007
Starting corda.jar in /home/dazwilkin/cordapp-example/kotlin-source/build/nodes/PartyC on debug port 5008
Starting corda-webserver.jar in /home/dazwilkin/cordapp-example/kotlin-source/build/nodes/PartyC on debug port 5009
Starting corda.jar in /home/dazwilkin/cordapp-example/kotlin-source/build/nodes/PartyA on debug port 5010
Starting corda-webserver.jar in /home/dazwilkin/cordapp-example/kotlin-source/build/nodes/PartyA on debug port 5011
Started 7 processes
Finished starting nodes
Listening for transport dt_socket at address: 5011
Listening for transport dt_socket at address: 5009
Listening for transport dt_socket at address: 5006
Listening for transport dt_socket at address: 5005
Listening for transport dt_socket at address: 5008
Listening for transport dt_socket at address: 5010
Listening for transport dt_socket at address: 5007
Unknown command line arguments: no-local-shell is not a recognized option
Unknown command line arguments: no-local-shell is not a recognized option
Unknown command line arguments: no-local-shell is not a recognized option


   ______               __
  / ____/     _________/ /___ _
 / /     __  / ___/ __  / __ `/         I had an account with a bank in the
/ /___  /_/ / /  / /_/ / /_/ /          North Pole, but they froze all my assets 
\____/     /_/   \__,_/\__,_/

--- Corda Open Source 1.0.0 (31be2a4) -----------------------------------------------



   ______               __
  / ____/     _________/ /___ _
 / /     __  / ___/ __  / __ `/         I had an account with a bank in the
/ /___  /_/ / /  / /_/ / /_/ /          North Pole, but they froze all my assets 
\____/     /_/   \__,_/\__,_/

--- Corda Open Source 1.0.0 (31be2a4) -----------------------------------------------




   ______               __
  / ____/     _________/ /___ _
 / /     __  / ___/ __  / __ `/         What you can buy for a dollar these
/ /___  /_/ / /  / /_/ / /_/ /          days is absolute non-cents! 
\____/     /_/   \__,_/\__,_/

--- Corda Open Source 1.0.0 (31be2a4) -----------------------------------------------




   ______               __
  / ____/     _________/ /___ _
 / /     __  / ___/ __  / __ `/         It's not who you know, it's who you know
/ /___  /_/ / /  / /_/ / /_/ /          knows what you know you know.
\____/     /_/   \__,_/\__,_/

--- Corda Open Source 1.0.0 (31be2a4) -----------------------------------------------



Logs can be found in                    : /home/dazwilkin/cordapp-example/kotlin-source/build/nodes/PartyA/logs
Logs can be found in                    : /home/dazwilkin/cordapp-example/kotlin-source/build/nodes/PartyB/logs
Logs can be found in                    : /home/dazwilkin/cordapp-example/kotlin-source/build/nodes/Controller/logs
Logs can be found in                    : /home/dazwilkin/cordapp-example/kotlin-source/build/nodes/PartyC/logs
Database connection url is              : jdbc:h2:tcp://10.138.0.5:33219/node
Database connection url is              : jdbc:h2:tcp://10.138.0.5:41313/node
Database connection url is              : jdbc:h2:tcp://10.138.0.5:36079/node
Database connection url is              : jdbc:h2:tcp://10.138.0.5:38015/node
Incoming connection address             : localhost:10002
Incoming connection address             : localhost:10008
Incoming connection address             : localhost:10005
Incoming connection address             : localhost:10011
Listening on port                       : 10002
RPC service listening on port           : 10003
Providing network services              : corda.notary.validating
Loaded CorDapps                         : kotlin-source-0.1, corda-finance-1.0.0, corda-core-1.0.0
Node for "Controller" started up and registered in 46.26 sec
Listening on port                       : 10008
RPC service listening on port           : 10009
Listening on port                       : 10011
RPC service listening on port           : 10012
Listening on port                       : 10005
RPC service listening on port           : 10006
Loaded CorDapps                         : kotlin-source-0.1, corda-finance-1.0.0, corda-core-1.0.0
Node for "PartyB" started up and registered in 51.99 sec
Loaded CorDapps                         : kotlin-source-0.1, corda-finance-1.0.0, corda-core-1.0.0
Node for "PartyC" started up and registered in 52.75 sec
Loaded CorDapps                         : kotlin-source-0.1, corda-finance-1.0.0, corda-core-1.0.0
Node for "PartyA" started up and registered in 53.48 sec

ss --tcp --listening 过滤和排序结果:

 *:5005
 *:5007
 *:5008
 *:5010
 *:ssh
:::10002
:::10003
:::10005
:::10006
:::10008
:::10009
:::10011
:::10012
:::33219
:::36079
:::38015
:::41313
:::ssh

物有所值:

  • ss 未报告调试端口:5006、5009、5011
  • ss 没有引用正在使用的 10007;无法浏览到它
  • 这个错误看起来不太好no-local-shell is not a recognized option

我不清楚我可以调试什么。 runnodes 是不透明的,我没有看到表明节点丢失的明显错误。

任何指针将不胜感激。

附:似乎确实有 8 个 java 进程在运行其中 4 个包含一个标志 --no-local-shell,所以也许这与 OpenJDK 有所不同,也许是一个|问题?

【问题讨论】:

  • 你在针对哪个 shell 运行? runnodes 脚本可能需要调整...
  • 感谢@RichardGreen 我正在使用 bash。 runnodes 似乎主要只是打了一个电话java -jar runnodes.jar,这对我来说是不透明的。您能提供的任何帮助都会很棒。

标签: corda


【解决方案1】:

我也遇到过这个问题。这是我正在研究的东西,但与此同时,一个简单的解决方法是通过在节点目录中运行以下命令来手动运行网络服务器(我认为是 kotlin-source/build/nodes?):

find . -name corda-webserver.jar -execdir sh -c 'java -jar {} &' \;

顺便说一句,除了 Oracle JDK 之外,Corda 还针对 OpenJDK 的 Azul 版本进行了测试。我不认为这个问题与 OpenJDK 有关,我认为这是 runnodes.jar 中的时间问题。

【讨论】:

  • 它有效,谢谢...所以我需要运行runnodes,然后运行您的解决方案,该解决方案(重新)执行派对[A|B|C] 的corda-webserver.jar
猜你喜欢
  • 2019-02-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-10-22
  • 2011-09-10
  • 2017-09-10
  • 1970-01-01
相关资源
最近更新 更多