Skip to content

7.3 image unable to install java #208

@SloshBurch

Description

@SloshBurch

I'm using Splunk's Docker image for developing DBConnect solutions. This requires Java.

In images up through the current 7.2.6 image d0e924f35601, I've been able to install java 1.8 using the following command as root in a Splunk Enterprise container:

apt update && mkdir -p /usr/share/man/man1 && apt install default-jre -y && java -version

As of the 7.3 image e92c2081a504, this no longer works. Neither does workarounds such as:
apt install software-properties-common -y && add-apt-repository ppa:openjdk-r/ppa && apt-get install openjdk-8-jre
Notice I'm trying OpenJDK, not Oracle Java. Although I couldn't get either to install.

Steps to reproduce:

  1. Create a new docker image. Use either splunk:splunk/latest or splunk/splunk:7.2.6: docker run --name java --hostname java -P -d -e SPLUNK_START_ARGS=--accept-license -e SPLUNK_PASSWORD=changeme splunk/splunk:latest
  2. Connect to terminal: docker exec -it java /bin/bash
  3. Switch to root: sudo su -
  4. Install Java: apt update && mkdir -p /usr/share/man/man1 && apt install openjdk-8-jre -y && java -version && sudo su - splunk -c "/opt/splunk/bin/splunk restart". In the 7.2.6 image, default-jre installs Java 1.8. In the 7.3 image, it installs Java 11. So using openjdk-8-jre

On the 7.2.6 image, the installation works:

openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-2~deb9u1-b03)
OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)

On the 7.3 image you'll now get the error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
18 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package openjdk-8-jre

Conversely, installing with default-jre installs Java 11 but such is incompatible with DBConnect and throws an error such that the DBConnect java task server won't start.

I've also tried apt install software-properties-common -y && add-apt-repository ppa:openjdk-r/ppa to no success.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions