Repository navigation
Closed
Description
Using current JDK installed in EV3:
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-ev3)
OpenJDK Client VM (build 11.0.6+10-ev3, mixed mode, sharing)
Exist some problems with SSL when you try to establish a secure connection with Github:
#####################
# MAVEN EV3 SCRIPTS #
#####################
-Djavax.net.debug=all
Deploy artifact to EV3
sshpass -p maker scp -P 22 ./target/template-project-maven-0.1.0-SNAPSHOT-jar-with-dependencies.jar robot@192.168.1.151:/home/robot/
Run artifact
sshpass -p maker ssh -p 22 robot@192.168.1.151 java -jar template-project-maven-0.1.0-SNAPSHOT-jar-with-dependencies.jar -Djavax.net.debug=all
/tmp/BROKER_CLIENT_PING_4490452626536460128
2020-05-17 14:30:51 [main] WARN com.github.broker.GitClientWrapper - https://github.com/broker-game/broker-dev-environment7: Secure connection to https://github.com/broker-game/broker-dev-environment7 could not be established because of SSL problems
org.eclipse.jgit.api.errors.TransportException: https://github.com/broker-game/broker-dev-environment7: Secure connection to https://github.com/broker-game/broker-dev-environment7 could not be established because of SSL problems
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:222)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:292)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:176)
at com.github.broker.GitClientWrapper.cloneRepository(GitClientWrapper.java:49)
at com.github.broker.BrokerClient.connect(BrokerClient.java:85)
at example.PingApp.main(PingApp.java:18)
Caused by: org.eclipse.jgit.errors.TransportException: https://github.com/broker-game/broker-dev-environment7: Secure connection to https://github.com/broker-game/broker-dev-environment7 could not be established because of SSL problems
at org.eclipse.jgit.transport.TransportHttp.handleSslFailure(TransportHttp.java:675)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:576)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:359)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:105)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:91)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1260)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:211)
... 5 more
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:307)
at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:291)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:180)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1151)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1062)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1587)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1515)
at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:334)
at org.eclipse.jgit.transport.http.JDKHttpConnection.getResponseCode(JDKHttpConnection.java:85)
at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:208)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:507)
... 10 more
2020-05-17 14:30:57 [main] INFO com.github.broker.BrokerClient - 1589725852723_PING_PING.json
Exception in thread "main" java.lang.NullPointerException
at com.github.broker.GitClientWrapper.upgradeRepository(GitClientWrapper.java:68)
at com.github.broker.BrokerClient.produce(BrokerClient.java:100)
at example.PingApp.main(PingApp.java:23)
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:313)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
It is necessary to know if the issue exist with a Complete JDK:
https://ci.adoptopenjdk.net/view/ev3dev/job/eljbuild/
https://ci.adoptopenjdk.net/view/ev3dev/job/eljbuild/job/stretch-14/
Following documentation:
https://ev3dev-lang-java.github.io/docs/support/getting_started/brick.html#ev3-brick
Juan Antonio
Activity
jabrena commentedon May 17, 2020
After the installation of a complete JDK, the issue was fixed:
Program execution:
It is necessary to review what is missing in current JRI.
@JakubVanek, I believe that some jmods are missing in current JRI build. What is your opinion?
[-]SSH handshake[/-][+]Review issuw with SSH handshake with current JRI installed in EV3 Stretch.[/+]JakubVanek commentedon May 17, 2020
Related to #661
I think this might be relatedto using the distribution-provided CA certificates. Would manual installation of JRI from Jenkins fix the problem? If yes, then there's a bug in packaging; otherwise there's a bug in the JRI generation process and it may indeed be a missing jmod.
jabrena commentedon May 17, 2020
I used the complete installation and it works, I will test next week with Java 14 JRI from Jenkins.
https://ci.adoptopenjdk.net/view/ev3dev/job/eljbuild/job/stretch-14/lastSuccessfulBuild/artifact/build/jri-ev3.tar.gz
Currently, where the package install the JRI?
JakubVanek commentedon May 17, 2020
The Debian re-packaging was removed from Jenkins; it has to be done locally (documentation). I would then upload the locally-built package to ev3dev repository directly, there is no other hosting. As only Java 11 is uploaded there, it will be necessary to build Java 14 package separately.
The latest ev3dev package can be found directly on the repository server at archive.ev3dev.org/debian/pool/main/j/jri-11-ev3/.
jabrena commentedon May 17, 2020
It could be interesting to generate the package from Jenkins and later upload manually to EV3DEV.
In that way, the package is generated automatically and the unique manual process is the upload process. Can you enable the re-packaging again?
JakubVanek commentedon May 17, 2020
Luckily this is controlled by Jenkinsfile which can be changed in the repository without admin permissions on AdoptOpenJDK Jenkins, so yes, I will try it.
jabrena commentedon May 17, 2020
Take your time, currently with a complete JDK, it is fixed :)
25 remaining items
JakubVanek commentedon May 25, 2020
JRI14 is ready: jri-14-ev3_14.0.0~36-1_armel.deb. I couldn't find the
PingAppmainclass in the https://github.com/broker-game/ organization, so I cannot test the issue using the original problematic code. However the JRI debpkg now contains thejdk.crypto.ec@14module.jabrena commentedon May 25, 2020
Hi @JakubVanek,
I have just uploaded an example here:
https://github.com/broker-game/template-project-maven
in
src/main/resources/you will find a file namedconfig.propertieswhere you have to change your values:https://github.com/broker-game/template-project-maven/blob/master/src/main/resources/config.properties
From a terminal in Intellij, execute:
mvn -Pbrick clean packageand voila :)The example send 5 events to a git branch configured in the variable:
APPLICATIONJakubVanek commentedon May 25, 2020
The old error is gone, but there is now a different one:
JakubVanek commentedon May 25, 2020
The issue has to do with broken
ca-certificates-javadependency: adoptium/installer#105. This causes the cacerts db to get corrupted.After putting a dummy link from
/bin/javato/usr/lib/jvm/jri-14-ev3/bin/javaand reinstalling Java from scratch, it works.jabrena commentedon May 25, 2020
It is part of the journey.
I recommend to change the parameter:
BROKERyou could create a empty repo in your user:https://github.com/JakubVanek/broker-dev-environment
and the test could finish without any exception. In the last execution appear the typical credential error.
JakubVanek commentedon May 25, 2020
Yup, that would likely fix it, however the fact that these exceptions appear is enough to confirm that the SSL connection has been successfully made.
jabrena commentedon May 25, 2020
What is the next step?
JakubVanek commentedon May 25, 2020
Currently ev3dev-lang-java/openjdk-ev3#61 should resolve the issue at hand, but adoptium/adoptium-support#13 is going to be interesting for us in the near future.
JakubVanek commentedon May 25, 2020
Actually I think that I will create another PR for generating the cacerts DB from Mozilla cacert database as that would seem to provide the best user experience.
JakubVanek commentedon May 25, 2020
ev3dev-lang-java/openjdk-ev3#62 is ready for providing newest cacerts.
jabrena commentedon Dec 8, 2020
Know issue