Python : 3.6.8 NetBox版本: 2.9.1 CentOS Linux发行版7.8.2003 (CentOS)
我正在按照文档的步骤安装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]#发布于 2021-06-09 09:04:09
我只是在这里再次引用我的评论,这样我就可以将这个线程标记为应答。
我能够在Centos下运行它,使用Docker。因此python在停靠vm中运行,这是可行的。
发布于 2020-09-24 17:54:27
查看PostgreSQL yum给您的版本。NetBox需要9.6或更高版本。我必须通过PostgreSQL站点和找到更新版本的RPMs。
检查CentOS上的Redis版本。安装指南说明版本4或更高版本是必需的。百胜给了我第三版。
Redis只提供源代码:\
在这里为更高版本的https://pkgs.org/download/redis和yum找到了RPM。
发布于 2020-10-07 20:17:02
我也有过同样的问题。在我的例子中,Redis是从Epel存储库部署的,它低于所需的版本(在2020年10月7日,需要Redis4.0或更高版本:在这里输入链接描述)
https://stackoverflow.com/questions/63606303
复制相似问题