JRE version requirement

25 views
Skip to first unread message

Basil Crow

unread,
Mar 18, 2019, 4:48:24 PM3/18/19
to jenkins...@googlegroups.com
Per the "Upgrading Jenkins Java version from 8 to 11" page [1]:

> All agents must be running on the same JVM version as the master (because of
> how masters and agents communicate). If you're upgrading your Jenkins master
> to run on Java 11, you also need to upgrade the JVM on your agents.

Per the "Java requirements" page [2]:

> If you use Swarm Plugin to create agents, JRE version must be equal to the
> version of the master

Why is there a requirement for agents to be running on the same JRE version as
the master? Is this because backwards-incompatible changes have been made to
serializable classes in the Java 11 runtime? If so, could someone please
elaborate?

Thanks,
Basil

[1] https://jenkins.io/doc/administration/requirements/upgrade-java-guidelines/
[2] https://jenkins.io/doc/administration/requirements/java/

Baptiste Mathus

unread,
Mar 19, 2019, 12:01:45 PM3/19/19
to jenkins...@googlegroups.com
Hello,

It is unrelated with Java 11. It has always been the case, but we've now been so long all using Java 8 that most people forgot about this requirement.
IOW, it was already unsupported to, say, run a master on a Java 8 and an agent on Java 7.

This is because the remoting layer of Jenkins serializes classes from master and agents, and hence could trigger very weird behaviors.
This means you could think it's OK, until it's not and you need to fix this immediately (e.g. a plugin started to depend on some particular feature, or does some funky dynamic loading depending on the current JRE, then will send it to the "other side" of the network, and that "other side" will not have all classes available to deserialize).

I would strongly encourage everyone to install the Version Node monitors plugin to watch this out.
(disclaimer: I'm the current official maintainer, but it's also been worked on overall by the Java 11 team).

Note: this does *not* mean you cannot build projects using a JDK 1.4, or 8, or whatever.
We're talking here about the version of Java runtimes to run the Jenkins master instance and its agents.

Hope this clarifies.

-- Baptiste

--
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/CAFwNDjqajNX-EDiX2a2UsLfufn1jCa5jpEx3gD%3DWk%2BkYGiNQyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Baptiste Mathus

unread,
Mar 19, 2019, 12:15:22 PM3/19/19
to jenkins...@googlegroups.com
Oops, forgot the link to the plugin I'm talking about: https://plugins.jenkins.io/versioncolumn
Reply all
Reply to author
Forward
0 new messages