Open junxiongpeng opened 1 year ago
看下日志有没有问题原因,可能是因为域名访问不到,或者字段缺失造成的
访问不了的域名筛选掉了,现在导入500条 报错 too many SQL variables
日志文件,logs/domain-admin.log 可以看下具体是哪里报的错误
2023-10-11 05:52:33 [INFO] domain_service.py/add_domain_from_file: user_id: 1, filename: /root/Python-3.7.0/temp/0ffd401b-61af-426b-92e6-267f5ece85ab.txt
2023-10-11 05:52:33 [ERROR] handler.py/error_handler: Traceback (most recent call last): File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 3251, in execute_sql cursor.execute(sql, params or ()) sqlite3.OperationalError: too many SQL variables
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(*view_args) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/domain_admin/api/domain_api.py", line 351, in import_domain_from_file domain_service.add_domain_from_file(filename, current_user_id) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/domain_admin/service/domain_service.py", line 385, in add_domain_from_file DomainModel.insert_many(batch).on_conflict_ignore().execute() File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 1971, in inner return method(self, database, args, *kwargs) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 2042, in execute return self._execute(database) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 2847, in _execute return super(Insert, self)._execute(database) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 2560, in _execute cursor = database.execute(self) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 3259, in execute return self.execute_sql(sql, params) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 3251, in execute_sql cursor.execute(sql, params or ()) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 3019, in exit reraise(new_type, new_type(exc_value, exc_args), traceback) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 192, in reraise raise value.with_traceback(tb) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 3251, in execute_sql cursor.execute(sql, params or ()) peewee.OperationalError: too many SQL variables
很奇怪,我同时导入10000+条也没有报错的 https://github.com/mouday/domain-admin/blob/master/tests/top-1m.txt
https://github.com/mouday/domain-admin/blob/master/tests/top-1m.txt直接下载你这个导入也报错 2023-10-11 08:17:40 [INFO] domain_service.py/add_domain_from_file: user_id: 1, filename: /root/Python-3.7.0/temp/bdf58b3c-0d8d-4e87-9d89-5c5835c62952.txt
2023-10-11 08:18:00 [ERROR] handler.py/error_handler: Traceback (most recent call last): File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 3251, in execute_sql cursor.execute(sql, params or ()) sqlite3.OperationalError: too many SQL variables
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(*view_args) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/domain_admin/api/domain_api.py", line 351, in import_domain_from_file domain_service.add_domain_from_file(filename, current_user_id) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/domain_admin/service/domain_service.py", line 385, in add_domain_from_file DomainModel.insert_many(batch).on_conflict_ignore().execute() File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 1971, in inner return method(self, database, args, *kwargs) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 2042, in execute return self._execute(database) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 2847, in _execute return super(Insert, self)._execute(database) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 2560, in _execute cursor = database.execute(self) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 3259, in execute return self.execute_sql(sql, params) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 3251, in execute_sql cursor.execute(sql, params or ()) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 3019, in exit reraise(new_type, new_type(exc_value, exc_args), traceback) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 192, in reraise raise value.with_traceback(tb) File "/root/Python-3.7.0/venv/lib/python3.7/site-packages/peewee.py", line 3251, in execute_sql cursor.execute(sql, params or ()) peewee.OperationalError: too many SQL variables
用1Panel面板安装导入正常,前面用pip安装的一直不行
按理是一样的,1Panel面板也是用的Docker安装,如果需要监控的数量太多,建议换成mysql https://domain-admin.readthedocs.io/zh_CN/latest/manual/install.html#id5
导入记录包括TXT和@记录会报错,是不是自动把这个忽略下
批量导入的吗?只支持能正常访问的域名,如果加记录识别会更慢的
批量导入的吗?只支持能正常访问的域名,如果加记录识别会更慢的
是的,当从阿里云的域名那边导出一个txt,然后在项目上导入会出现argument of type 'NoneType' is not iterable
看起来就是有些TXT记录【dns-auth】,或者@记录会有问题,删除文件里面的这些就没问题了
证书列表》证书监控》导入 导入100多条正常,导入200报错too many SQL variables,导入400多条报错 argument of type 'NoneType' is not iterable