web登录不了 #2445
Unanswered
yikebantang
asked this question in
Q&A
web登录不了
#2445
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
每次重新安装后运行一段时间后web页面使用账号登录就会报“服务异常,请联系管理员处理”,admin账户也是这样,这是什么原因造成的
日志:
[2023-12-12 09:10:04,175][MainThread:139644849010496][task_id:default][auth.py:79][ERROR]- 验证用户密码时报错
[2023-12-12 09:10:04,176][MainThread:139644849010496][task_id:default][auth.py:80][ERROR]- Traceback (most recent call last):
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/backends/base/base.py", line 282, in ensure_connection
self.connect()
File "/opt/venv4archery/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/backends/base/base.py", line 263, in connect
self.connection = self.get_new_connection(conn_params)
File "/opt/venv4archery/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 247, in get_new_connection
connection = Database.connect(**conn_params)
File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/init.py", line 130, in Connect
return Connection(*args, **kwargs)
File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/connections.py", line 185, in init
super().init(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (1130, "Host '172.19.0.4' is not allowed to connect to this MySQL server")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/archery/common/auth.py", line 69, in authenticate
user = Users.objects.get(username=username)
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/models/query.py", line 646, in get
num = len(clone)
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/models/query.py", line 376, in len
self._fetch_all()
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/models/query.py", line 1866, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/models/query.py", line 87, in iter
results = compiler.execute_sql(
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1393, in execute_sql
cursor = self.connection.cursor()
File "/opt/venv4archery/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/backends/base/base.py", line 323, in cursor
return self._cursor()
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/backends/base/base.py", line 299, in _cursor
self.ensure_connection()
File "/opt/venv4archery/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/backends/base/base.py", line 282, in ensure_connection
self.connect()
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/backends/base/base.py", line 282, in ensure_connection
self.connect()
File "/opt/venv4archery/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/backends/base/base.py", line 263, in connect
self.connection = self.get_new_connection(conn_params)
File "/opt/venv4archery/lib/python3.9/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/opt/venv4archery/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 247, in get_new_connection
connection = Database.connect(**conn_params)
File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/init.py", line 130, in Connect
return Connection(*args, **kwargs)
File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/connections.py", line 185, in init
super().init(*args, **kwargs2)
django.db.utils.OperationalError: (1130, "Host '172.19.0.4' is not allowed to connect to this MySQL server")
2023-12-12T01:37:24.886205Z 9497 [Note] Aborted connection 9497 to db: 'archery' user: 'root' host: '172.19.0.4' (Got an error reading communication packets)
2023-12-12T01:37:24.888009Z 9502 [Note] Aborted connection 9502 to db: 'archery' user: 'root' host: '172.19.0.4' (Got an error reading communication packets)
2023-12-12T01:37:24.901810Z 9499 [Note] Aborted connection 9499 to db: 'archery' user: 'root' host: '172.19.0.4' (Got an error reading communication packets)
2023-12-12T01:37:35.251695Z 9503 [Note] Got timeout reading communication packets
Beta Was this translation helpful? Give feedback.
All reactions