Open choi2601 opened 1 month ago
did you run the sentry upgrade
command inside the sentry-web pod?
@tyr1k Yes, I successfully ran sentry upgrade
to migrate the database data, and both the user and organization were created in Sentry
. However, the error persists.
@choi2601 what proxy do you use? show logs
@tyr1k hi, currently i am using Nginx as the proxy server.
Here are the logs:
Defaulted container "nginx" out of: nginx, preserve-logs-symlinks (init)
2024/08/21 05:36:59 [error] 48#48: *238880 connect() failed (111: Connection refused) while connecting to upstream, client: [REDACTED_IP], server: , request: "POST /api/1/envelope/ HTTP/1.1", upstream: "http://[REDACTED_IP]:3000/api/1/envelope/", host: "[REDACTED_HOST]"
[REDACTED_IP] - - [21/Aug/2024:05:37:00 +0000] "POST /api/1/envelope/ HTTP/1.1" 502 150 "-" "sentry.python/2.2.1" "-"
2024/08/21 05:37:00 [error] 48#48: *238882 connect() failed (111: Connection refused) while connecting to upstream, client: [REDACTED_IP], server: , request: "POST /api/1/envelope/ HTTP/1.1", upstream: "http://[REDACTED_IP]:3000/api/1/envelope/", host: "[REDACTED_HOST]"
2024/08/21 05:37:01 [error] 48#48: *238884 connect() failed (111: Connection refused) while connecting to upstream, client: [REDACTED_IP], server: , request: "POST /api/1/envelope/ HTTP/1.1", upstream: "http://[REDACTED_IP]:3000/api/1/envelope/", host: "[REDACTED_HOST]"
[REDACTED_IP] - - [21/Aug/2024:05:37:01 +0000] "POST /api/1/envelope/ HTTP/1.1" 502 150 "-" "sentry.python/2.2.1" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:04 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:04 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:04 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:09 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:09 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:09 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:14 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:14 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:14 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:19 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:19 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:19 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:24 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:24 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:24 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:29 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:29 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:29 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:34 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:34 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:34 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:39 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:39 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:39 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:44 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:44 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:44 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:49 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:49 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:49 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:54 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:54 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:54 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:59 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:59 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:59 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:37:59 +0000] "POST /api/1/envelope/ HTTP/1.1" 502 150 "-" "sentry.python/2.2.1" "-"
2024/08/21 05:37:59 [error] 48#48: *238880 connect() failed (111: Connection refused) while connecting to upstream, client: [REDACTED_IP], server: , request: "POST /api/1/envelope/ HTTP/1.1", upstream: "http://[REDACTED_IP]:3000/api/1/envelope/", host: "[REDACTED_HOST]"
[REDACTED_IP] - - [21/Aug/2024:05:38:00 +0000] "POST /api/1/envelope/ HTTP/1.1" 502 150 "-" "sentry.python/2.2.1" "-"
2024/08/21 05:38:00 [error] 48#48: *238882 connect() failed (111: Connection refused) while connecting to upstream, client: [REDACTED_IP], server: , request: "POST /api/1/envelope/ HTTP/1.1", upstream: "http://[REDACTED_IP]:3000/api/1/envelope/", host: "[REDACTED_HOST]"
2024/08/21 05:38:01 [error] 48#48: *238884 connect() failed (111: Connection refused) while connecting to upstream, client: [REDACTED_IP], server: , request: "POST /api/1/envelope/ HTTP/1.1", upstream: "http://[REDACTED_IP]:3000/api/1/envelope/", host: "[REDACTED_HOST]"
[REDACTED_IP] - - [21/Aug/2024:05:38:01 +0000] "POST /api/1/envelope/ HTTP/1.1" 502 150 "-" "sentry.python/2.2.1" "-"
[REDACTED_IP] - - [21/Aug/2024:05:38:04 +0000] "GET / HTTP/1.1" 302 0 "-" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:38:04 +0000] "GET /auth/login/ HTTP/1.1" 302 0 "http://[REDACTED_IP]:8080/" "kube-probe/1.28" "-"
[REDACTED_IP] - - [21/Aug/2024:05:38:04 +0000] "GET /auth/login/sentry/ HTTP/1.1" 200 17134 "http://[REDACTED_IP]:8080/auth/login/" "kube-probe/1.28" "-"
and nginx configuration is that:
nginx:
enabled: true
containerPort: 8080
existingServerBlockConfigmap: '{{ template "sentry.fullname" . }}'
resources: {}
replicaCount: 1
service:
type: NodePort
ports:
http: 80
nodePorts:
http: "32510"
extraLocationSnippet: false
Access-Control-Allow-Origin: "*"
Check routing url, / must be route to web, /api/* to relay.
Hi @serrrios, Thank you for your advice. I followed your instructions and updated the extraLocationSnippet in my values.yaml as follows:
extraLocationSnippet: |
location / {
proxy_pass http://sentry-web:9000;
}
location /api/ {
proxy_pass http://sentry-relay:3000;
}
But persisent error occured. (Actually, I'm not entirely sure if I applied your advice correctly.)
What’s confusing me right now is how the /api/*
routing is working. Some requests are receiving responses correctly, while others are resulting in errors.
Requests like the ones below are successed:
Request URL: http://[REDACTED_IP]/api/0/organizations/?member=1 Request Method: GET Status Code: 200 OK Remote Address: [REDACTED_IP]:32510 Referrer Policy: strict-origin-when-cross-origin
[
{
"id": "1",
"slug": "sentry",
"status": {
"id": "active",
"name": "active"
},
"name": "Sentry",
"dateCreated": "2024-08-22T00:20:03.964241Z",
"isEarlyAdopter": false,
"require2FA": false,
"requireEmailVerification": false,
"avatar": {
"avatarType": "letter_avatar",
"avatarUuid": null,
"avatarUrl": null
},
"links": {
"organizationUrl": "http://[REDACTED_IP]:32510",
"regionUrl": "http://[REDACTED_IP]:32510"
},
"hasAuthProvider": false,
"features": [
"session-replay-sdk",
"relay",
"sso-basic",
"session-replay",
"integrations-ticket-rules",
"reprocessing-v2",
"advanced-search",
"discover-query",
"integrations-chat-unfurl",
"integrations-stacktrace-link",
"large-debug-files",
"session-replay-slack-new-issue",
"transaction-metrics-extraction",
"dashboards-edit",
"integrations-alert-rule",
"invite-members",
"data-forwarding",
"integrations-issue-sync",
"issue-platform",
"set-grouping-config",
"related-events",
"session-replay-recording-scrubbing",
"integrations-issue-basic",
"global-views",
"shared-issues",
"open-membership",
"dashboards-rh-widget",
"session-replay-sdk-errors-only",
"symbol-sources",
"alert-filters",
"sso-saml2",
"session-replay-ui",
"discover-basic",
"dashboards-basic",
"integrations-incident-management",
"session-replay-issue-emails",
"integrations-event-hooks",
"session-replay-new-event-counts",
"event-attachments",
"incidents",
"onboarding",
"invite-members-rate-limits",
"dashboards-mep",
"session-replay-a11y-tab",
"performance-view",
"discover",
"custom-symbol-sources",
"api-keys"
]
}
]
Request URL: http://[REDACTED_IP]:32510/api/0/assistant/ Request Method: GET Status Code: 200 OK Remote Address: [REDACTED_IP]:32510 Referrer Policy: strict-origin-when-cross-origin
[
{
"guide": "issue",
"seen": false
},
{
"guide": "issue_stream",
"seen": false
},
{
"guide": "alerts_write_member",
"seen": false
},
{
"guide": "alerts_write_owner",
"seen": false
},
{
"guide": "trace_view",
"seen": false
},
{
"guide": "span_op_breakdowns_and_tag_explorer",
"seen": false
},
{
"guide": "team_key_transactions",
"seen": false
},
{
"guide": "project_transaction_threshold",
"seen": false
},
{
"guide": "project_transaction_threshold_override",
"seen": false
},
{
"guide": "semver",
"seen": false
},
{
"guide": "release_stages",
"seen": false
},
{
"guide": "new_page_filters",
"seen": false
},
{
"guide": "new_page_filters_pin",
"seen": false
},
{
"guide": "releases_widget",
"seen": false
},
{
"guide": "activate_sampling_rule",
"seen": false
},
{
"guide": "create_conditional_rule",
"seen": false
},
{
"guide": "explain_archive_button_issue_details",
"seen": false
},
{
"guide": "explain_archive_tab_issue_stream",
"seen": false
},
{
"guide": "explain_new_default_event_issue_detail",
"seen": false
},
{
"guide": "new_project_filter",
"seen": false
},
{
"guide": "explain_archive_button_issue_stream",
"seen": false
},
{
"guide": "ddm_view",
"seen": false
},
{
"guide": "metrics_onboarding",
"seen": false
}
]
Request URL: http://[REDACTED_IP]:32510/api/0/organizations/sentry/?detailed=0&include_feature_flags=1
Request Method: GET
Status Code: 200 OK
Remote Address: [REDACTED_IP]:32510
Referrer Policy: strict-origin-when-cross-origin
no respose
But when send a request to http://[REDACTED_IP]:32510/api/1/envelope/?sentry_key=[SENTRY_KEY]&sentry_version=7&sentry_client=sentry.javascript.react%2F8.0.0
, receive
Request URL: http://[REDACTED_IP]:32510/api/1/envelope/?sentry_key=[SENTRY_KEY]&sentry_version=7&sentry_client=sentry.javascript.react%2F8.0.0 Request Method: POST Status Code: 502 Bad Gateway Remote Address: [REDACTED_IP]:32510 Referrer Policy: origin
Could you perhaps offer me some advice on how to deal with this terrible situation I'm in?
It shouldn't have been taken so literally =) Look at how the Helm chart generates the config for Nginx or the official config for Self. https://github.com/getsentry/self-hosted/blob/master/nginx/nginx.conf After look logs on relay, web and wokers.
@serrrios Thank you for your answer, I'll try to search for relevant information :-)
I had the similar-ish problem, check what the sentry-snuba-api
pod logs are and if there is any errors, run snuba bootstrap --force
on that pod. That fixed the problem for me
Although the problem origin can be entirely different
I was still struggling with that problem. I'll give it a try! Thank you🌝
check your disk space. try clear or remove docker logs if high disk usage exists.
I encountered the error Organization by slug [None] not found on my self-hosted Sentry instance, and while reviewing the error guide, I saw the message There was an error loading data.
Here is the relevant portion of my Sentry web's yaml file:
Here are the relevant logs from sentry-web:
I think occured error in this fetch api call's code.
Could you provide guidance on resolving this issue?