Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

[BUG]: 502 Bad Gateway during credentials process #26

Open
thinkjrs opened this issue Nov 28, 2020 · 0 comments
Open

[BUG]: 502 Bad Gateway during credentials process #26

thinkjrs opened this issue Nov 28, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@thinkjrs
Copy link
Member

Describe the bug

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
    super().init_process()
  File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
    mod = importlib.import_module(module)
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/application/app.py", line 27, in <module>
    import utilities
  File "/application/utilities.py", line 6, in <module>
    import pycmc
  File "/usr/local/lib/python3.8/site-packages/pycmc/__init__.py", line 7, in <module>
    from . import credentials_manager
  File "/usr/local/lib/python3.8/site-packages/pycmc/credentials_manager.py", line 52, in <module>
    credentials.Update()  # first refresh our credentials
  File "/usr/local/lib/python3.8/site-packages/pycmc/credentials.py", line 103, in Update
    fetched = FetchAccessToken()
  File "/usr/local/lib/python3.8/site-packages/pycmc/credentials.py", line 182, in FetchAccessToken
    response.raise_for_status()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://api.chartmetric.com/api/token

To Reproduce
See above stacktrace, however, it's obvious that something in the update process caused the error. ⚠️ The error only occurred for two minutes on November 25th between 9:15 and 9:16 CST.

Expected behavior
No error.

Additional context
The credentials update process is byzantine and could use an update. Possibly related to #25 !

@thinkjrs thinkjrs added the bug Something isn't working label Nov 28, 2020
@thinkjrs thinkjrs self-assigned this Nov 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant