Open vladislav06 opened 2 months ago
Your redis service seems to be restarting / unavailable. Since k8s is about eventual consistency, it could take a while before your redis service becomes available.
If it takes a long time, look in the logs of the redis containers for hints on what could be the issue.
I'm experiencing a similar issue. Were you able to find a solution?
root@uspolodev:~# microk8s kubectl get pods -n mail
NAME READY STATUS RESTARTS AGE
mailu-admin-6cc797dd56-q8sw9 0/1 CrashLoopBackOff 1 (17s ago) 46s
mailu-clamav-0 1/1 Running 0 46s
mailu-dovecot-797cb79599-mf2jr 1/1 Running 0 46s
mailu-front-7b8c8dcd7b-72v8l 1/1 Running 0 46s
mailu-oletools-75d8774797-bck8k 1/1 Running 0 46s
mailu-postfix-6d67467c96-t7p6q 1/1 Running 0 46s
mailu-redis-master-0 1/1 Running 0 46s
mailu-rspamd-cdbb6d8f4-9qq6z 0/1 Running 0 46s
mailu-tika-dfb4ddbc6-zlqwv 1/1 Running 0 46s
mailu-webmail-84f956bc45-4sqzq 0/1 CrashLoopBackOff 2 (15s ago) 46s
root@uspolodev:~# microk8s kubectl logs mailu-admin-6cc797dd56-q8sw9 -n mail
Traceback (most recent call last):
File "/app/venv/bin/gunicorn", line 8, in <module>
sys.exit(run())
^^^^^
File "/app/venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]", prog=prog).run()
File "/app/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 236, in run
super().run()
File "/app/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 72, in run
Arbiter(self).run()
^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 58, in __init__
self.setup(app)
File "/app/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 118, in setup
self.app.wsgi()
File "/app/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
return self.load_wsgiapp()
^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
return util.import_app(self.app_uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/gunicorn/util.py", line 424, in import_app
app = app(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/app/mailu/__init__.py", line 117, in create_app
return create_app_from_config(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/mailu/__init__.py", line 48, in create_app_from_config
utils.session.init_app(app)
File "/app/mailu/utils.py", line 497, in init_app
MailuSessionExtension.cleanup_sessions(app)
File "/app/mailu/utils.py", line 436, in cleanup_sessions
for key in app.session_store.list():
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/mailu/utils.py", line 162, in list
return list(self.redis.scan_iter(match=prefix))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/redis/commands/core.py", line 3051, in scan_iter
cursor, data = self.scan(
^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/redis/commands/core.py", line 3026, in scan
return self.execute_command("SCAN", *pieces, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/redis/client.py", line 542, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/redis/connection.py", line 1109, in get_connection
connection.connect()
File "/app/venv/lib/python3.12/site-packages/redis/connection.py", line 282, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error -5 connecting to mailu-redis-master.mail.svc.cluster.local:6379. Name has no usable address.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Describe the bug mailu-admin is unable to connect to mailu-redis-master :
Environment
Additional context