andytill / erlyberly

erlang tracing for the masses
https://twitter.com/erlyberlytips
GNU General Public License v3.0
693 stars 43 forks source link

Issue When Installing #120

Closed garytaylor closed 8 years ago

garytaylor commented 8 years ago

Hi, I am trying to install / compile this on my mac osx machine and get this :-


./mvnw clean compile install assembly:single
Downloading https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip

Exception in thread "main" java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
    at javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:248)
    at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:255)
    at sun.net.www.protocol.https.HttpsClient.createSocket(HttpsClient.java:405)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:162)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    at org.apache.maven.wrapper.DefaultDownloader.downloadInternal(DefaultDownloader.java:73)
    at org.apache.maven.wrapper.DefaultDownloader.download(DefaultDownloader.java:60)
    at org.apache.maven.wrapper.Installer.createDist(Installer.java:64)
    at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:121)
    at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:50)
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
    at java.security.Provider$Service.newInstance(Provider.java:1617)
    at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
    at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
    at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
    at javax.net.ssl.SSLContext.getDefault(SSLContext.java:96)
    at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:122)
    at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:332)
    at javax.net.ssl.HttpsURLConnection.<init>(HttpsURLConnection.java:289)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.<init>(HttpsURLConnectionImpl.java:85)
    at sun.net.www.protocol.https.Handler.openConnection(Handler.java:62)
    at sun.net.www.protocol.https.Handler.openConnection(Handler.java:57)
    at java.net.URL.openConnection(URL.java:979)
    at org.apache.maven.wrapper.DefaultDownloader.downloadInternal(DefaultDownloader.java:70)
    ... 4 more
Caused by: java.io.IOException: Invalid keystore format
    at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:658)
    at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
    at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
    at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
    at java.security.KeyStore.load(KeyStore.java:1445)
    at sun.security.ssl.TrustManagerFactoryImpl.getCacertsKeyStore(TrustManagerFactoryImpl.java:226)
    at sun.security.ssl.SSLContextImpl$DefaultSSLContext.getDefaultTrustManager(SSLContextImpl.java:767)
    at sun.security.ssl.SSLContextImpl$DefaultSSLContext.<init>(SSLContextImpl.java:733)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.security.Provider$Service.newInstance(Provider.java:1595)
    ... 16 more

anyone any tips as to how I can continue ?

Thanks

Gary

andytill commented 8 years ago

What version of java are you using?

java -version

Also this might give some cluse. http://stackoverflow.com/questions/9761575/java-nosuchalgorithmexception-sunjsse-sun-security-ssl-sslcontextimpldefault

ruanpienaar commented 8 years ago

We could incorporate this: Require Java Vsn Since i've seen the java version issue come up more than once :)

garytaylor commented 8 years ago

Im using

java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
ruanpienaar commented 8 years ago

I think we require JDK 8u20 or higher

garytaylor commented 8 years ago

I dont understand the numbering system - 8u20 ? compared to 1.8.0_92-b14 - the 2 look totally different to me ? (Im not a java developer obvs :-) )

ruanpienaar commented 8 years ago

hehe!

I'm running

$ java -version 1 ↵ java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

i'll test it, one sec

ruanpienaar commented 8 years ago

On a fresh clone:

--- code/erlyberly ‹master› » ./mvnw clean compile install assembly:single
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for andytill:erlyberly:jar:0.6.9-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:exec-maven-plugin is missing. @ line 134, column 11
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building erlyberly 0.6.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ erlyberly ---
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (validate) @ erlyberly ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ erlyberly ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 8 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ erlyberly ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 48 source files to /Users/ruanpienaar/code/erlyberly/target/classes
[INFO] 
[INFO] --- exec-maven-plugin:1.4.0:exec (Version Calculation) @ erlyberly ---
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.17:check (validate) @ erlyberly ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ erlyberly ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ erlyberly ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- exec-maven-plugin:1.4.0:exec (Version Calculation) @ erlyberly ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ erlyberly ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/ruanpienaar/code/erlyberly/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ erlyberly ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /Users/ruanpienaar/code/erlyberly/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ erlyberly ---
[INFO] Surefire report directory: /Users/ruanpienaar/code/erlyberly/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running erlyberly.BasicSearchTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.171 sec
Running erlyberly.node.OtpUtilTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec

