gpt4 book ai didi

python - NetBox 安装期间出错,无法使用 manage.py 创建 super 用户

转载 作者:行者123 更新时间:2023-12-04 19:40:51 26 4
gpt4 key购买 nike

Python版本:3.6.8
网箱版本:2.9.1
CentOS Linux 版本 7.8.2003(核心)
我正在按照文档一步一步安装 NetBox:
https://netbox.readthedocs.io/en/stable/installation/3-netbox/
当我尝试创建或删除 super 用户时,我卡住了。
他创建了用户,但似乎他在密码上失败了。如果我尝试创建一个 super 用户,它会失败,然后尝试创建一个具有相同名称的 super 用户会抛出“用户已存在”。
错误:

(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 站点和 yum localinstall 找到更新版本的 RPM
检查 CentOS 上的 Redis 版本。需要安装指南说明版本 4 或更高版本。 Yum repo 给了我第 3 版。
Redis 只提供源代码:\
在这里找到更高版本的 RPM https://pkgs.org/download/redis并做了 yum localinstall。

关于python - NetBox 安装期间出错,无法使用 manage.py 创建 super 用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63606303/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com