Requirement for Java 1.7?

70 views
Skip to first unread message

David Aldrich

unread,
May 7, 2015, 9:40:22 AM5/7/15
to jenkins...@googlegroups.com

Hi

 

I notice that the Jenkins release notes for 1.612 state:

 

Jenkins now requires Java 7.

 

I tried upgrading from Jenkins 1.607 to 1.612 and many of our Linux slaves failed to launch. Part of the reported error is:

 

[05/07/15 14:34:23] [SSH] Checking java version of /data/hudsonuser/jdk/bin/java

[05/07/15 14:34:23] [SSH] /data/hudsonuser/jdk/bin/java -version returned 1.6.0_16.

 

These slaves run Centos 5.  Please can anyone advise me how I should install Java 7 on these slaves?

 

Best regards

 

David

 

Christopher Orr

unread,
May 7, 2015, 10:10:21 AM5/7/15
to jenkins...@googlegroups.com
On 07/05/15 15:40, David Aldrich wrote:
> I notice that the Jenkins release notes for 1.612 state:
>
> *Jenkins now requires Java 7*.
>
> I tried upgrading from Jenkins 1.607 to 1.612 and many of our Linux
> slaves failed to launch. Part of the reported error is:
>
> [05/07/15 14:34:23] [SSH] Checking java version of
> /data/hudsonuser/jdk/bin/java
>
> [05/07/15 14:34:23] [SSH] /data/hudsonuser/jdk/bin/java -version
> returned 1.6.0_16.
>
> These slaves run Centos 5. Please can anyone advise me how I should
> install Java 7 on these slaves?

yum install java-1.7.0-openjdk

-Chris

David Aldrich

unread,
May 7, 2015, 10:12:34 AM5/7/15
to jenkins...@googlegroups.com
> yum install java-1.7.0-openjdk

Thanks

David Aldrich

unread,
May 7, 2015, 11:31:29 AM5/7/15
to jenkins...@googlegroups.com
I wonder if someone could remind me how Jenkins uses Java on a Linux slave.

Our launch method is "Launch slave agents on Unix machines via SSH".

The remote root directory is:

/data/hudsonuser

I can see that the Java location on the slave is:

/data/hudsonuser/jdk/bin/java

Does this mean that Jenkins is installing Java on the slave?

If so, how do I update to Java 7 on the slave?

Best regards

David





Daniel Beck

unread,
May 7, 2015, 1:46:20 PM5/7/15
to jenkins...@googlegroups.com

On 07.05.2015, at 17:31, David Aldrich <David....@EMEA.NEC.COM> wrote:

> Does this mean that Jenkins is installing Java on the slave?

Yes, if none is found otherwise. Unfortunately an outdated version.

> If so, how do I update to Java 7 on the slave?

You don't. The version of the Jenkins-provided JDK cannot be changed.

Just install Java 7 to one of the standard locations to use that instead:

https://github.com/jenkinsci/ssh-slaves-plugin/blob/master/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java#L1428

Use your OS vendor's repos or download from Oracle. Then Jenkins will not use the outdated one it installed as fallback.

Tracked as https://issues.jenkins-ci.org/browse/JENKINS-28231

David Aldrich

unread,
May 8, 2015, 3:38:10 AM5/8/15
to jenkins...@googlegroups.com
Hi Daniel

Thanks very much for your answer.

> You don't. The version of the Jenkins-provided JDK cannot be changed.

Just out of interest, why doesn't Jenkins 1.612 install Java 7 if it is not found?

Best regards

David
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/7C52EFE6-2BD8-4BF7-
> A475-D7B8C93D8A95%40beckweb.net.
> For more options, visit https://groups.google.com/d/optout.
>
>
> Click
> https://www.mailcontrol.com/sr/!oWaVkNhSf!GX2PQPOmvUlvAwUAcTfZnp
> YwftJ!kIZdSepJp+OSw08zKj9rvfXIvimfGt1zVPdsoKRuEdgZyEA== to report
> this email as spam.

Daniel Beck

unread,
May 8, 2015, 3:56:06 AM5/8/15
to jenkins...@googlegroups.com

On 08.05.2015, at 09:38, David Aldrich <David....@EMEA.NEC.COM> wrote:

> Just out of interest, why doesn't Jenkins 1.612 install Java 7 if it is not found?

I don't know. I brought that issue up in JENKINS-27623 (the first issue on raising the Java version requirement to 7).

You will have to ask Kohsuke why he filed a duplicate JENKINS-28120 for his own (ultimately merged) work on this change.

Reply all
Reply to author
Forward
0 new messages