Results :

Tests run: 14, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ erlyberly ---
[INFO] Building jar: /Users/ruanpienaar/code/erlyberly/target/erlyberly-0.6.9-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ erlyberly ---
[INFO] Installing /Users/ruanpienaar/code/erlyberly/target/erlyberly-0.6.9-SNAPSHOT.jar to /Users/ruanpienaar/.m2/repository/andytill/erlyberly/0.6.9-SNAPSHOT/erlyberly-0.6.9-SNAPSHOT.jar
[INFO] Installing /Users/ruanpienaar/code/erlyberly/pom.xml to /Users/ruanpienaar/.m2/repository/andytill/erlyberly/0.6.9-SNAPSHOT/erlyberly-0.6.9-SNAPSHOT.pom
[INFO] 
[INFO] --- maven-assembly-plugin:2.4.1:single (default-cli) @ erlyberly ---
[INFO] Building jar: /Users/ruanpienaar/code/erlyberly/target/erlyberly-0.6.9-SNAPSHOT-runnable.jar
[WARNING] Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing.
Instead of attaching the assembly file: /Users/ruanpienaar/code/erlyberly/target/erlyberly-0.6.9-SNAPSHOT-runnable.jar, it will become the file for main project artifact.
NOTE: If multiple descriptors or descriptor-formats are provided for this project, the value of this file will be non-deterministic!
[WARNING] Replacing pre-existing project main-artifact file: /Users/ruanpienaar/code/erlyberly/target/erlyberly-0.6.9-SNAPSHOT.jar
with assembly file: /Users/ruanpienaar/code/erlyberly/target/erlyberly-0.6.9-SNAPSHOT-runnable.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.754 s
[INFO] Finished at: 2016-09-16T14:14:08+01:00
[INFO] Final Memory: 29M/319M
[INFO] ------------------------------------------------------------------------
--- code/erlyberly ‹master› » 
garytaylor commented 8 years ago

Hmm, nothing like mine then :-( What OS are you running on ? I might try on linux this evenin

ruanpienaar commented 8 years ago

Mac os x

--- code/erlyberly ‹master› » uname -a
Darwin rpmbp.local 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
--- code/erlyberly ‹master› » 
garytaylor commented 8 years ago

Same here

Darwin Garys-iMac-4.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64
garytaylor commented 8 years ago

Any ideas why mine might be coming up with those errors - seemed to be related to a "key store" but I have no idea what key store it is talking about - looks like its to do with SSL

ruanpienaar commented 8 years ago

Yeah, paging through some Stackoverlflow pages...

ruanpienaar commented 8 years ago

Try this:

$ keytool -list -keystore $(/usr/libexec/java_home)/jre/lib/security/cacerts -v
garytaylor commented 8 years ago

I got this

keytool -list -keystore $(/usr/libexec/java_home)/jre/lib/security/cacerts -v
keytool error: java.io.IOException: Invalid keystore format
java.io.IOException: Invalid keystore format
    at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:658)
    at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
    at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
    at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
    at java.security.KeyStore.load(KeyStore.java:1445)
    at sun.security.tools.keytool.Main.doCommands(Main.java:795)
    at sun.security.tools.keytool.Main.run(Main.java:343)
    at sun.security.tools.keytool.Main.main(Main.java:336)

cheers

ruanpienaar commented 8 years ago

Try a jdk/jre re-install?

garytaylor commented 8 years ago

think I might try that tonight when ive finished work as I use rubymine / intellij and dont want to risk breaking them right now. Ill let you know how I get on - and a huge thanks for your time :-)

andytill commented 8 years ago

@ruanpienaar that plugin for checking the java version is a great idea.

garytaylor commented 8 years ago

I tried installing on my other macbook pro and it all worked fine :-) enough for me to have a play with it anyway and see what it is / what it does etc..

Thanks for your help