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

azure-cli feature fails to install #589

Closed
vermegi opened this issue Jun 23, 2023 · 4 comments · Fixed by #578
Closed

azure-cli feature fails to install #589

vermegi opened this issue Jun 23, 2023 · 4 comments · Fixed by #578

Comments

@vermegi
Copy link

vermegi commented Jun 23, 2023

For repo and branch https://github.com/vermegi/Deploying-and-Running-Java-Applications-in-Azure-Spring-Apps/tree/givermei/solution3.0 devcontainer fails to build.

The same devcontainer config I used about 2-4 weeks ago to create a codespace as well and back then all still started up just fine.

The error occurs both when using GH codespaces and when building a local container.

I am pasting here the error logs starting from a bit before the first error message (which is in the python part), a bit below the azure-cli error messages can be found.

#17 13.25 Unpacking python3-venv (3.11.2-1+b1) ...

2023-06-23 06:53:37.117Z: #17 13.47 Setting up javascript-common (11+nmu1) ...

2023-06-23 06:53:37.243Z: #17 13.67 Setting up python3-setuptools-whl (66.1.1-1) ...

2023-06-23 06:53:37.349Z: #17 13.78 Setting up libpython3.11:amd64 (3.11.2-6) ...

2023-06-23 06:53:37.457Z: #17 13.89 Setting up python3-pip-whl (23.0.1+dfsg-1) ...
2023-06-23 06:53:37.458Z:
2023-06-23 06:53:37.562Z: #17 13.99 Setting up libffi-dev:amd64 (3.4.4-1) ...

2023-06-23 06:53:37.663Z: #17 14.09 Setting up libpython3.11-dev:amd64 (3.11.2-6) ...

2023-06-23 06:53:37.774Z: #17 14.20 Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ...

2023-06-23 06:53:37.882Z: #17 14.31 Setting up libpython3-stdlib:amd64 (3.11.2-1+b1) ...

2023-06-23 06:53:37.985Z: #17 14.42 Setting up libjs-underscore (1.13.4~dfsg+~1.11.4-3) ...

2023-06-23 06:53:38.096Z: #17 14.53 Setting up libpython3-dev:amd64 (3.11.2-1+b1) ...

2023-06-23 06:53:38.198Z: #17 14.63 Setting up python3.11-dev (3.11.2-6) ...

2023-06-23 06:53:38.303Z: #17 14.73 Setting up python3 (3.11.2-1+b1) ...

2023-06-23 06:53:38.603Z: #17 14.96 Setting up libjs-sphinxdoc (5.3.0-4) ...

2023-06-23 06:53:38.754Z: #17 15.07 Setting up python3-lib2to3 (3.11.2-3) ...

2023-06-23 06:53:38.905Z: #17 15.26 Setting up python3-pkg-resources (66.1.1-1) ...

2023-06-23 06:53:39.167Z: #17 15.60 Setting up python3-distutils (3.11.2-3) ...

2023-06-23 06:53:39.618Z: #17 15.92 Setting up python3-setuptools (66.1.1-1) ...

2023-06-23 06:53:40.069Z: #17 16.44 Setting up python3-wheel (0.38.4-2) ...

2023-06-23 06:53:40.370Z: #17 16.67 Setting up python3.11-venv (3.11.2-6) ...

2023-06-23 06:53:40.483Z: #17 16.81 Setting up python3-dev (3.11.2-1+b1) ...

#17 16.91 Setting up python3-pip (23.0.1+dfsg-1) ...

2023-06-23 06:53:41.958Z: #17 18.28 Setting up python3-venv (3.11.2-1+b1) ...

#17 18.39 Processing triggers for man-db (2.11.2-2) ...

2023-06-23 06:53:44.063Z: #17 20.43 Processing triggers for libc-bin (2.36-9) ...

2023-06-23 06:53:46.168Z: #17 22.55 error: externally-managed-environment
#17 22.55
2023-06-23 06:53:46.169Z: #17 22.55 × This environment is externally managed
#17 22.55 ╰─> To install Python packages system-wide, try apt install
#17 22.55 python3-xyz, where xyz is the package you are trying to
#17 22.55 install.
#17 22.55
#17 22.55 If you wish to install a non-Debian-packaged Python package,
#17 22.55 create a virtual environment using python3 -m venv path/to/venv.
#17 22.55 Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
#17 22.55 sure you have python3-full installed.
#17 22.55
#17 22.55 If you wish to install a non-Debian packaged Python application,
#17 22.55 it may be easiest to use pipx install xyz, which will manage a
#17 22.55 virtual environment for you. Make sure you have pipx installed.
#17 22.55
#17 22.55 See /usr/share/doc/python3.11/README.venv for more information.
#17 22.55
#17 22.55 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
#17 22.55 hint: See PEP 668 for the detailed specification.
2023-06-23 06:53:46.306Z: #17 22.60 ERROR: Feature "Azure CLI" (ghcr.io/devcontainers/features/azure-cli) failed to install! Look at the documentation at ********/devcontainers/features/tree/main/src/azure-cli for help troubleshooting this error.
#17 ERROR: executor failed running [/bin/sh -c cp -ar /tmp/build-features-src/azure-cli_0 /tmp/dev-container-features && chmod -R 0755 /tmp/dev-container-features/azure-cli_0 && cd /tmp/dev-container-features/azure-cli_0 && chmod +x ./devcontainer-features-install.sh && ./devcontainer-features-install.sh && rm -rf /tmp/dev-container-features/azure-cli_0]: exit code: 1

#9 [internal] load metadata for mcr.microsoft.com/devcontainers/java:17
2023-06-23 06:53:46.310Z: ------

[dev_containers_target_stage 5/10] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=azure-cli_0,target=/tmp/build-features-src/azure-cli_0 cp -ar /tmp/build-features-src/azure-cli_0 /tmp/dev-container-features && chmod -R 0755 /tmp/dev-container-features/azure-cli_0 && cd /tmp/dev-container-features/azure-cli_0 && chmod +x ./devcontainer-features-install.sh && ./devcontainer-features-install.sh && rm -rf /tmp/dev-container-features/azure-cli_0:
22.55
22.55 If you wish to install a non-Debian packaged Python application,
22.55 it may be easiest to use pipx install xyz, which will manage a
22.55 virtual environment for you. Make sure you have pipx installed.
22.55
22.55 See /usr/share/doc/python3.11/README.venv for more information.
22.55
22.55 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
22.55 hint: See PEP 668 for the detailed specification.
22.60 ERROR: Feature "Azure CLI" (ghcr.io/devcontainers/features/azure-cli) failed to install! Look at the documentation at ********/devcontainers/features/tree/main/src/azure-cli for help troubleshooting this error.


2023-06-23 06:53:46.317Z: ERROR: failed to solve: executor failed running [/bin/sh -c cp -ar /tmp/build-features-src/azure-cli_0 /tmp/dev-container-features && chmod -R 0755 /tmp/dev-container-features/azure-cli_0 && cd /tmp/dev-container-features/azure-cli_0 && chmod +x ./devcontainer-features-install.sh && ./devcontainer-features-install.sh && rm -rf /tmp/dev-container-features/azure-cli_0]: exit code: 1
2023-06-23 06:53:46.318Z: Stop: Run: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.45.0-1687503145585 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/java:17 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-deploying-and-running-java-applications-in-azure-spring-apps-7f9e9754512cd96adff0a428878c32c8e86bf36ceca7ed190b8e9c827f0c5e58-features -f /tmp/devcontainercli-root/container-features/0.45.0-1687503145585/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder
2023-06-23 06:53:46.319Z: Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.45.0-1687503145585 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/java:17 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-deploying-and-running-java-applications-in-azure-spring-apps-7f9e9754512cd96adff0a428878c32c8e86bf36ceca7ed190b8e9c827f0c5e58-features -f /tmp/devcontainercli-root/container-features/0.45.0-1687503145585/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder
2023-06-23 06:53:46.319Z: at Pte (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2007:1066)
2023-06-23 06:53:46.320Z: at WN (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2007:1002)
2023-06-23 06:53:46.322Z: at processTicksAndRejections (internal/process/task_queues.js:95:5)
2023-06-23 06:53:46.322Z: at async Jte (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2024:3660)
2023-06-23 06:53:46.324Z: at async Jf (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2024:4775)
2023-06-23 06:53:46.325Z: at async gne (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2155:12125)
2023-06-23 06:53:46.326Z: at async mne (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2155:11866)
2023-06-23 06:53:46.327Z: {"outcome":"error","message":"Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.45.0-1687503145585 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/java:17 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-deploying-and-running-java-applications-in-azure-spring-apps-7f9e9754512cd96adff0a428878c32c8e86bf36ceca7ed190b8e9c827f0c5e58-features -f /tmp/devcontainercli-root/container-features/0.45.0-1687503145585/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder","description":"An error occurred setting up the container."}
2023-06-23 06:53:46.333Z: devcontainer process exited with exit code 1

====================================== ERROR ====================================
2023-06-23 06:53:46.337Z: Failed to create container.

2023-06-23 06:53:46.338Z: Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.45.0-1687503145585 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/java:17 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-deploying-and-running-java-applications-in-azure-spring-apps-7f9e9754512cd96adff0a428878c32c8e86bf36ceca7ed190b8e9c827f0c5e58-features -f /tmp/devcontainercli-root/container-features/0.45.0-1687503145585/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder
2023-06-23 06:53:46.340Z: Error Code: 1302

====================================== ERROR ====================================
2023-06-23 06:53:46.348Z: Container creation failed.

@vermegi
Copy link
Author

vermegi commented Jun 23, 2023

I retried rebuilding the container with azure-cli version 2.45.0, since that was the version working for me in this issue: Azure/azure-cli#26737
However, container build failed with same error message.

@joshspicer
Copy link
Member

joshspicer commented Jun 23, 2023

Thanks for the report. You already found #577, where we're tracking this. You may also find this notice useful

@rajankumar7
Copy link

Any update on this ? We are still encountering this issue.

@joshspicer
Copy link
Member

@rajankumar7 , have you seen the notice pinned on this repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants