sqlite3.OperationalError - no such table: task
Hello Benjamin,
Pablo and I have been working together the last pieces of the burp / burp-ui and unfortunately this same issue I brought up 3 months back is still with us. I know you made a large effort to get things completed previously. I will say that it appears everything else is working.
However, the ability to download files is not. I would be grateful and will make a donation in advance in hopes that you can catch this one remaining issue. Please reach out if there is anything more you need.
You are about to submit a bug report.
First of all, make sure you are actually facing a bug. If you have some questions about how to setup Burp-UI, make sure you read the doc first and especially the FAQ which already answers a couple of questions.
Now, if you are sure you are facing a bug, please make sure to provide the the following information:
Click on a file to download, and click the blue button "Download Selected Files"
Sysinfo conf: /etc/burp/burpui.cfg verbose: Level 4 logfile: None gunicorn: False debug: False unittest: False cli: True reverse_proxy: False celery_worker: False websocket_server: False
Running Python version: 3.10.6 Burp-UI version: 1.0.0 () OS: Linux:5.15.0-50-generic (posix)
Traceback (most recent call last): File "/usr/bin/flask", line 8, in sys.exit(main()) File "/venv_apps/bui/lib/python3.10/site-packages/flask/cli.py", line 995, in main cli.main(args=sys.argv[1:]) File "/venv_apps/bui/lib/python3.10/site-packages/flask/cli.py", line 601, in main return super().main(*args, **kwargs) File "/venv_apps/bui/lib/python3.10/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/venv_apps/bui/lib/python3.10/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/venv_apps/bui/lib/python3.10/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/venv_apps/bui/lib/python3.10/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/venv_apps/bui/lib/python3.10/site-packages/click/decorators.py", line 21, in new_func return f(get_current_context(), *args, **kwargs) File "/venv_apps/bui/lib/python3.10/site-packages/flask/cli.py", line 445, in decorator return __ctx.invoke(f, *args, **kwargs) File "/venv_apps/bui/lib/python3.10/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/venv_apps/bui/lib/python3.10/site-packages/burpui/cli.py", line 1379, in sysinfo log("Distribution: {} {} {}".format(*platform.dist())) AttributeError: module 'platform' has no attribute 'dist
I have attached a video for your reference during a screen share with Pablo. It is not a public video. Unlisted so that you can understand the problem.
Here is a log file of value: WARNING: be sure to remove any sensitive data from your logs/configurations.
Mar 14 22:41:31 servermatter burp[3720633]: 2023-03-14 22:41:31 -0700: burp[3720633] Compressing /SM_BACKUP/DATA/burp/sm_server_bkup/0000152 2023-03-14 00:00:01 -0700/restorelog to /SM_BACKUP/DATA/burp/sm_server_bkup/0000152 2023-03-14 00:00:01 -0700/restorelog.gz... Mar 14 22:41:31 servermatter burp[3720632]: restore finished Mar 14 22:41:31 servermatter bui-celery[8054]: [2023-03-14 22:41:31,447: ERROR/ForkPoolWorker-14] Task burpui.tasks.perform_restore[558f1125-de74-487e-ba3f-ca33b0280ed0] raised unexpected: OperationalError('(sqlite3.OperationalError) no such table: task') Mar 14 22:41:31 servermatter bui-celery[8054]: Traceback (most recent call last): Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1900, in _execute_context Mar 14 22:41:31 servermatter bui-celery[8054]: self.dialect.do_execute( Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/engine/default.py", line 736, in do_execute Mar 14 22:41:31 servermatter bui-celery[8054]: cursor.execute(statement, parameters) Mar 14 22:41:31 servermatter bui-celery[8054]: sqlite3.OperationalError: no such table: task Mar 14 22:41:31 servermatter bui-celery[8054]: The above exception was the direct cause of the following exception: Mar 14 22:41:31 servermatter bui-celery[8054]: Traceback (most recent call last): Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/celery/app/trace.py", line 450, in trace_task Mar 14 22:41:31 servermatter bui-celery[8054]: R = retval = fun(*args, **kwargs) Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../burpui/extensions.py", line 306, in __call__ Mar 14 22:41:31 servermatter bui-celery[8054]: return TaskBase.__call__(self, *args, **kwargs) Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/celery/app/trace.py", line 731, in __protected_call__ Mar 14 22:41:31 servermatter bui-celery[8054]: return self.run(*args, **kwargs) Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../burpui/tasks.py", line 325, in perform_restore Mar 14 22:41:31 servermatter bui-celery[8054]: curr = Task.query.filter_by(uuid=self.request.id).first() Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/orm/query.py", line 2823, in first Mar 14 22:41:31 servermatter bui-celery[8054]: return self.limit(1)._iter().first() Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/orm/query.py", line 2915, in _iter Mar 14 22:41:31 servermatter bui-celery[8054]: result = self.session.execute( Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/orm/session.py", line 1714, in execute Mar 14 22:41:31 servermatter bui-celery[8054]: result = conn._execute_20(statement, params or {}, execution_options) Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1705, in _execute_20 Mar 14 22:41:31 servermatter bui-celery[8054]: return meth(self, args_10style, kwargs_10style, execution_options) Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/sql/elements.py", line 334, in _execute_on_connection Mar 14 22:41:31 servermatter bui-celery[8054]: return connection._execute_clauseelement( Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement Mar 14 22:41:31 servermatter bui-celery[8054]: ret = self._execute_context( Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1943, in _execute_context Mar 14 22:41:31 servermatter bui-celery[8054]: self._handle_dbapi_exception( Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception Mar 14 22:41:31 servermatter bui-celery[8054]: util.raise_( Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/util/compat.py", line 210, in raise_ Mar 14 22:41:31 servermatter bui-celery[8054]: raise exception Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1900, in _execute_context Mar 14 22:41:31 servermatter bui-celery[8054]: self.dialect.do_execute( Mar 14 22:41:31 servermatter bui-celery[8054]: File "/venv_apps/bui/lib/python3.10/site-packages/burpui/engines/../../sqlalchemy/engine/default.py", line 736, in do_execute Mar 14 22:41:31 servermatter bui-celery[8054]: cursor.execute(statement, parameters) Mar 14 22:41:31 servermatter bui-celery[8054]: sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: task Mar 14 22:41:31 servermatter bui-celery[8054]: [SQL: SELECT task.id AS task_id, task.uuid AS task_uuid, task.task AS task_task, task.user AS task_user, task.timestamp AS task_timestamp, task.expire AS task_expire Mar 14 22:41:31 servermatter bui-celery[8054]: FROM task Mar 14 22:41:31 servermatter bui-celery[8054]: WHERE task.uuid = ? Mar 14 22:41:31 servermatter bui-celery[8054]: LIMIT ? OFFSET ?] Mar 14 22:41:31 servermatter bui-celery[8054]: [parameters: ('558f1125-de74-487e-ba3f-ca33b0280ed0', 1, 0)] Mar 14 22:41:31 servermatter bui-celery[8054]: (Background on this error at: https://sqlalche.me/e/14/e3q8) Mar 14 22:41:31 servermatter burp[3720633]: MESSAGE: Running notify script: sm_server_bkup /SM_BACKUP/DATA/burp/sm_server_bkup /SM_BACKUP/DATA/burp/sm_server_bkup/0000152 2023-03-14 00:00:01 -0700 restorelog restore 0 sendmail -t To: "admin@servermatter.com" From: "admin@servermatter.com" Subject: %b " Back Mar 14 22:41:31 servermatter postfix/pickup[3670707]: 71AF92B7A: uid=0 from= Mar 14 22:41:31 servermatter postfix/cleanup[3628646]: 71AF92B7A: message-id=<20230315054131.71AF92B7A@mail.readourmail.com> Mar 14 22:41:31 servermatter burp[3720633]: main socket 11: Got network write error Mar 14 22:41:31 servermatter burp[3720633]: main socket 11: network write problem in asfd_do_write_ssl: 5 - 32=Broken pipe Mar 14 22:41:31 servermatter burp[3720633]: This is probably caused by the peer exiting. Mar 14 22:41:31 servermatter burp[3720633]: Please check the peer's logs. Mar 14 22:41:31 servermatter burp[3720633]: MESSAGE: ups: Internal: Success for compumatter.biz - system ": %c %w Mar 14 22:41:31 servermatter burp[3720633]: /usr/share/burp/scripts/notify_script returned: 0 Mar 14 22:41:31 servermatter burp[3720633]: exit child Mar 14 22:41:31 servermatter burp[5763]: pipe from child 12: end of data Mar 14 22:41:31 servermatter burp[5763]: pipe from child 12: disconnected fd 12 Mar 14 22:41:31 servermatter burp[3720633]: 2023-03-14 22:41:31 -0700: burp[3720633] MESSAGE: Running notify script: sm_server_bkup /SM_BACKUP/DATA/burp/sm_server_bkup /SM_BACKUP/DATA/burp/sm_server_bkup/0000152 2023-03-14 00:00:01 -0700 restorelog restore 0 sendmail -t To: "admin@servermatter.com" From: "admin@servermatter.com" Subject: %b " Back2023-03-14 22:41:31 -0700: burp[3720633] main socket 11: Got network write error Mar 14 22:41:31 servermatter burp[3720633]: 2023-03-14 22:41:31 -0700: burp[3720633] main socket 11: network write problem in asfd_do_write_ssl: 5 - 32=Broken pipe Mar 14 22:41:31 servermatter burp[3720633]: 2023-03-14 22:41:31 -0700: burp[3720633] This is probably caused by the peer exiting. Mar 14 22:41:31 servermatter burp[3720633]: 2023-03-14 22:41:31 -0700: burp[3720633] Please check the peer's logs. Mar 14 22:41:31 servermatter burp[3720633]: 2023-03-14 22:41:31 -0700: burp[3720633] MESSAGE: ups: Internal: Success for compumatter.biz - system ": %c %w Mar 14 22:41:31 servermatter burp[3720633]: 2023-03-14 22:41:31 -0700: burp[3720633] /usr/share/burp/scripts/notify_script returned: 0 Mar 14 22:41:31 servermatter burp[3720633]: 2023-03-14 22:41:31 -0700: burp[3720633] exit child Mar 14 22:41:31 servermatter opendkim[5883]: 71AF92B7A: no signing table match for '"admin@servermatt
Configuration
# Burp-UI configuration file # @version@ - 0.6.0 # @release@ - stable [Global] # burp backend to load either one of 'burp1', 'burp2', 'parallel' or 'multi'. # If you choose 'multi', you will have to declare at lease one 'Agent' section. # If you choose 'parallel', you need to configure the [Parallel] section. # If you choose either 'burp1' or 'burp2', you need to configure the [Burp] # section. # The [Burp] section is also used with the 'parallel' backend for the restoration # process. # You can also use whatever custom backend you like if it is located in the # 'plugins' directory and if it implements the right interface. backend = burp2 # authentication plugin (mandatory) # list the misc/auth directory to see the available backends # to disable authentication you can set "auth = none" # you can also chain multiple backends. Example: "auth = ldap,basic" # the order will be respected unless you manually set a higher backend priority auth = basic # acl plugin # list misc/acl directory to see the available backends # default is no ACL acl = none # audit logger plugin (chainable, see 'auth' plugin option) # list the misc/audit directory to see the available backends # default is no audit log audit = none plugins = none [UI] # refresh interval of the pages in seconds refresh = 180 # refresh interval of the live-monitoring page in seconds liverefresh = 60 [Production] # storage backend for session and cache # may be either 'default' or 'redis' storage = redis # redis server to connect to redis = localhost:6379 # session database to use # may also be a backend url like: redis://localhost:6379/0 # if set to 'redis', the backend url defaults to: # redis://:/0 # where is the host part, and is the port part of # the below "redis" setting session = redis://localhost:6379/0 # cache database to use # may also be a backend url like: redis://localhost:6379/0 # if set to 'redis', the backend url defaults to: # redis://:/1 # where is the host part, and is the port part of # the below "redis" setting cache = redis # whether to use celery or not # may also be a broker url like: redis://localhost:6379/0 # if set to "true", the broker url defaults to: # redis://:/2 # where is the host part, and is the port part of # the above "redis" setting celery = true # whether to rate limit the API or not # may also be a redis url like: redis://localhost:6379/0 # if set to "true" or "redis" or "default", the url defaults to: # redis://:/3 # where is the host part, and is the port part of # the above "redis" setting # Note: the limiter only applies to the API routes limiter = false # limiter ratio # see https://flask-limiter.readthedocs.io/en/stable/#ratelimit-string ratio = 60/minute # database url to store some persistent data # none or a connect string supported by SQLAlchemy: # http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls # example: sqlite:////var/lib/burpui/store.db database = sqlite:////var/spool/burpui/celery.db # You can change the prefix if you are behind a reverse-proxy under a custom # root path. For example: /burpui # You can also configure your reverse-proxy to announce the prefix through the # 'X-Script-Name' header. In this case, the bellow prefix will be ignored in # favour of the one announced by your reverse-proxy # prefix option should be moved to Production section in 0.7.0+ prefix = none # ProxyFix - Not yet implemented in 1.0.0 # number of reverse-proxy to trust in order to retrieve some HTTP headers # All the details can be found here: # https://werkzeug.palletsprojects.com/en/0.15.x/middleware/proxy_fix/#module-werkzeug.middleware.proxy_fix # num_proxies = "0" # alternatively, you can specify your own ProxyFix args. # The default is: "{'x_proto': {num_proxies}, 'x_for': {num_proxies}, 'x_host': {num_proxies}, 'x_prefix': {num_proxies}}" # if num_proxies > 0, else it defaults to ProxyFix defaults # proxy_fix_args = {'x_proto': {num_proxies}, 'x_for': {num_proxies}, 'x_host': {num_proxies}, 'x_prefix': {num_proxies}} ## http://burp-ui.readthedocs.io/en/latest/advanced_usage.html#websocket [WebSocket] ## This section contains WebSocket server specific options. # whether to enable websocket or not enabled = true # whether to embed the websocket server or not # if set to "true", you should have only *one* gunicorn worker # see here for details: # https://flask-socketio.readthedocs.io/en/latest/#gunicorn-web-server embedded = false # what broker to use to interact between websocket servers # may be a redis url like: redis://localhost:6379/0 # if set to "true" or "redis" or "default", the url defaults to: # redis://:/4 # where is the host part, and is the port part of # the above "redis" setting # set this to none to disable the broker broker = redis # if you choose to run a dedicated websocket server (with embedded = false) # you can specify here the websocket url. You'll need to double quote your # string though. # example: # url = "document.domain + ':5001'" url = none # whether to enable verbose websocket server logs or not (for development) debug = false [Security] ## This section contains some security options. Make sure you understand the ## security implications before changing these. # list of 'root' paths allowed when sourcing files in the configuration. # Set this to 'none' if you don't want any restrictions, keeping in mind this # can lead to accessing sensible files. Defaults to '/etc/burp'. # Note: you can have several paths separated by comas. # Example: /etc/burp,/etc/burp.d includes = /etc/burp # if files already included in config do not respect the above restriction, we # prune them enforce = false # enable certificates revocation revoke = true # remember_cookie duration in days cookietime = 14 # whether to use a secure cookie for https or not. If set to false, cookies # won't have the 'secure' flag. # This setting is only useful when HTTPS is detected scookie = true # application secret to secure cookies. If you don't set anything, the default # value is 'random' which will generate a new secret after every restart of your # application. You can also set it to 'none' although this is not recommended. # /!\ YOU CANNOT USE THE MAGIC 'random' VALUE WHEN USING GUNICORN /!\ appsecret = ChangeYourSecretapp [Experimental] ## This section contains some experimental features that have not been deeply ## tested yet # enable zip64 feature. Python doc says: # « ZIP64 extensions are disabled by default because the default zip and unzip # commands on Unix (the InfoZIP utilities) don’t support these extensions. » zip64 = false ## burp specific options [Burp] # burp status address (can only be '127.0.0.1' or '::1') bhost = ::1 # burp status port bport = 4972 ## burp binary burpbin = /usr/local/sbin/burp ## vss_strip binary stripbin = /usr/local/bin/vss_strip ## burp client configuration file used for the restoration (Default: None) bconfcli = /etc/burp/burp.conf ## burp server configuration file used for the setting page bconfsrv = /etc/burp/burp-server.conf ## temporary directory to use for restoration tmpdir = /tmp ## how many time to wait for the monitor to answer (in seconds) timeout = 60 # since burp-2.1.10, timestamps have local offsets, if we detect a burp-server # version greater than 2.1.10 we'll suppose every backup was made with that # version. If this is not the case, you may end-up with wrongly computed backup # dates in the clients overview. For that reason, you can enable the # 'deep_inspection' option which will check every backup logs in order to # find out which server version was used. # The drawback is this process requires some extra work that may slow-down # burp-ui. deep_inspection = false ## basicauth specific options ## Note: in case you leave this section commented, the default login/password ## is admin/admin [BASIC:AUTH] ## Backend priority. Higher is first priority = 2
Thanks
Jay @ CompuMatter