-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
sentry-cli >= 2.21.3 does not work with rootless docker #1929
Comments
@Snack-X thank you for the very detailed issue report! It appears that we did make some changes to the compiler optimizations from version 2.21.2 to 2.21.3. However, we reverted one of the changes in 2.23.0 (commit 59fcf92) because it was causing problems when Sentry CLI was run in Xcode Cloud. Have you tried running |
Thanks for the response. That version was found with bisection from 2.0.0 to 2.28.0, so I think I've already tried >= 2.23.0. But I'll check it again just in case. |
Okay, please let me know once you have tried ≥2.23.0 again and have confirmed whether the issue is still occurring in those versions |
I can confirm both 2.23.0 and latest (2.28.0) still have same issue.
|
I've also found these issues which be related to this one, since sentry-cli is built with musl. Looks like musl has problem with DNS resolving. |
Thank you for the information and for linking those issues! I will investigate further to see whether we can fix this somehow, or whether this is something that needs to be fixed in musl |
@jrr I am unsure; a codebase-wide search for "musl" does not yield any results containing a version number |
Other than f226a6e, I don't see any other commits related to musl. Although it doesn't make sense to me, but I'm not an expert in this area. Previous docker image, getsentry/rust-musl-cross (repo) appears to be built in 2023-04-something with latest musl version, which would be
Although latest musl version at that time is I have no idea. |
Good finds, @Snack-X . Summarizing my understanding:
A couple ideas for how Sentry can get get musl's DNS improvements into sentry-cli binaries:
|
Yes, thank you both for this information! I wonder whether simply reverting f226a6e could solve this problem – perhaps we could try this before we implement one of the other solutions you proposed, @jrr, so that we can verify that this commit was indeed the cause? I am unaware of the reasoning behind the change in f226a6e though, so I will first confirm with @loewenheim (who authored the change) whether there is any reason we should not revert that commit. |
Thank you all for your work in investigating this issue! I have been experiencing the exact same symptoms when running GitLab CI jobs within a docker container (based on debian slim) that runs sentry-cli via the npm package https://www.npmjs.com/package/@sentry/cli Would we be able to experience the problem described by jrr in #1929 (comment) under these circumstances? I had spent a lot of time looking into docker DNS resolution, the DNS set up on the build runner server, EDNS etc.etc. but is the fundamental issue how sentry-cli binary itself is performing the DNS resolution? Happy to test a solution and report back if so 🫡 |
@joekeilty-oub From my understanding of the situation, it seems like it could be possible that the cause of your problem is the same since you are running the CLI inside a Linux Docker image. Let's see whether we are able to get this PR merged and whether that change ends up solving your issue |
@szokeasaurusrex Is this issue related to the error thrown when using sentry-cli in a Docker container? I've got it installed as a dependency as part of
|
@mzavattaro as far as I can tell, this looks like a separate issue. I don't recognize any of the error messages, and to me it looks like quite possibly the problem is occurring before Sentry CLI even gets called. Although, it's hard for me to tell since I'm not familiar with your particular setup. |
One thing folks still experiencing this issue might be able to try, while we wait for an upstream fix in If the command succeeds on the locally-compiled binary, this would confirm the problem likely lies with |
Environment
sentry-cli >= 2.21.3 + rootless docker
Steps to Reproduce
python:3.12
) and start new container (docker run --rm -it python:3.12 bash
)curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION=2.21.3 bash
)sentry-cli info
Expected Result
No error
Actual Result
(failure on authentication: API request failed)
Logs
While updating our nuxt web app's sentry module(
@nuxtjs/sentry
), we've also updated@sentry/webpack-plugin
from1.x.x
to2.x.x
.After this change, we started to see our CI/CD pipeline failing to publish releases and sourcemaps. The only error message we could see was
error: API request failed
caused by: [6] Couldn't resolve host name (Could not resolve host: sentry.io)
.Few hours of tests and bisection narrowed down to combination of rootless docker (used in our Actions runner) and sentry-cli >= 2.21.3. Standard docker installation works just fine, and older version of sentry-cli also has no problem -- which is the fix we chose.
We tested multiple configurations of OS and architectures, which all had same result:
I think some low level change made between 2.21.2 and 2.21.3 affected how DNS resolution works and created some kind of incompatibility.
It could be an issue of docker, it could be both, I don't know at this point. I hope this information is helpful.
The text was updated successfully, but these errors were encountered: