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

Error starting gunicorn.service on VM Running Oracle Linux 8.9 #631

Open
DanielBatesJ opened this issue Mar 26, 2024 · 4 comments
Open

Error starting gunicorn.service on VM Running Oracle Linux 8.9 #631

DanielBatesJ opened this issue Mar 26, 2024 · 4 comments

Comments

@DanielBatesJ
Copy link

Hello, I am working through setting up OKIT on a new Oracle Linux 8.9-2024.02.26-0 VM on Oracle Cloud Infrastructure.

I am following the Native Oracle Linux install instructions running as root (OKIT installed in root directory), with the OCI CLI configured and tested (config & keys stored in root).

After following all of the steps listed in the instructions (using http), checking the status sudo systemctl status gunicorn.service initially shows as active and running, but after a few seconds, the process exits due to a failure in some Python code farther up the chain.

Mar 26 21:06:24 okitdemo gunicorn[9276]:   File "/usr/local/lib/python3.6/site-packages/git/__init__.py", line 8, in <module>
Mar 26 21:06:24 okitdemo gunicorn[9276]:     from git.exc import *                       # @NoMove @IgnorePep8
Mar 26 21:06:24 okitdemo gunicorn[9276]:   File "/usr/local/lib/python3.6/site-packages/git/exc.py", line 10, in <module>
Mar 26 21:06:24 okitdemo gunicorn[9276]:     from git.compat import safe_decode
Mar 26 21:06:24 okitdemo gunicorn[9276]:   File "/usr/local/lib/python3.6/site-packages/git/compat.py", line 32, in <module>
Mar 26 21:06:24 okitdemo gunicorn[9276]:     from git.types import TBD
Mar 26 21:06:24 okitdemo gunicorn[9276]:   File "/usr/local/lib/python3.6/site-packages/git/types.py", line 12, in <module>
Mar 26 21:06:24 okitdemo gunicorn[9276]:     from typing_extensions import Final, Literal, SupportsIndex
Mar 26 21:06:24 okitdemo gunicorn[9276]: ImportError: cannot import name 'SupportsIndex'
Mar 26 21:06:24 okitdemo gunicorn[9276]: [2024-03-26 21:06:24 +0000] [9276] [INFO] Worker exiting (pid: 9276)
[root@okitdemo ~]# sudo systemctl status gunicorn.service
● gunicorn.service - gunicorn daemon
   Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2024-03-26 21:06:25 GMT; 771ms ago
  Process: 9269 ExecStart=/usr/local/bin/gunicorn okitweb.wsgi:app --config /okit/config/gunicorn_http.py (code=exited, status=3)
 Main PID: 9269 (code=exited, status=3)

Mar 26 21:06:24 okitdemo gunicorn[9276]: ImportError: cannot import name 'SupportsIndex'
Mar 26 21:06:24 okitdemo gunicorn[9276]: [2024-03-26 21:06:24 +0000] [9276] [INFO] Worker exiting (pid: 9276)
Mar 26 21:06:25 okitdemo gunicorn[9269]: [2024-03-26 21:06:25 +0000] [9269] [ERROR] Worker (pid:9274) exited with code 3
Mar 26 21:06:25 okitdemo gunicorn[9269]: [2024-03-26 21:06:25 +0000] [9269] [ERROR] Worker (pid:9276) was sent SIGTERM!
Mar 26 21:06:25 okitdemo gunicorn[9269]: [2024-03-26 21:06:25 +0000] [9269] [ERROR] Worker (pid:9272) was sent SIGTERM!
Mar 26 21:06:25 okitdemo gunicorn[9269]: [2024-03-26 21:06:25 +0000] [9269] [ERROR] Worker (pid:9273) was sent SIGTERM!
Mar 26 21:06:25 okitdemo gunicorn[9269]: [2024-03-26 21:06:25 +0000] [9269] [ERROR] Shutting down: Master
Mar 26 21:06:25 okitdemo gunicorn[9269]: [2024-03-26 21:06:25 +0000] [9269] [ERROR] Reason: Worker failed to boot.
Mar 26 21:06:25 okitdemo systemd[1]: gunicorn.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
Mar 26 21:06:25 okitdemo systemd[1]: gunicorn.service: Failed with result 'exit-code'.

In /usr/local/lib/python3.6/site-packages/git/types.py

import os
import sys
from typing import Union, Any

if sys.version_info[:2] >= (3, 8):
    from typing import Final, Literal, SupportsIndex  # noqa: F401
else:
    from typing_extensions import Final, Literal, SupportsIndex

if sys.version_info[:2] < (3, 9):
    # Python >= 3.6, < 3.9
    PathLike = Union[str, os.PathLike]
elif sys.version_info[:2] >= (3, 9):
    # os.PathLike only becomes subscriptable from Python 3.9 onwards
    PathLike = Union[str, 'os.PathLike[str]']  # forward ref as pylance complains unless editing with py3.9+

TBD = Any

Lit_config_levels = Literal['system', 'global', 'user', 'repository']

python --version = Python 3.6.8

It seems the file is already checking for Python Versioning for this library, and only fails on the last import for 'SupportsIndex', not any of the previous from the same typing_extensions.

I can't seem to get a good idea of where to go from here, I've rebooted the instance, and that had no impact. Any help / guidance on this would be appreciated.

Thank you

@toxophilist
Copy link
Member

@DanielBatesJ Can you try updating to a later release of python.

@jlirette1
Copy link

I am having the exact same issue. I upgraded python as suggested above and got the same result.

@toxophilist
Copy link
Member

@jlirette1 What version of python have you upgraded to. Looks like SupportsIndex was only added in 3.8. Also you'll need to make sure that your upgraded version of python marked as the default.

@jlirette1
Copy link

Marking as default fixed my problem. Thanks

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

No branches or pull requests

3 participants