Corda 3 deployNodes - Node in Notary exited with 1 when generating its node-info - corda

I am trying to run the Example CorDapp (https://github.com/corda/cordapp-example) on Corda 3. When I try to run the ./gradlew deployNodes step, I get the following error:
Execution failed for task ':java-source:deployNodes'.
> Node in Notary exited with 1 when generating its node-info - see logs in [REDACTED]/cordapp-example/java-source/build/nodes/Notary/logs
* Try:
Run with --info and --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':java-source:deployNodes'.
at ...
Caused by: java.lang.IllegalStateException: Node in Notary exited with 1 when generating its node-info - see logs in [REDACTED]/cordapp-example/java-source/build/nodes/Notary/logs
at net.corda.nodeapi.internal.network.NetworkBootstrapper$gatherNodeInfoFiles$future$1.invoke(NetworkBootstrapper.kt:136)
at net.corda.nodeapi.internal.network.NetworkBootstrapper$gatherNodeInfoFiles$future$1.invoke(NetworkBootstrapper.kt:44)
at net.corda.core.internal.concurrent.ValueOrException$DefaultImpls.capture(CordaFutureImpl.kt:107)
at net.corda.core.internal.concurrent.OpenFuture$DefaultImpls.capture(CordaFutureImpl.kt
at net.corda.core.internal.concurrent.CordaFutureImpl.capture(CordaFutureImpl.kt:119)
at net.corda.core.internal.concurrent.CordaFutureImplKt$fork$$inlined$also$lambda$1.run(CordaFutureImpl.kt:22)
Why is the network failing to be created?

I encountered this when old builds with old names were present in the cordapp. Looking at the logs at "/cordapp-example/java-source/build/nodes/Notary/logs/" will reveal which old node is causing problems.
Running ./gradlew clean deployNode clears the issue.

This can also be caused by having the wrong Java version. Ensure your Java version is in-line with the requirements here: https://docs.corda.net/getting-set-up.html#software-requirements.

Related

Failure when running deployNodes

Sporadically, I get the following error message from running the Corda deployNodes task:
* What went wrong:
Execution failed for task ':deployNodes'.
> classLoader.getResourceAsStream(storeResourceName) must not be null
How can I fix this issue?
This issue is caused by a zombie Java process. Try killing any Java processes and trying again.

In Corda, Could not find method networkMap exception

I am following instructions on https://docs.corda.net/releases/release-V1.0/deploying-a-node.html to add a network map to the deployNodes task in
my build.gradle file. But when I run gradlew deployNodes, it gives the following error. I have tried with Cordform plugin versions 3.1.0 and 3.2.1 . Am I missing anything or any other setup that needs to be done?
FAILURE: Build failed with an exception.
* Where:
Build file '/home/ubuntu/corda/build.gradle' line: 103
* What went wrong:
A problem occurred evaluating root project 'corda'.
> Could not find method networkMap() for arguments on task ':deployNodes' of type net.corda.plugins.Cordform.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
Corda 3 removed the concept of a special network map node that serves the role of distributing the network map to the other nodes. Instead, the network map is now a collection of signed NodeInfo files distributed via HTTP. You can read more about this change here.
As a result, the networkMap option no longer exists in Cordform.

Execution fails for task "runExampleClientRPCJava"

I'm following the CorDapp example tutorial from the main website and am running into problems when trying to run the example RPC client via the command line on Linux
When running the gradle task ./gradlew runExampleClientRPCJava , I get the following errors.
> Task :java-source:runExampleClientRPCJava
I 13:47:55 1 RPCClient.logElapsedTime - Startup took 7722 msec
Exception in thread "main" ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:787)
at net.corda.client.rpc.internal.RPCClientProxyHandler.start(RPCClientProxyHandler.kt:191)
at net.corda.client.rpc.internal.RPCClient$start$1.invoke(RPCClient.kt:123)
at net.corda.client.rpc.internal.RPCClient$start$1.invoke(RPCClient.kt:86)
at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:191)
at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:183)
at net.corda.client.rpc.internal.RPCClient.start(RPCClient.kt:109)
at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:135)
at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:120)
at com.example.client.ExampleClientRPC.main(ExampleClientRPC.java:38)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':java-source:runExampleClientRPCJava'.
> Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
I can see that it can't connect to any of the servers. Does anyone know why this is and how to solve it? Has anyone run into the same problem?
The error message indicates that the client is not able to connect to the node in question. This is most likely because the node it is trying to connect to has failed to start.
Try restarting the node and trying to connect again.

