Redis connection failed: invalid username-password pair or user is disabled #916
Replies: 1 comment
-
Hi, you don't need a redis username. Just try to set a redis password in Line 1 in 39c7de4 Line 29 in 39c7de4 And in netbox-docker/env/redis-cache.env Line 1 in 39c7de4 Line 24 in 39c7de4 As you wrote above, your Redis passwords are empty in the Either you forgot to change the default passwords from the redis environment files or you left them empty. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I'm starting with netbox using docker-compose and I found an issue with the latest version (3.4.0) of Netbox.
I'm not able to start Netbox because of error:
`During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/netbox/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/opt/netbox/netbox/netbox/middleware.py", line 133, in call
with change_logging(request):
File "/usr/lib/python3.10/contextlib.py", line 142, in exit
next(self.gen)
File "/opt/netbox/netbox/extras/context_managers.py", line 21, in change_logging
flush_webhooks(webhooks_queue.get())
File "/opt/netbox/netbox/extras/webhooks.py", line 83, in flush_webhooks
rq_queue_name = get_config().QUEUE_MAPPINGS.get('webhook', RQ_QUEUE_DEFAULT)
File "/opt/netbox/netbox/netbox/config/init.py", line 27, in get_config
_thread_locals.config = Config()
File "/opt/netbox/netbox/netbox/config/init.py", line 47, in init
self._populate_from_cache()
File "/opt/netbox/netbox/netbox/config/init.py", line 70, in _populate_from_cache
self.config = cache.get('config') or {}
File "/opt/netbox/venv/lib/python3.10/site-packages/django_redis/cache.py", line 91, in get
value = self._get(key, default, version, client)
File "/opt/netbox/venv/lib/python3.10/site-packages/django_redis/cache.py", line 38, in _decorator
raise e.cause
File "/opt/netbox/venv/lib/python3.10/site-packages/django_redis/client/default.py", line 258, in get
value = client.get(key)
File "/opt/netbox/venv/lib/python3.10/site-packages/redis/commands/core.py", line 1728, in get
return self.execute_command("GET", name)
File "/opt/netbox/venv/lib/python3.10/site-packages/redis/client.py", line 1255, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File "/opt/netbox/venv/lib/python3.10/site-packages/redis/connection.py", line 1389, in get_connection
connection.connect()
File "/opt/netbox/venv/lib/python3.10/site-packages/redis/connection.py", line 610, in connect
self.on_connect()
File "/opt/netbox/venv/lib/python3.10/site-packages/redis/connection.py", line 701, in on_connect
auth_response = self.read_response()
File "/opt/netbox/venv/lib/python3.10/site-packages/redis/connection.py", line 812, in read_response
response = self._parser.read_response(disable_decoding=disable_decoding)
File "/opt/netbox/venv/lib/python3.10/site-packages/redis/connection.py", line 334, in read_response
raise error
redis.exceptions.AuthenticationError: invalid username-password pair or user is disabled.`
I'm using this netbox.env file:
`CORS_ORIGIN_ALLOW_ALL=True
DB_HOST=postgres
DB_NAME=netbox
DB_PASSWORD=
DB_USER=netbox
EMAIL_FROM=[email protected]
EMAIL_PASSWORD=
EMAIL_PORT=25
EMAIL_SERVER=localhost
EMAIL_SSL_CERTFILE=
EMAIL_SSL_KEYFILE=
EMAIL_TIMEOUT=5
EMAIL_USERNAME=netbox
EMAIL_USE_SSL and EMAIL_USE_TLS are mutually exclusive, i.e. they can't both be
true
!EMAIL_USE_SSL=false
EMAIL_USE_TLS=false
GRAPHQL_ENABLED=true
HOUSEKEEPING_INTERVAL=86400
MEDIA_ROOT=/opt/netbox/netbox/media
METRICS_ENABLED=true
REDIS_CACHE_DATABASE=1
REDIS_CACHE_HOST=redis-cache
REDIS_CACHE_INSECURE_SKIP_TLS_VERIFY=false
REDIS_CACHE_PASSWORD=
REDIS_CACHE_SSL=false
REDIS_DATABASE=0
REDIS_HOST=redis
REDIS_INSECURE_SKIP_TLS_VERIFY=false
REDIS_PASSWORD=
REDIS_SSL=false
RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases
SECRET_KEY=
SKIP_SUPERUSER=false
SUPERUSER_API_TOKEN=
SUPERUSER_EMAIL=
SUPERUSER_NAME=
SUPERUSER_PASSWORD=
WEBHOOKS_ENABLED=true
ALLOWED_HOSTS=`
and I haven't any REDIS USERNAME or something similar.. How can I solve this connection issue? I mean, I have no idea about where to change the username (I saw that Redis need 'default' or ) .
Thank you all for your time and sorry for my english.. :)
Fabio
Beta Was this translation helpful? Give feedback.
All reactions