Hello.
I am using the Helm chart provided in the other repository for installing diffgram in a Kubernetes cluster. The problem is the two containers (diffgram-default and diffgram-walrus) cannot find the following file /etc/gcp/sa_crendetials
. If I am using Azure Storage Account to store the static files, this error should not occur. Anyways, I wonder if I am doing this right so I will paste the values.yaml
file and the log file of the exception that I obtained.
[2021-06-25 10:49:00 +0000] [8] [INFO] Starting gunicorn 20.0.4
[2021-06-25 10:49:00 +0000] [8] [INFO] Listening at: http://0.0.0.0:8080 (8)
[2021-06-25 10:49:00 +0000] [8] [INFO] Using worker: sync
[2021-06-25 10:49:00 +0000] [11] [INFO] Booting worker with pid: 11
[2021-06-25 10:49:00 +0000] [12] [INFO] Booting worker with pid: 12
[2021-06-25 10:49:00 +0000] [13] [INFO] Booting worker with pid: 13
[2021-06-25 10:49:00 +0000] [14] [INFO] Booting worker with pid: 14
[2021-06-25 10:49:01 +0000] [15] [INFO] Booting worker with pid: 15
[2021-06-25 10:49:05 +0000] [11] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/workers/base.py", line 119, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.6/dist-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.6/dist-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/app/main.py", line 37, in <module>
import shared.database_setup_supporting
File "/app/shared/database_setup_supporting.py", line 2, in <module>
from shared.database.discussion.discussion_comment import DiscussionComment
File "/app/shared/database/discussion/discussion_comment.py", line 2, in <module>
from shared.database.common import *
File "/app/shared/database/common.py", line 41, in <module>
from shared import data_tools_core
File "/app/shared/data_tools_core.py", line 3, in <module>
from shared.data_tools_core_gcp import DataToolsGCP
File "/app/shared/data_tools_core_gcp.py", line 15, in <module>
logger = get_shared_logger()
File "/app/shared/shared_logger.py", line 8, in get_shared_logger
shared_abstract_logger.configure_concrete_logger(system_mode=settings.DIFFGRAM_SYSTEM_MODE)
File "/app/shared/utils/logging.py", line 53, in configure_concrete_logger
self.logger = self.configure_gcp_logger()
File "/app/shared/utils/logging.py", line 72, in configure_gcp_logger
logging_client = gcp_logging.Client()
File "/usr/local/lib/python3.6/dist-packages/google/cloud/logging/client.py", line 127, in __init__
project=project, credentials=credentials, _http=_http
File "/usr/local/lib/python3.6/dist-packages/google/cloud/client.py", line 318, in __init__
_ClientProjectMixin.__init__(self, project=project, credentials=credentials)
File "/usr/local/lib/python3.6/dist-packages/google/cloud/client.py", line 266, in __init__
project = self._determine_default(project)
File "/usr/local/lib/python3.6/dist-packages/google/cloud/client.py", line 285, in _determine_default
return _determine_default_project(project)
File "/usr/local/lib/python3.6/dist-packages/google/cloud/_helpers.py", line 186, in _determine_default_project
_, project = google.auth.default()
File "/usr/local/lib/python3.6/dist-packages/google/auth/_default.py", line 454, in default
credentials, project_id = checker()
File "/usr/local/lib/python3.6/dist-packages/google/auth/_default.py", line 222, in _get_explicit_environ_credentials
os.environ[environment_vars.CREDENTIALS]
File "/usr/local/lib/python3.6/dist-packages/google/auth/_default.py", line 108, in load_credentials_from_file
"File {} was not found.".format(filename)
google.auth.exceptions.DefaultCredentialsError: File /etc/gcp/sa_credentials.json was not found.
No module named 'shared.settings.secrets'
[2021-06-25 10:49:05 +0000] [11] [INFO] Worker exiting (pid: 11)
PROCESS_MEDIA_TRY_BLOCK_ON True
PROCESS_MEDIA_REMOTE_QUEUE_ON True
PROCESS_MEDIA_ENQUEUE_LOCALLY_IMMEDIATELY False
DIFFGRAM_SYSTEM_MODE DIFFGRAM_SYSTEM_MODE production
DATABASE_URL DATABASE_URL True
Appreciate any help.