NetBox 安装期间出错,无法使用 manage.py 创建超级用户
Python 版本:3.6.8 NetBox 版本:2.9.1 CentOS Linux 版本 7.8.2003(核心)
我正在按照文档一步一步安装 NetBox: https://netbox.readthedocs.io/en/stable/installation/3-netbox/
当我尝试创建或删除超级用户时,我卡住了。 他创建了用户,但似乎密码输入失败。如果我尝试创建超级用户,它会失败,之后尝试使用相同名称创建超级用户会抛出“用户已存在”的错误。
错误:
(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]#
检查 yum 提供的 PostgreSQL 版本。NetBox 需要 9.6 或更高版本。我必须通过 PostgreSQL 站点找到较新版本的 RPM,然后 yum localinstall
检查 CentOS 上的 Redis 版本。安装指南指出需要版本 4 或更高版本。Yum repo 给了我版本 3。
Redis 仅提供源代码:\
在此处找到更高版本的 RPM https://pkgs.org/download/redis 并执行 yum localinstall。
我遇到了同样的问题。就我而言,Redis 是从 Epel 存储库部署的,该存储库低于所需的版本(截至 2020 年 7 月 10 日,需要 Redis 4.0 或更高版本: 在此处输入链接描述 )
再次引用我的评论,这样我就可以将此主题标记为已回答。
I was able to get it running under Centos, using Docker VM. So the python vm runs in the docker vm and that works.