Skip to content

[BUG]: Self-Hosted Ubuntu 22.04 fails to detect JAVA_HOME environment variables when using Temurin JDK. #4911

Open

Description

What happened?

I am using the exact same image used by Microsoft for their hosted agents to run a self-hosted Ubuntu 22.04 agent (https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml and https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) and JAVA_HOME environment variables are not appearing in the System capabilities.

The environment variables are part of the PATH (if that exists in Linux):

adminuser@vmss-agents-1:~/azdevopsagent$ $JAVA_HOME_17_X64
-bash: /usr/lib/jvm/temurin-17-jdk-amd64: Is a directory
adminuser@vmss-agents-1:~/azdevopsagent$ $JAVA_HOME_11_X64
-bash: /usr/lib/jvm/temurin-11-jdk-amd64: Is a directory
adminuser@vmss-agents-1:~/azdevopsagent$ $JAVA_HOME
-bash: /usr/lib/jvm/temurin-11-jdk-amd64: Is a directory

The agent installs Temurin JDKs and I think the agent is not supporting those.

Please see this for details: https://github.com/actions/runner-images/blob/main/images/ubuntu/scripts/build/install-java-tools.sh

Versions

Azure DevOps 3.242.1 - Ubuntu 22.04

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

No response

Version controll system

No response

Relevant log output

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions