pipeline engine 1.7.2 - install error

231 views
Skip to first unread message

Jordi

unread,
Jun 27, 2017, 11:55:07 AM6/27/17
to xnat_discussion
Hi all,

I have just grabbed the XNAT pipeline engine 1.7.2 from bintray and was trying to install it in a brand new installation. However, I get the following error message at doing so (see error message dump below). Does anyone else has seen a similar error message? Can it be due to some incompatibility with the cryptographic libraries of the Java JDK version I am using? 

OS:
Ubuntu 14.04.5 LTS

Java version:
java version "1.7.0_131"
OpenJDK Runtime Environment (IcedTea 2.6.9) (7u131-2.6.9-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.131-b00, mixed mode)

Error dump:
jhuguet@11-020-4867:/xnat/src/xnat-pipeline$ ./gradlew
Downloading https://services.gradle.org/distributions/gradle-2.13-all.zip

Exception in thread "main" javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
        at sun
.security.ssl.Alerts.getSSLException(Alerts.java:208)
        at sun
.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1914)
        at sun
.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1872)
        at sun
.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1855)
        at sun
.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1376)
        at sun
.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1353)
        at sun
.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
        at sun
.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
        at sun
.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1348)
        at sun
.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
        at org
.gradle.wrapper.Download.downloadInternal(Download.java:58)
        at org
.gradle.wrapper.Download.download(Download.java:44)
        at org
.gradle.wrapper.Install$1.call(Install.java:61)
        at org
.gradle.wrapper.Install$1.call(Install.java:48)
        at org
.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
        at org
.gradle.wrapper.Install.createDist(Install.java:48)
        at org
.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
        at org
.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error
        at sun
.security.pkcs11.P11Key$P11ECPublicKey.getEncodedInternal(P11Key.java:1024)
        at sun
.security.pkcs11.P11Key.equals(P11Key.java:158)
        at java
.util.ArrayList.indexOf(ArrayList.java:298)
        at java
.util.ArrayList.contains(ArrayList.java:281)
        at sun
.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:239)
        at sun
.security.validator.Validator.validate(Validator.java:260)
        at sun
.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)
        at sun
.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)
        at sun
.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
        at sun
.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1459)
        at sun
.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:213)
        at sun
.security.ssl.Handshaker.processLoop(Handshaker.java:961)
        at sun
.security.ssl.Handshaker.process_record(Handshaker.java:897)
        at sun
.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1033)
        at sun
.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1342)
        at sun
.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1369)
       
... 13 more
Caused by: java.security.InvalidKeyException: EC parameters error
        at sun
.security.ec.ECParameters.getAlgorithmParameters(ECParameters.java:284)
        at sun
.security.ec.ECPublicKeyImpl.<init>(ECPublicKeyImpl.java:59)
        at sun
.security.pkcs11.P11Key$P11ECPublicKey.getEncodedInternal(P11Key.java:1021)
       
... 28 more
Caused by: java.security.NoSuchProviderException: no such provider: SunEC
        at sun
.security.jca.GetInstance.getService(GetInstance.java:83)
        at sun
.security.jca.GetInstance.getInstance(GetInstance.java:206)
        at java
.security.Security.getImpl(Security.java:697)
        at java
.security.AlgorithmParameters.getInstance(AlgorithmParameters.java:199)
        at sun
.security.ec.ECParameters.getAlgorithmParameters(ECParameters.java:279)
       
... 30 more


Note that XNAT 1.7.2 works fine within my current setting, apparently is just a pipeline engine issue.

Thanks! 
Jordi

Matt South

unread,
Jun 29, 2017, 8:04:37 AM6/29/17
to xnat_discussion
It may be that your root certificates need updating.  What happens if you "sudo apt-get install ca-certificates"?

Matt South

unread,
Jun 29, 2017, 8:18:51 AM6/29/17
to xnat_discussion
or indeed if you run "sudo update-ca-certificates", see http://manpages.ubuntu.com/manpages/precise/man8/update-ca-certificates.8.html

Jordi

unread,
Jun 30, 2017, 12:00:16 PM6/30/17
to xnat_discussion
Hi,

Thanks for the hint Matt, however it did not make the trick. I am still getting the same error message at deploying/installing the pipeline engine.

Cheers,
Jordi

Herrick, Rick

unread,
Jun 30, 2017, 12:37:06 PM6/30/17
to xnat_di...@googlegroups.com

This is related to the JDK version, specifically OpenJDK 7, which doesn’t support that encryption algorithm. As best I can tell, this will probably continue to happen, as Java 7 is not being maintained or updated.

 

I was able to get the same error running gradlew with OpenJDK 7u131 on Ubuntu 14.04. I fixed it by doing the following:

 

$ sudo apt install openjdk-8-jdk

$ sudo apt remove openjdk-7-jdk

$ javac -version

javac 1.8.0_111

 

I actually tried to switch to OpenJDK 8 with update-java-alternatives, but there was an error with a dependency on a plugin library (IcedTea, which is actually built into OpenJDK 8, so it’s sort of silly).

 

Note that XNAT and Tomcat 7 both run perfectly fine on top of Java 8, although they are compiled to Java 7 bytecode and don’t use any Java 8 language features.

 

Once I’d made that upgrade, I ran the pipeline installer and it downloaded the zip just fine and installed properly. I’ve been slowly building a new base box for XNAT on Ubuntu 16.04 with Java 8 already installed. Once that’s completed and the Vagrant scripts are migrated to work properly with it, this shouldn’t be an issue in new VMs built from that.

 

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at https://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Jordi Huguet

unread,
Jul 3, 2017, 5:36:58 AM7/3/17
to xnat_di...@googlegroups.com
Thanks for looking at it Rick. 

Yup, that's what I suspected. I was reluctant to switch to Java 8 since most of the code has been tested/validated under Java 7 but will take the risk.

Jordi


To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussion+unsubscribe@googlegroups.com.
To post to this group, send email to xnat_discussion@googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussion+unsubscribe@googlegroups.com.
To post to this group, send email to xnat_discussion@googlegroups.com.

Spiro Pantazatos

unread,
Oct 9, 2017, 11:50:44 PM10/9/17
to xnat_discussion
Hi Rick,

I just updated OS from Ubuntu 12.04 to Ubuntu 14.04, upgraded XNAT to 1.7.4, and when i tried to run the XNAT 1.7.4 pipeline installer I ran into the same error message above. I followed your steps to update java to java 8 but I'm still getting the same error message. Anything else I should try? My java -version and javac -version output below:

Thanks,

$ java -version
openjdk version "1.8.0_141"
OpenJDK Runtime Environment (build 1.8.0_141-8u141-b15-3~14.04-b15)
OpenJDK 64-Bit Server VM (build 25.141-b15, mixed mode)

$ javac -version
javac 1.8.0_141

To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.

Mohana Ramaratnam

unread,
Oct 10, 2017, 12:08:22 AM10/10/17
to xnat_discussion
Hi Spiro,

You could download the zip directly by:


Then edit the PIPELINE_ENGINE_INSTALL_FOLDER/gradle/wrapper/gradle-wrapper.properties file to set the property 

distributionURL=file\://PATH_TO_WHERE_YOU_DOWNLOADED_THE_ABOVE_ZIP

and run pipeline engine setup again

Mohana

To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussion+unsubscribe@googlegroups.com.
To post to this group, send email to xnat_discussion@googlegroups.com.

Herrick, Rick

unread,
Oct 10, 2017, 10:30:43 AM10/10/17
to xnat_di...@googlegroups.com

That’s a good idea, with one caveat: 1.7.4 uses a newer version of the Gradle wrapper, which you can get at:

 

https://services.gradle.org/distributions/gradle-4.1-all.zip

 

Also, I *think* you may need another slash in the distributionURL value because of how file URLs work, so it would be:

 

distributionURL=file\:///PATH_TO_WHERE_YOU_DOWNLOADED_THE_ABOVE_ZIP

 

Lastly, you can even brute-force the whole thing by downloading that zip and extracting it into this folder:

 

~/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew

 

Overall, this would look like:

 

$ http --download https://services.gradle.org/distributions/gradle-4.1-bin.zip

$ mkdir -p ~/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew

$ unzip -d ~/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew gradle-4.1-all.zip

 

You should perform all of these steps with the XNAT user account.

 

One other note. You mentioned “I’ve been slowly building a new base box for XNAT on Ubuntu 16.04 with Java 8 already installed.” For that, you can actually use the newest XNAT Stack box. Your Vagrantfile would look like this:

 

config.vm.box = "nrgxnat/xnatstack-ubuntu1604"

 

This new version of XNAT Stack is built on top of the boxcutter/ubuntu1604 base box and includes all of the prerequisites for running XNAT, as well as a lot of supporting utilities. You can check out the XNAT Stack git repo if you want to check out exactly what’s in there or modify it for your own use.

 

All that said… I still think it’s weird you’re getting that SSL exception with Java 8 but I think going with these solutions would get you past that.

 

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

Spiro Pantazatos

unread,
Oct 10, 2017, 2:34:23 PM10/10/17
to xnat_discussion
Thanks Rick,

I will go through the steps right now. Also, just to clarify I think you were the one who said "I’ve been slowly building a new base box for XNAT on Ubuntu 16.04 with Java 8 already installed.” in your previous reply from about a year ago. But I will definitely look into the the basebox you mentioned. Is this similar to using a Docker container for XNAT, and/or are there plans to develop a similar XNAT 1.7 Docker image? I assume this would be best way to deploy a production XNAT instance in the cloud server?

I alrady have experience working with Docker containers so for me an Docker XNAT 1.7 image would be easiest if that is something that is in the works. Otherwise I'll at some point I'll aim to set up the Vagrant version as well.

Thanks again,
Spiro

John Flavin

unread,
Oct 10, 2017, 2:40:13 PM10/10/17
to xnat_discussion
There is no "official" release of XNAT in a docker image, though there are several groups who have put together their own. I plan to work on my own dockerized XNAT setup at the Rotterdam workshop next week.

Flavin

Spiro Pantazatos

unread,
Oct 10, 2017, 4:50:11 PM10/10/17
to xnat_di...@googlegroups.com
Hi John, Rick, Mohana,

I successfully updated pipeline engine from 1.7.1 to 1.7.4 following above instructions. When I tested out a pipeline through the "Build" or curl, it ran, but it was no longer being submitted to the SGE queue. I checked the bin/schedule and it was just two lines (@SHELL_LINE@) and $@, and it appears the previous one was overwritten somehow during the upgrade? 

I noticed another file, schedul.old which had more lines but I don't think it was my previous file as it didn't include the $launch_cmd.

Fortunately I found my previous schedule script from a previous thread and recopied it into bin/schedule.

I ran the ./gradlew upgrade again and confirmed that it overwrites bin/schedule script, and it doesn't appear to save a copy of the previous one. Maybe this could be changed in future revisions? 

Thanks again, everything seems to be up and running now with my OS and XNAT upgrade. I'm excited to start with the Container Service plugin!

spiro



Flavin

To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussion+unsubscribe@googlegroups.com.
To post to this group, send email to xnat_discussion@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "xnat_discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xnat_discussion/CpZDKPbYros/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xnat_discussion+unsubscribe@googlegroups.com.
To post to this group, send email to xnat_discussion@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages