django.db.utils.InterfaceError
spellman001 opened this issue · 7 comments
最新版 Antenna 启动后一段时间报Processing Failed
查看antenna_https_stdout.log日志显示
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/twisted/protocols/basic.py", line 548, in dataReceived
why = self.lineReceived(line)
File "/usr/lib/python3.10/site-packages/twisted/web/http.py", line 2155, in lineReceived
self.allContentReceived()
File "/usr/lib/python3.10/site-packages/twisted/web/http.py", line 2281, in allContentReceived
req.requestReceived(command, path, version)
File "/usr/lib/python3.10/site-packages/twisted/web/http.py", line 1005, in requestReceived
self.process()
--- ---
File "/usr/lib/python3.10/site-packages/twisted/web/server.py", line 229, in process
self.render(resrc)
File "/usr/lib/python3.10/site-packages/twisted/web/server.py", line 294, in render
body = resrc.render(self)
File "/Antenna/modules/template/depend/listen/httpslog.py", line 67, in render
task_config_item = TaskConfigItem.objects.filter(task_config__key=self.key, task__status=1).first()
File "/usr/lib/python3.10/site-packages/django/db/models/query.py", line 674, in first
for obj in (self if self.ordered else self.order_by('pk'))[:1]:
File "/usr/lib/python3.10/site-packages/django/db/models/query.py", line 280, in iter
self._fetch_all()
File "/usr/lib/python3.10/site-packages/django/db/models/query.py", line 1324, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/usr/lib/python3.10/site-packages/django/db/models/query.py", line 51, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/usr/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 79, in _execute
with self.db.wrap_database_errors:
File "/usr/lib/python3.10/site-packages/django/db/utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/usr/lib/python3.10/site-packages/pymysql/cursors.py", line 148, in execute
result = self._query(query)
File "/usr/lib/python3.10/site-packages/pymysql/cursors.py", line 310, in _query
conn.query(q)
File "/usr/lib/python3.10/site-packages/pymysql/connections.py", line 547, in query
self._execute_command(COMMAND.COM_QUERY, sql)
File "/usr/lib/python3.10/site-packages/pymysql/connections.py", line 793, in _execute_command
raise err.InterfaceError(0, "")
django.db.utils.InterfaceError: (0, '')
看起来像是https orm查询数据库时出了问题,已经再最新的镜像中进行了修复尝试,这个问题先不关闭,辛苦使用最新版本镜像同步一下结果,如果一段时间后没有问题出现我再关闭
新的docker镜像还是有这个问题
新的docker镜像还是有这个问题
能给出详细的说明吗
docker运行一段时间后,dns解析会报错:
Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/twisted/names/server.py", line 538, in messageReceived
self.handleQuery(message, proto, address)
File "/Antenna/modules/template/depend/listen/dnslog.py", line 47, in handleQuery
return server.DNSServerFactory.handleQuery(self, message, protocol, address)
File "/usr/lib/python3.10/site-packages/twisted/names/server.py", line 371, in handleQuery
self.resolver.query(query)
File "/usr/lib/python3.10/site-packages/twisted/names/common.py", line 78, in query
return defer.maybeDeferred(method, query.name.name, timeout)
--- ---
File "/usr/lib/python3.10/site-packages/twisted/internet/defer.py", line 167, in maybeDeferred
result = f(*args, **kw)
File "/usr/lib/python3.10/site-packages/twisted/names/common.py", line 84, in lookupAddress
return self._lookup(dns.domainString(name), dns.IN, dns.A, timeout)
File "/usr/lib/python3.10/site-packages/twisted/names/resolve.py", line 76, in _lookup
d = self.resolvers[0].query(q, timeout)
File "/Antenna/modules/template/depend/listen/dnslog.py", line 127, in query
return defer.succeed(self._doDynamicResponse(query))
File "/Antenna/modules/template/depend/listen/dnslog.py", line 105, in _doDynamicResponse
task__status=1).first()
File "/usr/lib/python3.10/site-packages/django/db/models/query.py", line 674, in first
for obj in (self if self.ordered else self.order_by('pk'))[:1]:
File "/usr/lib/python3.10/site-packages/django/db/models/query.py", line 280, in iter
self._fetch_all()
File "/usr/lib/python3.10/site-packages/django/db/models/query.py", line 1324, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/usr/lib/python3.10/site-packages/django/db/models/query.py", line 51, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/usr/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 79, in _execute
with self.db.wrap_database_errors:
File "/usr/lib/python3.10/site-packages/django/db/utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/usr/lib/python3.10/site-packages/pymysql/cursors.py", line 148, in execute
result = self._query(query)
File "/usr/lib/python3.10/site-packages/pymysql/cursors.py", line 310, in _query
conn.query(q)
File "/usr/lib/python3.10/site-packages/pymysql/connections.py", line 547, in query
self._execute_command(COMMAND.COM_QUERY, sql)
File "/usr/lib/python3.10/site-packages/pymysql/connections.py", line 793, in _execute_command
raise err.InterfaceError(0, "")
django.db.utils.InterfaceError: (0, '')
时间不需要很长,半天时间bug就出现了
时间不需要很长,半天时间bug就出现了
收到,当前正在复现排查,尽快解决
最新的项目代码与镜像已解决该问题