Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ERROR: Feature "Java (via SDKMAN!)" (ghcr.io/devcontainers/features/java) failed to install! #642

Open
pawaitemadisoncollege opened this issue Oct 2, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@pawaitemadisoncollege
Copy link

Feature id and version

ghcr.io/devcontainers/features/java:1

Devcontainer base Image

mcr.microsoft.com/devcontainers/java:1-17-bullseye

What happened?

This cropped up yesterday - the devcontainer.json has been working for months. ERROR: Feature "Java (via SDKMAN!)" (ghcr.io/devcontainers/features/java) failed to install!

Also see devcontainers/features#1134

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/java
{
    "name": "Java",
    // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
    "image": "mcr.microsoft.com/devcontainers/java:1-17-bullseye",
    "features": {
        "ghcr.io/devcontainers/features/java:1": {
            "installAnt": true,
            "version": "latest",
            "jdkDistro": "ms",
            "gradleVersion": "latest",
            "mavenVersion": "latest",
            "antVersion": "latest"
        },
        "ghcr.io/devcontainers-contrib/features/ant-sdkman:2": {
            "version": "latest",
            "jdkVersion": "11",
            "jdkDistro": "ms"
        }
    }

    // Use 'forwardPorts' to make a list of ports inside the container available locally.
    // "forwardPorts": [],

    // Use 'postCreateCommand' to run commands after the container is created.
   // ,"postCreateCommand": 

    // Configure tool-specific properties.
    // "customizations": {},

    // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
    // "remoteUser": "root"

    //,"postStartCommand": 
}

Relevant log output

2024-10-02 15:37:47.321Z: #15 0.583 ===========================================================================
2024-10-02 15:37:47.321Z: #15 0.583 Feature       : Java (via SDKMAN!)
#15 0.583 Description   : Installs Java, SDKMAN! (if not installed), and needed dependencies.
#15 0.583 Id            : ghcr.io/devcontainers/features/java
#15 0.583 Version       : 1.6.1
2024-10-02 15:37:47.472Z: #15 0.583 Documentation : ********/devcontainers/features/tree/main/src/java
#15 0.583 Options       :
#15 0.583     VERSION="latest"
#15 0.583     ADDITIONALVERSIONS=""
#15 0.583     JDKDISTRO="ms"2024-10-02 15:37:47.473Z: 
#15 0.583     INSTALLGRADLE="false"
#15 0.583     GRADLEVERSION="latest"
#15 0.583     INSTALLMAVEN="false"
#15 0.583     MAVENVERSION="latest"
#15 0.583     INSTALLANT="********"
#15 0.583     ANTVERSION="latest"
#15 0.583     INSTALLGROOVY="false"
#15 0.583     GROOVYVERSION="latest"
#15 0.583 ===========================================================================
2024-10-02 15:37:47.651Z: #15 0.913 Version latest not found. Available versions:
2024-10-02 15:37:47.756Z: #15 0.914 
#15 0.915 ERROR: Feature "Java (via SDKMAN!)" (ghcr.io/devcontainers/features/java) failed to install! Look at the documentation at ********/devcontainers/features/tree/main/src/java for help troubleshooting this error.
#15 ERROR: process "/bin/sh -c cp -ar /tmp/build-features-src/java_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/java_0  && cd /tmp/dev-container-features/java_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/java_0" did not complete successfully: exit code: 1
2024-10-02 15:37:48.074Z: ------
 > [dev_containers_target_stage 5/6] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=java_0,target=/tmp/build-features-src/java_0     cp -ar /tmp/build-features-src/java_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/java_0  && cd /tmp/dev-container-features/java_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/java_0:2024-10-02 15:37:48.077Z: 
2024-10-02 15:37:48.077Z: 0.583     INSTALLMAVEN="false"2024-10-02 15:37:48.077Z: 
2024-10-02 15:37:48.077Z: 0.583     MAVENVERSION="latest"2024-10-02 15:37:48.079Z: 
2024-10-02 15:37:48.079Z: 0.583     INSTALLANT="********"2024-10-02 15:37:48.080Z: 
2024-10-02 15:37:48.080Z: 0.583     ANTVERSION="latest"2024-10-02 15:37:48.080Z: 
2024-10-02 15:37:48.080Z: 0.583     INSTALLGROOVY="false"2024-10-02 15:37:48.081Z: 
2024-10-02 15:37:48.081Z: 0.583     GROOVYVERSION="latest"2024-10-02 15:37:48.082Z: 
2024-10-02 15:37:48.082Z: 0.583 ===========================================================================2024-10-02 15:37:48.082Z: 
2024-10-02 15:37:48.083Z: 0.913 Version latest not found. Available versions:2024-10-02 15:37:48.083Z: 
2024-10-02 15:37:48.083Z: 0.914 2024-10-02 15:37:48.084Z: 
2024-10-02 15:37:48.084Z: 0.915 ERROR: Feature "Java (via SDKMAN!)" (ghcr.io/devcontainers/features/java) failed to install2024-10-02 15:37:47.321Z: #15 0.583 ===========================================================================
2024-10-02 15:37:47.321Z: #15 0.583 Feature       : Java (via SDKMAN!)
#15 0.583 Description   : Installs Java, SDKMAN! (if not installed), and needed dependencies.
#15 0.583 Id            : ghcr.io/devcontainers/features/java
#15 0.583 Version       : 1.6.1
2024-10-02 15:37:47.472Z: #15 0.583 Documentation : ********/devcontainers/features/tree/main/src/java
#15 0.583 Options       :
#15 0.583     VERSION="latest"
#15 0.583     ADDITIONALVERSIONS=""
#15 0.583     JDKDISTRO="ms"2024-10-02 15:37:47.473Z: 
#15 0.583     INSTALLGRADLE="false"
#15 0.583     GRADLEVERSION="latest"
#15 0.583     INSTALLMAVEN="false"
#15 0.583     MAVENVERSION="latest"
#15 0.583     INSTALLANT="********"
#15 0.583     ANTVERSION="latest"
#15 0.583     INSTALLGROOVY="false"
#15 0.583     GROOVYVERSION="latest"
#15 0.583 ===========================================================================
2024-10-02 15:37:47.651Z: #15 0.913 Version latest not found. Available versions:
2024-10-02 15:37:47.756Z: #15 0.914 
#15 0.915 ERROR: Feature "Java (via SDKMAN!)" (ghcr.io/devcontainers/features/java) failed to install! Look at the documentation at ********/devcontainers/features/tree/main/src/java for help troubleshooting this error.
#15 ERROR: process "/bin/sh -c cp -ar /tmp/build-features-src/java_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/java_0  && cd /tmp/dev-container-features/java_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/java_0" did not complete successfully: exit code: 1
2024-10-02 15:37:48.074Z: ------
 > [dev_containers_target_stage 5/6] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=java_0,target=/tmp/build-features-src/java_0     cp -ar /tmp/build-features-src/java_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/java_0  && cd /tmp/dev-container-features/java_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/java_0:2024-10-02 15:37:48.077Z: 
