-
Notifications
You must be signed in to change notification settings - Fork 401
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
Terraform - Downloading GPG Key step gets stuck #323
Comments
I have the same issue. |
I am having the same issue. Closing the remote container in VSCode and rebuilding the container did not solve my issue |
Same issue with the Python feature getting stuck downloading PGP key |
Here's some additional details. In addition, I have run in a vanilla ubuntu devcontainer without the terraform feature installed and it hangs when executing I've also tried building the devcontainer on multiple different internet connections and am able to visit keyserver.ubuntu.com, keys.openpgp.org, and keyserver.pgp.com in a browser, so I don't believe that it is an external network or routing issue I am able to reliably reproduce the issues, so if there are any additional debug steps you'd like me to take, let me know. System Information
devcontainer.json // For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/terraform:1": {}
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// 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": "uname -a",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
} |
I couldn't reproduce the issue with the dev config mentioned in #323 (comment) 😓 I've tried multiple times on a Windows and MacOS machine, every time the devcontainer is created/opened fine. @sarcasmboy Could you provide me information on your Dev Container Extension version & VS Code version? It is strange that in the original post, the container was able to download gpg keys for the @joshspicer / @edgonmsft any thoughts on how to fix this? or could you reproduce? |
vscode details
|
I have the same exact configuration. Still can't reproduce. @sarcasmboy by any change do you have gpg installed on your machine? I wonder if this could be an issue? 🤔 |
I have same issue. Below is and it stucks only at Terraform Stage.
|
@samruddhikhandale I copied the install.sh script into my repository and ran it within a vanilla output
|
I've been trying to think here but without a repro not sure what the issue could be, does it maybe repro localy with Devcontainers extension? |
@edgonmsft I'm not sure that I understand what you mean by "repro locally with Devcontainers extension". Could you elaborate? |
There are so many people able to reproduce this issue. Even running install.sh on plain vanilla container in interactive mode renders same error |
The feature script succeeds for me. Using the key id Maybe something with the lookup on the key servers changed. E.g., https://keys.openpgp.org/search?q=72D7468F complains that "Search by Short Key ID is not supported.". Not sure why the feature script still succeeds. |
I am observing a similar issue trying to install Python. I tried originally via Python install script which has worked for me for 1+ years. Yesterday/today the script started hanging at "Downloading GPG key..." so I migrated to use the feature instead and now I am observing that the Python feature is hanging at "Downloading GPG key..." |
@sarcasmboy Can you append
|
I have the same issue for several days now. |
@samruddhikhandale No change in the output output
I also added some additional outputs to help debug echo "(*) Downloading GPG key..."
echo "${keyring_args}"
echo "${keys}"
( echo "${keys}" | xargs -n 1 gpg --verbose -q ${keyring_args} --recv-keys) 2>&1 && gpg_ok="true" output
|
I'm not able to reproduce the issue anymore with my own devcontainer and the sample one mentioned by @sarcasmboy. Closing the issue for now, but feel free to comment/reopen if it doesn't work for you. |
I'm still getting the same issue, unfortunately. But I've played around with it and discovered that the issue for me was port 80 on the ubuntu keyserver.
Running the command
And it just hangs there.
If I change my
But I've tried each of the keyservers independently and found issues with all of them.
I've also tried getting the key via curl from the ubuntu keyserver on port 80, and it worked just fine: I don't know what can be done to fix this, though since it seems to be behaving differently for everyone. I just wanted to share my findings. |
I am also continuing to experience the issue. Not sure what information or help I can provide to resolve the issue. |
Reopening this issue for others, but I can't reproduce it anymore. Not sure why. |
If it helps ive tried different base images (the latest ubuntu, as well as ubuntu:jammy-20221101) Im also experiencing this with the ruby feature, so its not just terraform. |
I was able to work around the issue. I created a folder in the I then copied the devcontainer-feature.json and install.sh files for the terraform feature into that folder and updated the devcontainer.json to reference it. It looks like at line 66 of the I added lines to override the GPG_KEY_SERVERS variable, removing the :80 for the ubuntu keyserver, which resolved the issue. Is there anyway we can update the https://aka.ms/vscode-dev-containers/script-library/settings.env and remove the :80 reference? |
@nabil-becker @eitamal Thanks for digging into this! It's very strange that GPG key gets downloaded if you don't specify a port for Ubuntu Key server. @nabil-becker / @eitamal Is there a way for you to check if port 80 is blocked on your machine or if VPN is interfering with it? |
I could help remove the port 80 suffix from Can I get a 👍 if the following dev config works for you? {
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/samruddhikhandale/test-terraform/terraform:1": {}
}
} I have created a temporary https://github.com/samruddhikhandale/test-terraform/blob/main/src/terraform/install.sh#L29 |
Created a PR - #353 |
Your change seems to be working, thank you |
Merged the PR, closing as resolved. ✨ Feel free to reopen if the issue resurfaces, thanks! |
Thank you. Im also getting the same issue with the ruby and python features. Do we need new issues opened for that? |
You may, but I have already started working on updating all other Features. I would report here once completed. |
PR 👉 #354 |
Hi samruddhikhandale, I noticed after your latest change my terraform feature install hangs at downloading the GPG key. I was referring to major version 1 as a result it picks up your change 1.1.1. My issue is solved using version 1.1.0 again. |
Looks like for some folks |
Hey, this is still happening as of today. devcontainer:
output error:
|
Hi @alexandreczg 👋 This issue looks similar to #435. @alexandreczg are you trying to run the dev container in a proxy environment? If so, can you add the Also, the smoke test passes for the terraform Feature. Hence, I suspect an issue with the proxy. |
Hi @samruddhikhandale , thank you for the quick reply. I'm not sure what a "proxy environment" is in this context. I tried running the same container in windows and WSL2. Same outcome. The only thing I can think of is my company's VPN. What should I put in the httpProxy option? It requires a string. |
Hi again @samruddhikhandale , Can confirm, the issue is the VPN. Tried without and built it without any issues. |
@alexandreczg setting |
Thank you, Dumb question, but how do I find my proxy settings? I am very unfamiliar with this. Any help would be appreciated! |
Hello,
Since a few days I notice that the GPG Key download step in the Terraform feature hangs:
Screenshot:
I have tried this on various systems/connections and it seems to consistently hang. As you can see, other features install fine.
Any idea how to fix this? Thanks!
The text was updated successfully, but these errors were encountered: