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

Sourcemap doesn't work and symbolicator_service has error: Failed to create cache directory #1331

Open
kkflie opened this issue Nov 15, 2023 · 10 comments

Comments

@kkflie
Copy link

kkflie commented Nov 15, 2023

Self-Hosted Version

23.10.1

CPU Architecture

x86_64

Docker Version

24.0.2

Docker Compose Version

2.21.0

Steps to Reproduce

  1. ./install.sh.
  2. Create vue project on self-hosted sentry.
  3. npm create vue@latest
  4. write a button to throw error
  5. npx @sentry/wizard@latest -i sourcemaps
  6. yarn build && serve dist
  7. click button

Expected Result

error can be located in source code

Actual Result

The error cannot be located in source code.
I have already uploaded sourcemap,but error doesn't locate in source code. I try the same project on saas version, it's fine.
image

image

After looking up the issues list, I thought it might be related to Symbolicator, so I checked the logs., here it is:

sentry-self-hosted-symbolicator-1                                  | 2023-11-15T02:30:28.991978292Z ERROR symbolicator_service::caching::memory: Failed to create cache directory: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
sentry-self-hosted-symbolicator-1                                  | 2023-11-15T02:30:28.992008123Z ERROR symbolicator_service::caching::cache_error: error=Permission denied (os error 13)

So I wonder which folder should I grant permission?

The specific code configuration of this project is as follows:
image
image
image
image
image

Event ID

No response

@hubertdeng123
Copy link
Member

Have you attempted to make sure you're running Sentry as a user with escalated privileges? Looks like symbolicator is having issues creating a directory for caches

@kkflie
Copy link
Author

kkflie commented Nov 17, 2023

@hubertdeng123 I run Sentry with root privileges. I've checked the logs for sentry-self-hosted-symbolicator-cleanup-1, and there are no more error messages now. However, I still can't trace the error back to the source code. What other places can I investigate to resolve this issue?

@kkflie
Copy link
Author

kkflie commented Nov 17, 2023

@hubertdeng123
Hi, after comparing the Saas version with the self-hosted version, I noticed that the error responses from the Saas version include sourcemap information, while those from the self-hosted version do not.

And It seems that in the Saas version, there is a call to the following API endpoint to retrieve the sourcemap: https://us.sentry.io/api/0/projects/username/projectname/events/eventid/source-map-debug-blue-thunder-edition/. However, in the self-hosted version, this API endpoint is not being called.

Do you have any idea what could be causing this situation?

The following are screenshots of the error log details for the same project, with identical errors occurring in both the Saas and self-hosted versions.

saas:

image

self-hosted:

image

@hubertdeng123
Copy link
Member

What happens if you go to your project settings and go to Source Maps? It is under the Processing group.

Screenshot 2023-11-20 at 3 18 57 PM

@kkflie
Copy link
Author

kkflie commented Nov 21, 2023

@hubertdeng123
I checked sourcemap menu, and there are sourcemaps

image

@hubertdeng123
Copy link
Member

Transferring over to symbolicator to see if they have more context here.

@hubertdeng123 hubertdeng123 transferred this issue from getsentry/self-hosted Nov 22, 2023
@kkflie
Copy link
Author

kkflie commented Nov 23, 2023

@hubertdeng123 My bad, it seems sentry-self-hosted-symbolicator-1 still have problem, but I've already run sentry as root role, what else should I do? The following are logs of sentry-self-hosted-symbolicator-1:

2023-11-22T06:38:53.035693474Z ERROR symbolicator_service::caching::memory: Failed to create cache directory: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
2023-11-22T06:38:53.035765432Z ERROR symbolicator_service::caching::memory: Failed to create cache directory: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
2023-11-22T06:38:53.035797992Z ERROR symbolicator_service::caching::memory: Failed to create cache directory: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
2023-11-22T06:38:53.035830088Z ERROR symbolicator_service::caching::cache_error: error=Permission denied (os error 13)
2023-11-22T06:38:53.124925377Z ERROR symbolicator_service::caching::memory: Failed to create cache directory: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
2023-11-22T06:38:53.124988082Z ERROR symbolicator_service::caching::memory: Failed to create cache directory: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
2023-11-22T06:38:53.12501142Z ERROR symbolicator_service::caching::memory: Failed to create cache directory: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
2023-11-22T06:38:53.125039687Z ERROR symbolicator_service::caching::cache_error: error=Permission denied (os error 13)
2023-11-22T06:38:53.215112002Z ERROR symbolicator_service::caching::memory: Failed to create cache directory: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
2023-11-22T06:38:53.215196394Z ERROR symbolicator_service::caching::memory: Failed to create cache directory: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
2023-11-22T06:38:53.215223741Z ERROR symbolicator_service::caching::memory: Failed to create cache directory: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
2023-11-22T06:38:53.21526547Z ERROR symbolicator_service::caching::cache_error: error=Permission denied (os error 13)

@hubertdeng123
Copy link
Member

@kkflie Did you double check to make sure the docker user you're using has the necessary permissions? Otherwise, maybe specify root as a user in your docker-compose file to see if that works?

https://stackoverflow.com/questions/76488930/permission-denied-errors-in-docker-even-as-root

@kkflie
Copy link
Author

kkflie commented Nov 29, 2023

@hubertdeng123 Thanks for replying, I have modified the docker-compose.yml as per your provided answer. Subsequently, I executed the 'docker-compose down' and 'docker-compose up -d' commands. Upon checking, I found that the user for sentry-self-hosted-symbolicator-1 is now set to root. However, when I examine the logs for sentry-self-hosted-symbolicator-1, there are still error messages.

image

image

image

@hubertdeng123
Copy link
Member

Unfortunately, I'm not sure what else might be going wrong here 🥲. I hope you're able to find something out

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

No branches or pull requests

2 participants