2024-10-02 15:37:48.077Z: 0.583     INSTALLMAVEN="false"2024-10-02 15:37:48.077Z: 
2024-10-02 15:37:48.077Z: 0.583     MAVENVERSION="latest"2024-10-02 15:37:48.079Z: 
2024-10-02 15:37:48.079Z: 0.583     INSTALLANT="********"2024-10-02 15:37:48.080Z: 
2024-10-02 15:37:48.080Z: 0.583     ANTVERSION="latest"2024-10-02 15:37:48.080Z: 
2024-10-02 15:37:48.080Z: 0.583     INSTALLGROOVY="false"2024-10-02 15:37:48.081Z: 
2024-10-02 15:37:48.081Z: 0.583     GROOVYVERSION="latest"2024-10-02 15:37:48.082Z: 
2024-10-02 15:37:48.082Z: 0.583 ===========================================================================2024-10-02 15:37:48.082Z: 
2024-10-02 15:37:48.083Z: 0.913 Version latest not found. Available versions:2024-10-02 15:37:48.083Z: 
2024-10-02 15:37:48.083Z: 0.914 2024-10-02 15:37:48.084Z: 
2024-10-02 15:37:48.084Z: 0.915 ERROR: Feature "Java (via SDKMAN!)" (ghcr.io/devcontainers/features/java) failed to install! Look at the documentation at ********/devcontainers/features/tree/main/src/java for help troubleshooting this error.2024-10-02 15:37:48.085Z: 
2024-10-02 15:37:48.085Z: ------2024-10-02 15:37:48.085Z: 
2024-10-02 15:37:48.086Z: Dockerfile.extended:26
--------------------
  25 |     ENV PATH="/usr/local/sdkman/bin:/usr/local/sdkman/candidates/java/current/bin:/usr/local/sdkman/candidates/gradle/current/bin:/usr/local/sdkman/candidates/maven/current/bin:/usr/local/sdkman/candidates/ant/current/bin:${PATH}"
  26 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,source=java_0,target=/tmp/build-features-src/java_0 \
  27 | >>>     cp -ar /tmp/build-features-src/java_0 /tmp/dev-container-features \
2024-10-02 15:37:48.086Z:   28 | >>>  && chmod -R 0755 /tmp/dev-container-features/java_0 \
  29 | >>>  && cd /tmp/dev-container-features/java_0 \
  30 | >>>  && chmod +x ./devcontainer-features-install.sh \
  31 | >>>  && ./devcontainer-features-install.sh \
  32 | >>>  && rm -rf /tmp/dev-container-features/java_02024-10-02 15:37:48.087Z: 
  33 |     
--! Look at the documentation at ********/devcontainers/features/tree/main/src/java for help troubleshooting this error.2024-
@pawaitemadisoncollege pawaitemadisoncollege added the bug Something isn't working label Oct 2, 2024
@pawaitemadisoncollege
Copy link
Author

pawaitemadisoncollege commented Oct 2, 2024

Update: if I use "ghcr.io/devcontainers/features/java:1.5.0": { instead of "ghcr.io/devcontainers/features/java:1": {, it works

@benhonda
Copy link

benhonda commented Oct 7, 2024

Using ghcr.io/devcontainers/features/java:1.6.0 appears to work as well. Thus it seems to be an issue with this commit.

I guess a good reminder to pin versions!

@evilhamsterman
Copy link

evilhamsterman commented Oct 8, 2024

This project is not associated with the devcontainer project and appears to have been abandoned #628 . The official project has removed all devcontainer-contrib features from their listing. devcontainers/devcontainers.github.io#451. There is a fork that is being worked on to update and maintain the features https://github.com/devcontainers-extra/features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants