Hi,
Version details:
Logstash - logstash-oss:7.17.3
OS: centos7
java version: java-11-openjdk-11.0.16.0.8
Background: On a centos-based docker image, I install java, followed by the logstash-oss rpm and use this in kubernetes deployments to run logstash.
With java-11-openjdk-11.0.15.0.9, this has worked fine.
Issue:
But when used with java-11-openjdk-11.0.16.0.8, the docker image build fails with warnings in logstash rpm installation and then errors in logstash plugin installations.
23:20:42 + buildah run --isolation chroot centos-nano-working-container -- rpm -Uvh /tmp/logstash-oss-7.17.3-x86_64.rpm
23:20:42 warning: /tmp/logstash-oss-7.17.3-x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY
23:20:42 Preparing... ########################################
23:20:43 Updating / installing...
23:20:49 logstash-oss-1:7.17.3-1 ########################################
23:20:49 Using JAVA_HOME defined java: /etc/alternatives/jre_openjdk/
23:20:49 WARNING: Using JAVA_HOME while Logstash distribution comes with a bundled JDK.
23:20:49 DEPRECATION: The use of JAVA_HOME is now deprecated and will be removed starting from 8.0. Please configure LS_JAVA_HOME instead.
23:20:49 Using provided startup.options file: /etc/logstash/startup.options
23:20:50 WARNING: Unknown module: org.jruby.dist specified to --add-opens
23:20:50 WARNING: Unknown module: org.jruby.dist specified to --add-opens
23:20:50 WARNING: Unknown module: org.jruby.dist specified to --add-opens
23:20:50 WARNING: Unknown module: org.jruby.dist specified to --add-opens
23:20:50 Error: Could not find or load main class [0.001s][warning][os,container]
23:20:50 Caused by: java.lang.ClassNotFoundException: [0/001s][warning][os,container]
23:20:50 /usr/share/logstash/bin/system-install: line 88: [0.001s][warning][os,container]: command not found
23:20:50 Unable to install system startup script for Logstash.
23:20:50 chmod: cannot access '/etc/default/logstash': No such file or directory
23:20:50 warning: %post(logstash-oss-1:7.17.3-1.x86_64) scriptlet failed, exit status 1
23:20:51 + buildah run --isolation chroot centos-working-container -- /usr/share/logstash/bin/logstash-plugin uninstall logstash-output-elasticsearch
23:20:52 Using JAVA_HOME defined java: /etc/alternatives/jre_openjdk/
23:20:52 WARNING: Using JAVA_HOME while Logstash distribution comes with a bundled JDK.
23:20:52 DEPRECATION: The use of JAVA_HOME is now deprecated and will be removed starting from 8.0. Please configure LS_JAVA_HOME instead.
23:20:52 [0.001s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /sys/fs/cgroup/cpuset.
23:20:52 [0.001s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /sys/fs/cgroup/cpuset.
23:20:52 [0.001s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /sys/fs/cgroup/cpuset.
23:20:52 WARNING: Unknown module: org.jruby.dist specified to --add-opens
23:20:52 WARNING: Unknown module: org.jruby.dist specified to --add-opens
23:20:52 WARNING: Unknown module: org.jruby.dist specified to --add-opens
23:20:52 WARNING: Unknown module: org.jruby.dist specified to --add-opens
23:20:52 Error: Could not find or load main class [0.001s][warning][os,container]
23:20:52 Caused by: java.lang.ClassNotFoundException: [0/001s][warning][os,container]
23:20:52 subprocess exited with status 1
23:20:52 subprocess exited with status 1
23:20:52 make[1]: *** [build] Error 1
23:20:52 make[1]: Leaving directory `/home/jenkins/workspace/CTO/CSF/Analytics/CSF-BELK-DOCKER_CI/ofd/l'
23:20:52 make: *** [build] Error 1
The same code base works fine with java-11.0.15. Can you help us understand what is causing this issue and how to resolve this?
Does logstash not support java 11.0.16?