Execution failed for task ':java-source:deployNodes'. (Installing Corda). Any Suggestions?

I am trying to install Corda onto my local laptop. I get a build error as described below. Can anyone help?
I am running this -
~/kotlinapps/cordapp-example$ ./gradlew deployNodes --scan
Task :java-source:deployNodes Bootstrapping local network in /Users/satoshimaca/kotlinapps/cordapp-example/java-source/build/nodes
Node config files found in the root directory - generating node
directories Generating directory for Notary Generating directory for
PartyA Generating directory for PartyC Generating directory for PartyB
Nodes found in the following sub-directories: [Notary, PartyA, PartyC,
PartyB] Waiting for all nodes to generate their node-info files...
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':java-source:deployNodes'.
Node in Notary exited with 1 when generating its node-info - see logs in
/Users/satoshimaca/kotlinapps/cordapp-example/java-source/build/nodes/Notary/logs
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 2m 0s 5 actionable tasks: 5 executed
~/kotlinapps/cordapp-example$ ./gradlew deployNodes --scan Download
https://plugins.gradle.org/m2/com/gradle/build-scan-plugin/1.10.3/build-scan-plugin-1.10.3.pom
Download
https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.1.60/kotlin-gradle-plugin-1.1.60.pom
Download
https://plugins.gradle.org/m2/com/gradle/build-scan-plugin/1.10.3/build-scan-plugin-1.10.3.jar
Download
https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.1.60/kotlin-gradle-plugin-1.1.60.jar
Task :java-source:deployNodes Bootstrapping local network in /Users/satoshimaca/kotlinapps/cordapp-example/java-source/build/nodes
Node config files found in the root directory - generating node
directories Generating directory for Notary Generating directory for
PartyA Generating directory for PartyC Generating directory for PartyB
Nodes found in the following sub-directories: [Notary, PartyA, PartyC,
PartyB] Waiting for all nodes to generate their node-info files...
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':java-source:deployNodes'.
Node in Notary exited with 1 when generating its node-info - see logs in
/Users/satoshimaca/kotlinapps/cordapp-example/java-source/build/nodes/Notary/logs
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 3s
5 actionable tasks: 2 executed, 3 up-to-date
Publishing a build scan to scans.gradle.com requires accepting the
Terms of Service defined at https://scans.gradle.com/terms-of-service.
Do you accept these terms? [yes, no] Gradle Cloud Services license
agreement accepted.
Publishing build scan... https://gradle.com/s/u5os3dq6zfl3a
It's hard to know what's going on here. Please post the notary node's logs under /Users/satoshimaca/kotlinapps/cordapp-example/java-source/build/nodes/Notary/logs so we can help better.
However, two possibilities are:
Old builds are corrupting the process. Run ./gradlew clean deployNodes instead of ./gradlew deployNodes
You are using an incompatible JVM version. You need to use version 8u131 or above of the Oracle JDK 8 JVM
Downgrading from JDK 10 to 8 worked for me. Here's the download link:
Oracle Java SE Development Kit

Corda R3 DeployNodes command is failing for example cordapp

I have downloaded the source code of example cordapp from here.
I am getting following error when I give the command :
gradle deployNodes.
Please guide me on what can be done.
Note: This is Corda V3.
> Task :java-source:deployNodes
Bootstrapping local network in C:\Blockchain\cordapp-example-release-V3\java-source\build\nodes
Node config files found in the root directory - generating node directories
Generating directory for Notary
Generating directory for PartyA
Generating directory for PartyB
Generating directory for PartyC
Nodes found in the following sub-directories: [Notary, PartyA, PartyB, PartyC]
Waiting for all nodes to generate their node-info files...
Distributing all node info-files to all nodes
Gathering notary identities
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':java-source:deployNodes'.
> java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unknown constant pool tag [I#5d453b56 in classfile module-info.class (element size unknown, cannot continue reading class. Please report this on the FastClasspathScanner GitHub page.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 45s
5 actionable tasks: 2 executed, 3 up-to-date
Also faced the same issue on V2 to V3 migration. I had to downgrade Gradle from 4.5.1 to 4.1 in my project to get it working again.
This is fixed in Corda 3.1. Upgrade notes here: https://docs.corda.net/upgrade-notes.html#v3-0-to-v3-1.

Resources