Corda throws error trying to generate the basic nodes - corda

Am trying to generate the basic nodes- PartyA, PartyB and Notary on Ubuntu 14 by running ./gradlew deployNodes or even ./gradlew clean deployNodes. The error reads:
... still waiting. If this is taking longer than usual, check the node logs.
Error while generating node info file /cordapp-template-java/build/nodes/Notary/logs
Error while generating node info file /cordapp-template-java/build/nodes/PartyB/logs
Error while generating node info file /cordapp-template-java/build/nodes/PartyA/logs
Task :deployNodes FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':deployNodes'.
Error while generating node info file. Please check the logs in /cordapp-template-java/build/nodes/Notary/logs.
Error while generating node info file. Please check the logs in /cordapp-template-java/build/nodes/Notary/logs.
The error logs do not provide any indication of error.

I have personally run into the above question myself. From what I saw, it seems it was a random incident on the Unix based machine.
The issue was resolved after I moved the project to the different location. It is absurd. But I have never ran into this issue ever again.

Related

Corda 4.3 compilation issues

Trying to compile Corda from scratch. I cloned version 4.3 from Github. Details and error codes below.I am using Oracle java version 1.8. I have asked this question on slack as well but didn't find anyone who has faced this issue before.
Task :node-api-tests:test
net.corda.nodeapitests.internal.crypto.X509UtilitiesTest > create valid server certificate chain FAILED
java.security.cert.CertificateException at X509UtilitiesTest.kt:166
net.corda.nodeapitests.internal.crypto.X509UtilitiesTest > create valid self-signed CA certificate FAILED
java.security.cert.CertificateException at X509UtilitiesTest.kt:131
46 tests completed, 2 failed
Task :node-api-tests:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ‘:node-api-tests:test’.
So it looks like you're trying to build Corda's source code. Most of the time you really won't need to do this. I'd recommend instead just taking a look at the Corda samples as they use gradle which will download the jars and compile the samples for you.
Here's a link to some of those sample repo's so you can try building off of them.
https://github.com/corda/samples-kotlin
https://github.com/corda/samples-java
All of them compile and run the same way so it shouldn't be too difficult to get running.
./gradlew deployNodes
and then
./build/nodes/runnodes

Execution failed for task ':kotlin-source:compileKotlin'

I tried to run the cordapp-example from the command prompt. But when I input the "gradlew.bat deployNodes" command, I got the error as below.
Execution failed for task ':kotlin-source:compileKotlin'.
Could not resolve all dependencies for configuration ':kotlin-source:compileClasspath'.
Could not determine artifacts for org.jolokia:jolokia-war:1.3.7
Could not get resource 'https://jcenter.bintray.com/org/jolokia/jolokia-war/1.3.7/jolokia-war-1.3.7.war'.
Could not HEAD 'https://jcenter.bintray.com/org/jolokia/jolokia-war/1.3.7/jolokia-war-1.3.7.war'.
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
I had done the "keytool -importcert" command to import the certificate of jolokia-war into java cacerts, but the error was still there.
Does anyone know how to solve the problem?
The error message indicates that the compilation failed because your machine was unable to download the resource at this location: https://jcenter.bintray.com/org/jolokia/jolokia-war/1.3.7/jolokia-war-1.3.7.war.
This URL works for me and I was able to download the resource. You are most likely behind a firewall or otherwise unable to download this resource. You need to make your machine able to access this resource to compile and deploy the node.

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

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.

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.

Execution failed for task ':backend:appengineEndpointsGetClientLibs'

all. I've implemented a test GCM app for testing.
Cause I need a server to manage the message.
So I choice the Google Cloud Platform.
Below is the error message I've seen when building.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':backend:appengineEndpointsGetClientLibs'.
> There was an error running endpoints command get-client-lib: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.38 secs
unable to find valid certification path to requested target
下午 04:12:10: External task execution finished ':backend:assemble'.
It seems that i don't have the valid certification.
I try to find this issue on the internet from http://magicmonster.com/kb/prg/java/ssl/pkix_path_building_failed.html
Maybe I should add the CA in the path to cacerts.
But I'm confusing that where is the CA of this App?
Could anyone help me to solve this question?
Thanks for your kindly help.
BR
Brian

Resources