Traceback (most recent call last):
File "/opt/netbox/venv/lib/python3.11/site-packages/django_redis/cache.py", line 29, in _decorator
return method(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/django_redis/cache.py", line 118, in clear
return self.client.clear()
^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/django_redis/client/default.py", line 438, in clear
raise ConnectionInterrupted(connection=client) from e
django_redis.exceptions.ConnectionInterrupted: Redis ConnectionError: Error 99 connecting to localhost:6379. Cannot assign requested address.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/netbox/netbox/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 416, in execute
django.setup()
File "/opt/netbox/venv/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/opt/netbox/venv/lib/python3.11/site-packages/django/apps/registry.py", line 124, in populate
app_config.ready()
File "/opt/netbox/venv/lib/python3.11/site-packages/netbox_contextmenus/__init__.py", line 42, in ready
cache.clear()
File "/opt/netbox/venv/lib/python3.11/site-packages/django_redis/cache.py", line 36, in _decorator
raise e.__cause__
File "/opt/netbox/venv/lib/python3.11/site-packages/django_redis/client/default.py", line 436, in clear
client.flushdb()
File "/opt/netbox/venv/lib/python3.11/site-packages/redis/commands/core.py", line 946, in flushdb
return self.execute_command("FLUSHDB", *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/redis/client.py", line 542, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.11/site-packages/redis/connection.py", line 1109, in get_connection
connection.connect()
File "/opt/netbox/venv/lib/python3.11/site-packages/redis/connection.py", line 282, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 99 connecting to localhost:6379. Cannot assign requested address.
I think there could be added a simple try/catch for handling that problem.