Sentry-cli: Random 502 Bad Gateway When Uploading CodePush Sourcemaps

Created on 24 Apr 2019  Â·  2Comments  Â·  Source: getsentry/sentry-cli

Platform: React Native
Sentry Instance: On Premise (9.0.0)
Sentry Cli Version: 1.41.0
Run via: CircleCI

About 30-50% of the time, the below error occurs when uploading CodePush sourcemaps to our on premise Sentry site. Rerunning the same job right afterwards usually succeeds without issue. This also happens to a different mobile team as well (using a Mac Mini, not CircleCI).

Is there something that we should be looking at on our on premise instance setup to improve the reliability?

[17:42:20]: â–¸ INFO    2019-04-24 17:42:20.366426923 +00:00 Loaded config from /home/circleci/.sentryclirc
[17:42:20]: â–¸ DEBUG   2019-04-24 17:42:20.366501635 +00:00 sentry-cli version: 1.41.0, platform: "linux", architecture: "x86_64"
[17:42:20]: â–¸ INFO    2019-04-24 17:42:20.366514395 +00:00 sentry-cli was invoked with the following command line: "/home/circleci/REDACTED/node_modules/@sentry/cli/sentry-cli" "react-native" "appcenter" "REDACTED" "android" "build/android/CodePush" "--bundle-id" "REDACTED" "--deployment" "Prototype" "--log-level=debug"
[17:42:20]: â–¸ > Fetching latest AppCenter deployment info
[17:42:22]: â–¸ > Processing react-native AppCenter sourcemaps
[17:42:22]: â–¸ > Analyzing 2 sources
[17:42:22]: â–¸ > Rewriting sources
[17:42:23]: â–¸ > Adding source map references
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.042676397 +00:00 request POST https://REDACTED/api/0/projects/REDACTED/REDACTED/releases/
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.042700957 +00:00 using token authentication
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.042708534 +00:00 json body: {"version":"REDACTED-codepush:v713","projects":["REDACTED"]}
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.042718200 +00:00 retry number 0, max retries: 0
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.069785007 +00:00 > POST /api/0/projects/REDACTED/REDACTED/releases/ HTTP/1.1
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.069807049 +00:00 > Host: REDACTED
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.069811829 +00:00 > Accept: */*
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.069815997 +00:00 > Connection: TE
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.069820147 +00:00 > TE: gzip
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.069824157 +00:00 > User-Agent: sentry-cli/1.41.0
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.070143700 +00:00 > Authorization: Bearer 9fee6009***
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.070149042 +00:00 > Content-Type: application/json
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.070153143 +00:00 > Content-Length: 89
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180643631 +00:00 < HTTP/1.1 201 CREATED
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180669940 +00:00 < Date: Wed, 24 Apr 2019 17:42:23 GMT
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180677770 +00:00 < Content-Type: application/json
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180684131 +00:00 < Content-Length: 456
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180689105 +00:00 < Connection: keep-alive
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180693707 +00:00 < X-XSS-Protection: 1; mode=block
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180699725 +00:00 < Content-Language: en
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180704368 +00:00 < X-Content-Type-Options: nosniff
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180709841 +00:00 < Vary: Accept-Language, Cookie
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180715966 +00:00 < Allow: GET, POST, HEAD, OPTIONS
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180720887 +00:00 < X-Frame-Options: deny
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180741129 +00:00 response status: 201
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180749114 +00:00 body: {"dateReleased": null, "commitCount": null, "url": null, "data": {}, "lastDeploy": null, "deployCount": null, "dateCreated": "2019-04-24T17:42:23.156Z", "lastEvent": null, "version": "REDACTED-codepush:v713", "firstEvent": null, "lastCommit": null, "shortVersion": "codepush:v713", "authors": [], "owner": null, "newGroups": 0, "ref": null, "projects": [{"slug": "REDACTED", "name": "REDACTED App (Internal/Prototype)"}]}
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180906818 +00:00 request GET https://REDACTED/api/0/projects/REDACTED/REDACTED/releases/REDACTED-codepush:v713/files/?cursor=
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180914728 +00:00 using token authentication
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180919322 +00:00 retry number 0, max retries: 0
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.180999345 +00:00 > GET /api/0/projects/REDACTED/REDACTED/releases/REDACTED-codepush:v713/files/?cursor= HTTP/1.1
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.181004365 +00:00 > Host: REDACTED
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.181008503 +00:00 > Accept: */*
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.181012591 +00:00 > Connection: TE
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.181016518 +00:00 > TE: gzip
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.181020514 +00:00 > User-Agent: sentry-cli/1.41.0
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.181041290 +00:00 > Authorization: Bearer 9fee6009***
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.183222729 +00:00 < HTTP/1.1 502 Bad Gateway
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.183235378 +00:00 < Server: awselb/2.0
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.183241346 +00:00 < Date: Wed, 24 Apr 2019 17:42:23 GMT
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.183246682 +00:00 < Content-Type: text/html
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.183251536 +00:00 < Content-Length: 138
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.183256790 +00:00 < Connection: keep-alive
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.183269634 +00:00 response status: 502
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.183276759 +00:00 body: <html>
[17:42:23]: â–¸ <head><title>502 Bad Gateway</title></head>
[17:42:23]: â–¸ <body bgcolor="white">
[17:42:23]: â–¸ <center><h1>502 Bad Gateway</h1></center>
[17:42:23]: â–¸ </body>
[17:42:23]: â–¸ </html>
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.183992867 +00:00 error: running update nagger
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.184001612 +00:00 skipping update nagger because session is not attended
[17:42:23]: â–¸ error: API request failed
[17:42:23]: â–¸ caused by: sentry reported an error: bad gateway (http status: 502)
[17:42:23]: â–¸ DEBUG   2019-04-24 17:42:23.184391495 +00:00 client close; no transport to shut down  (from sentry)

Thank you in advance for any assistance!

Most helpful comment

We've possibly pinpointed the issue.

Adding http.keepalive=false to our sentry.properties file seems to have stopped these failures.

Not sure if this might be an issue with the cli in the end or not, but if not, feel free to close this.

All 2 comments

We've possibly pinpointed the issue.

Adding http.keepalive=false to our sentry.properties file seems to have stopped these failures.

Not sure if this might be an issue with the cli in the end or not, but if not, feel free to close this.

Closing the issue, as it seems like the original issue has been partially resolved or there is a working solution. I'd prefer someone to create a new issue with a fresh description if it's still an issue.
Please do not hesitate to ping me if it is still relevant, and I will happily reopen and work on it.
Cheers!

Was this page helpful?
0 / 5 - 0 ratings