Python version: 3.6.8
NetBox version: 2.9.1
CentOS Linux release 7.8.2003 (Core)
I am installing NetBox following the Documentation step by step:
https://netbox.readthedocs.io/en/stable/installation/3-netbox/
I get stuck when I try to create or delete a superuser.
He creates the User but seems like he fails on the password. If I try to create a superuser it fails, trying to create a superuser afterward with the same name throws out "User already exists".
Error:
(venv) [root@ALTLX548 netbox]# cd /opt/netbox/netbox
(venv) [root@ALTLX548 netbox]# clear
(venv) [root@ALTLX548 netbox]# python3 manage.py createsuperuser
Username (leave blank to use 'root'): admin
Email address:
Password:
Password (again):
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 79, in execute
return super().execute(*args, **options)
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 189, in handle
self.UserModel._default_manager.db_manager(database).create_superuser(**user_data)
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/contrib/auth/models.py", line 157, in create_superuser
return self._create_user(username, email, password, **extra_fields)
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/contrib/auth/models.py", line 140, in _create_user
user.save(using=self._db)
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/contrib/auth/base_user.py", line 67, in save
super().save(*args, **kwargs)
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/db/models/base.py", line 751, in save
force_update=force_update, update_fields=update_fields)
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/db/models/base.py", line 800, in save_base
update_fields=update_fields, raw=raw, using=using,
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/dispatch/dispatcher.py", line 179, in send
for receiver in self._live_receivers(sender)
File "/opt/netbox/venv/lib64/python3.6/site-packages/django/dispatch/dispatcher.py", line 179, in <listcomp>
for receiver in self._live_receivers(sender)
File "/opt/netbox/venv/lib64/python3.6/site-packages/cacheops/query.py", line 443, in _post_save
invalidate_obj(instance, using=using)
File "/opt/netbox/venv/lib64/python3.6/site-packages/cacheops/invalidation.py", line 36, in invalidate_obj
invalidate_dict(model, get_obj_dict(model, obj), using=using)
File "/opt/netbox/venv/lib64/python3.6/site-packages/funcy/decorators.py", line 39, in wrapper
return deco(call, *dargs, **dkwargs)
File "/opt/netbox/venv/lib64/python3.6/site-packages/cacheops/transaction.py", line 63, in queue_when_in_transaction
return call()
File "/opt/netbox/venv/lib64/python3.6/site-packages/funcy/decorators.py", line 60, in __call__
return self._func(*self._args, **self._kwargs)
File "/opt/netbox/venv/lib64/python3.6/site-packages/funcy/decorators.py", line 39, in wrapper
return deco(call, *dargs, **dkwargs)
File "/opt/netbox/venv/lib64/python3.6/site-packages/cacheops/redis.py", line 17, in handle_connection_failure
return call()
File "/opt/netbox/venv/lib64/python3.6/site-packages/funcy/decorators.py", line 60, in __call__
return self._func(*self._args, **self._kwargs)
File "/opt/netbox/venv/lib64/python3.6/site-packages/cacheops/invalidation.py", line 26, in invalidate_dict
json.dumps(obj_dict, default=str)
File "/opt/netbox/venv/lib64/python3.6/site-packages/redis/client.py", line 4073, in __call__
return client.evalsha(self.sha, len(keys), *args)
File "/opt/netbox/venv/lib64/python3.6/site-packages/redis/client.py", line 3143, in evalsha
return self.execute_command('EVALSHA', sha, numkeys, *keys_and_args)
File "/opt/netbox/venv/lib64/python3.6/site-packages/redis/client.py", line 901, in execute_command
return self.parse_response(conn, command_name, **options)
File "/opt/netbox/venv/lib64/python3.6/site-packages/redis/client.py", line 915, in parse_response
response = connection.read_response()
File "/opt/netbox/venv/lib64/python3.6/site-packages/redis/connection.py", line 756, in read_response
raise response
redis.exceptions.ResponseError: Error running script (call to f_0605214935a9ffcd4b9e5779300302540ff08da4): @user_script:36: @user_script: 36: Unknown Redis command called from Lua script
(venv) [root@ALTLX548 netbox]#
3
Answers
Just Quoting my comment here again, so i can mark this Thread as answered.
Check the version of PostgreSQL yum gave you. NetBox requires 9.6 or later. I had to find RPMs of newer version via the PostgreSQL site, and yum localinstall
Check the Redis version on CentOS. The install guide notes version 4 or later is required. Yum repo gave me version 3.
Redis only offer source code :
Found RPMs for later versions here https://pkgs.org/download/redis and did yum localinstall.
I had the same issue. In my case, Redis was deployed from Epel repository which is lower than the required version (at date 10/07/2020, Redis 4.0 or higher is required : enter link description here)