Friday, June 30, 2017

System property jdk.tls.namedGroups(null) contains no supported elliptic curves

We get this using java version "1.6.0_141" Java(TM) SE Runtime Environment (build 1.6.0_141-b12) Java HotSpot(TM) 64-Bit Server VM (build 20.141-b12, mixed mode) :


java.lang.IllegalArgumentException: System property jdk.tls.namedGroups(null) contains no supported elliptic curves
 at com.sun.net.ssl.internal.ssl.SupportedEllipticCurvesExtension.<clinit>(HelloExtensions.java:567)

<Jun 29, 2017 11:16:07 AM CEST> <Error> <Socket> <BEA-000421> <Uncaught Throwable in processSockets
 java.lang.ExceptionInInitializerError.
 java.lang.ExceptionInInitializerError
 at com.sun.net.ssl.internal.ssl.HelloExtensions.<init>(HelloExtensions.java:73)
 at com.sun.net.ssl.internal.ssl.HandshakeMessage$ClientHello.<init>(HandshakeMessage.java:223)
 at com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:204)
 at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:945)
 at com.sun.net.ssl.internal.ssl.Handshaker$1.run(Handshaker.java:885)
 Truncated. see log file for complete stacktrace
 Caused By: java.lang.IllegalArgumentException: System property jdk.tls.namedGroups(null) contains no supported elliptic curves
 at com.sun.net.ssl.internal.ssl.SupportedEllipticCurvesExtension.<clinit>(HelloExtensions.java:567)
 at com.sun.net.ssl.internal.ssl.HelloExtensions.<init>(HelloExtensions.java:73)
 at com.sun.net.ssl.internal.ssl.HandshakeMessage$ClientHello.<init>(HandshakeMessage.java:223)
 at com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:204)
 at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:945)
 Truncated. see log file for complete stacktrace
 >
 <Jun 29, 2017 11:16:07 AM CEST> <Error> <Socket> <BEA-000421> <Uncaught Throwable in processSockets
 java.lang.NoClassDefFoundError: Could not initialize class com.sun.net.ssl.internal.ssl.SupportedEllipticCurvesExtension.
 java.lang.NoClassDefFoundError: Could not initialize class com.sun.net.ssl.internal.ssl.SupportedEllipticCurvesExtension
 at com.sun.net.ssl.internal.ssl.HelloExtensions.<init>(HelloExtensions.java:73)
 at com.sun.net.ssl.internal.ssl.HandshakeMessage$ClientHello.<init>(HandshakeMessage.java:223)
 at com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:204)
 at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:945)
 at com.sun.net.ssl.internal.ssl.Handshaker$1.run(Handshaker.java:885)
 Truncated. see log file for complete stacktrace



The issue can be solved by removing -Dweblogic.ssl.JSSEEnabled=true

According to the Oracle website this issue was introduced with 141-b12 - http://www.oracle.com/technetwork/java/javase/overview-156328.html#R160_141 and is fixed in JDK 141-b32



Sunday, June 18, 2017

Angular 4.2.3 getting started

https://angular.io/guide/quickstart

How to install and use CLI : https://github.com/angular/angular-cli/blob/master/README.md

#make sure you have latest version of node and npm
node -v
npm -v

#clean up previous angular-cli installations
npm uninstall -g angular-cli
npm uninstall --save-dev angular-cli
npm uninstall -g @angular/cli
npm cache clean

#install latest angular-cli
npm install -g @angular/cli@latest
ng new my-app
cd my-app
ng serve --open



Tour of Heroes https://angular.io/tutorial

Awesome presentation here, part of the course by udemy.com



You can buy the whole course here https://www.udemy.com/the-complete-guide-to-angular-2/?couponCode=YOUTUBE_NG4

Friday, June 16, 2017

funny /etc/hosts behaviour

Someone entered 2 lines in /etc/hosts, specifying the same host and 2 different IPs

cat /etc/hosts | grep myvp.pippo.net

116.8.194.82   myvp.pippo.net 
119.57.52.83   myvp.pippo.net



the funny thing is that:

nslookup myvp.pippo.net 
Name: myvp.pippo.net
Address: 119.57.52.83


but

telnet myvp.pippo.net 443
Trying 116.8.194.82...



so nslookup and telnet don't follow the same strategy to pick up the IP...

At least on Linux 2.6.18-417.el5 RHAT 5.11 Tikanga

Weird that Linux doesn't report the issue...