-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when calling http://localhost:5000/about #34
Comments
I also noticed I get the same error when trying to run
|
Hum, I found this in the defaults vars:
So I tried to set |
I'm going to apply some fixes with the latest support version soon. |
Sending this by email too @ziirish Hi Ziirish! hope you are doing well. And upgrading flask-sqlalchemy seems to be not working too: I'm trying different options now, but could report the issue in the gitlab instance :( cc @compumatter |
Initial test with version 1.1.0 /venv_apps/bui/bin/bui-manage -c /etc/burp/burpui.cfg db upgrade
Traceback (most recent call last):
File "/usr/bin/flask", line 8, in <module>
sys.exit(main())
File "/venv_apps/bui/lib/python3.10/site-packages/flask/cli.py", line 1050, in main
cli.main()
File "/venv_apps/bui/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/venv_apps/bui/lib/python3.10/site-packages/click/core.py", line 1651, in invoke
cmd_name, cmd, args = self.resolve_command(ctx, args)
File "/venv_apps/bui/lib/python3.10/site-packages/click/core.py", line 1698, in resolve_command
cmd = self.get_command(ctx, cmd_name)
File "/venv_apps/bui/lib/python3.10/site-packages/flask/cli.py", line 578, in get_command
app = info.load_app()
File "/venv_apps/bui/lib/python3.10/site-packages/flask/cli.py", line 308, in load_app
app = locate_app(import_name, name)
File "/venv_apps/bui/lib/python3.10/site-packages/flask/cli.py", line 218, in locate_app
__import__(module_name)
File "/venv_apps/bui/lib/python3.10/site-packages/burpui/cli.py", line 65, in <module>
from .ext.sql import db
File "/venv_apps/bui/lib/python3.10/site-packages/pluginbase.py", line 438, in plugin_import
return self._system_import(import_name, globals, locals,
File "/venv_apps/bui/lib/python3.10/site-packages/burpui/ext/sql.py", line 12, in <module>
db = SQLAlchemy()
File "/venv_apps/bui/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 758, in __init__
_include_sqlalchemy(self, query_class)
File "/venv_apps/bui/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 112, in _include_sqlalchemy
for key in module.__all__:
AttributeError: module 'sqlalchemy' has no attribute '__all__'. Did you mean: '__file__'? sudo /venv_apps/bui/bin/bui-celery -c /etc/burp/burpui.cfg -- --beat
/venv_apps/bui/lib64/python3.9/site-packages/celery/platforms.py:840: SecurityWarning: You're running the worker with superuser privileges: this is
absolutely not recommended!
Please specify a different user using the --uid option.
User information: uid=0 euid=0 gid=0 egid=0
warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(
-------------- celery@alma9-01 v5.2.7 (dawn-chorus)
--- ***** -----
-- ******* ---- Linux-5.14.0-162.6.1.el9_1.x86_64-x86_64-with-glibc2.34 2023-05-02 05:57:36
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: default:0x7f83fb544a60 (.default.Loader)
- ** ---------- .> transport: redis://localhost:6379/2
- ** ---------- .> results: redis://localhost:6379/2
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
[2023-05-02 05:57:36,474: ERROR/Beat] Removing corrupted schedule file 'celerybeat-schedule': error('db type could not be determined')
Traceback (most recent call last):
File "/venv_apps/bui/lib64/python3.9/site-packages/celery/beat.py", line 533, in setup_schedule
self._store = self._open_schedule()
File "/venv_apps/bui/lib64/python3.9/site-packages/celery/beat.py", line 523, in _open_schedule
return self.persistence.open(self.schedule_filename, writeback=True)
File "/usr/lib64/python3.9/shelve.py", line 243, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib64/python3.9/shelve.py", line 227, in __init__
Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
File "/usr/lib64/python3.9/dbm/__init__.py", line 89, in open
raise error[0]("db type could not be determined")
dbm.error: db type could not be determined
[2023-05-02 05:57:37,682: ERROR/ForkPoolWorker-3] Task burpui.tasks.cleanup_restore[fbd84926-d587-417e-88b4-f815bf275d47] raised unexpected: OperationalError('(sqlite3.OperationalError) no such table: task')
Traceback (most recent call last):
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1963, in _exec_single_context
self.dialect.do_execute(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/default.py", line 920, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: task
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/venv_apps/bui/lib64/python3.9/site-packages/celery/app/trace.py", line 451, in trace_task
R = retval = fun(*args, **kwargs)
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../burpui/extensions.py", line 307, in __call__
return TaskBase.__call__(self, *args, **kwargs)
File "/venv_apps/bui/lib64/python3.9/site-packages/celery/app/trace.py", line 734, in __protected_call__
return self.run(*args, **kwargs)
File "/venv_apps/bui/lib64/python3.9/site-packages/celery/app/autoretry.py", line 34, in run
return task._orig_run(*args, **kwargs)
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../burpui/tasks.py", line 229, in cleanup_restore
for rec in query.limit(100):
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/orm/query.py", line 2828, in __iter__
result = self._iter()
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/orm/query.py", line 2842, in _iter
result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/orm/session.py", line 2231, in execute
return self._execute_internal(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/orm/session.py", line 2126, in _execute_internal
result: Result[Any] = compile_state_cls.orm_execute_statement(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/orm/context.py", line 292, in orm_execute_statement
result = conn.execute(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1413, in execute
return meth(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/sql/elements.py", line 483, in _execute_on_connection
return connection._execute_clauseelement(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1637, in _execute_clauseelement
ret = self._execute_context(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1841, in _execute_context
return self._exec_single_context(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1982, in _exec_single_context
self._handle_dbapi_exception(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 2339, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1963, in _exec_single_context
self.dialect.do_execute(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/default.py", line 920, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: task
[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
FROM task
WHERE task.task = ? AND task.expire <= ?
LIMIT ? OFFSET ?]
[parameters: ('perform_restore', '2023-05-02 08:57:37.665302', 100, 0)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
[2023-05-02 05:57:37,683: ERROR/ForkPoolWorker-5] Task burpui.tasks.cleanup_expired_sessions[c4300c18-46f7-4e30-bff2-542ef47f4d46] raised unexpected: OperationalError('(sqlite3.OperationalError) no such table: session')
Traceback (most recent call last):
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1963, in _exec_single_context
self.dialect.do_execute(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/default.py", line 920, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: session
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/venv_apps/bui/lib64/python3.9/site-packages/celery/app/trace.py", line 451, in trace_task
R = retval = fun(*args, **kwargs)
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../burpui/extensions.py", line 307, in __call__
return TaskBase.__call__(self, *args, **kwargs)
File "/venv_apps/bui/lib64/python3.9/site-packages/celery/app/trace.py", line 734, in __protected_call__
return self.run(*args, **kwargs)
File "/venv_apps/bui/lib64/python3.9/site-packages/celery/app/autoretry.py", line 34, in run
return task._orig_run(*args, **kwargs)
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../burpui/tasks.py", line 206, in cleanup_expired_sessions
list(map(expires, session_manager.get_expired_sessions(10000)))
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/orm/query.py", line 2828, in __iter__
result = self._iter()
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/orm/query.py", line 2842, in _iter
result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/orm/session.py", line 2231, in execute
return self._execute_internal(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/orm/session.py", line 2126, in _execute_internal
result: Result[Any] = compile_state_cls.orm_execute_statement(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/orm/context.py", line 292, in orm_execute_statement
result = conn.execute(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1413, in execute
return meth(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/sql/elements.py", line 483, in _execute_on_connection
return connection._execute_clauseelement(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1637, in _execute_clauseelement
ret = self._execute_context(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1841, in _execute_context
return self._exec_single_context(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1982, in _exec_single_context
self._handle_dbapi_exception(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 2339, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/base.py", line 1963, in _exec_single_context
self.dialect.do_execute(
File "/venv_apps/bui/lib/python3.9/site-packages/burpui/engines/../../sqlalchemy/engine/default.py", line 920, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: session
[SQL: SELECT session.id AS session_id, session.uuid AS session_uuid, session.user AS session_user, session.ip AS session_ip, session.ua AS session_ua, session.timestamp AS session_timestamp, session.expire AS session_expire, session.permanent AS session_permanent, session.api AS session_api
FROM session
WHERE session.timestamp <= ?
LIMIT ? OFFSET ?]
[parameters: ('2023-04-27 08:57:37.653274', 10000, 0)]
(Background on this error at: https://sqlalche.me/e/20/e3q8) |
I think part of this could be related to the behaviour I setup, I tried to setup everything in virtual environment at /venv/bui but something is not working with this setup: sudo /venv_apps/bui/bin/burp-ui -c /etc/burp/burpui.cfg
Traceback (most recent call last):
File "/bin/flask", line 8, in <module>
sys.exit(main())
File "/venv_apps/bui/lib64/python3.9/site-packages/flask/cli.py", line 1050, in main
cli.main()
File "/venv_apps/bui/lib64/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/venv_apps/bui/lib64/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/venv_apps/bui/lib64/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/venv_apps/bui/lib64/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/venv_apps/bui/lib64/python3.9/site-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/venv_apps/bui/lib64/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/venv_apps/bui/lib64/python3.9/site-packages/flask/cli.py", line 911, in run_command
raise e from None
File "/venv_apps/bui/lib64/python3.9/site-packages/flask/cli.py", line 897, in run_command
app = info.load_app()
File "/venv_apps/bui/lib64/python3.9/site-packages/flask/cli.py", line 308, in load_app
app = locate_app(import_name, name)
File "/venv_apps/bui/lib64/python3.9/site-packages/flask/cli.py", line 218, in locate_app
__import__(module_name)
File "/venv_apps/bui/lib64/python3.9/site-packages/burpui/cli.py", line 51, in <module>
app = create_app(
File "/venv_apps/bui/lib64/python3.9/site-packages/burpui/app.py", line 300, in create_app
create_db(app, cli, unittest, celery_worker=celery_worker)
File "/venv_apps/bui/lib64/python3.9/site-packages/burpui/extensions.py", line 88, in create_db
upgd = subprocess.Popen(
File "/usr/lib64/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib64/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'bui-manage'
[devops@alma9-01 ~]$ bui-manage
Error: Could not import 'burpui.cli'.
Usage: flask [OPTIONS] COMMAND [ARGS]...
A general utility script for Flask applications.
An application to load must be given with the '--app' option, 'FLASK_APP'
environment variable, or with a 'wsgi.py' or 'app.py' file in the current
directory.
Options:
-e, --env-file FILE Load environment variables from this file. python-
dotenv must be installed.
-A, --app IMPORT The Flask application or factory function to load, in
the form 'module:name'. Module can be a dotted import
or file path. Name is not required if it is 'app',
'application', 'create_app', or 'make_app', and can be
'name(args)' to pass arguments.
--debug / --no-debug Set debug mode.
--version Show the Flask version.
--help Show this message and exit.
Commands:
routes Show the routes for the app.
run Run a development server.
shell Run a shell in the app context. |
This is what I get when I run with source /venv/bui/bin/activate: (bui) [devops@alma9-01 ~]$ /venv_apps/bui/bin/bui-manage -c /etc/burp/burpui.cfg db upgrade
Traceback (most recent call last):
File "/venv_apps/bui/bin/flask", line 8, in <module>
sys.exit(main())
File "/venv_apps/bui/lib64/python3.9/site-packages/flask/cli.py", line 1050, in main
cli.main()
File "/venv_apps/bui/lib64/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/venv_apps/bui/lib64/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/venv_apps/bui/lib64/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/venv_apps/bui/lib64/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/venv_apps/bui/lib64/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/venv_apps/bui/lib64/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/venv_apps/bui/lib64/python3.9/site-packages/flask/cli.py", line 357, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/venv_apps/bui/lib64/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/venv_apps/bui/lib64/python3.9/site-packages/flask_migrate/cli.py", line 150, in upgrade
_upgrade(directory, revision, sql, tag, x_arg)
File "/venv_apps/bui/lib64/python3.9/site-packages/flask_migrate/__init__.py", line 111, in wrapped
f(*args, **kwargs)
File "/venv_apps/bui/lib64/python3.9/site-packages/flask_migrate/__init__.py", line 200, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/venv_apps/bui/lib64/python3.9/site-packages/alembic/command.py", line 378, in upgrade
script.run_env()
File "/venv_apps/bui/lib64/python3.9/site-packages/alembic/script/base.py", line 576, in run_env
util.load_python_file(self.dir, "env.py")
File "/venv_apps/bui/lib64/python3.9/site-packages/alembic/util/pyfiles.py", line 94, in load_python_file
module = load_module_py(module_id, path)
File "/venv_apps/bui/lib64/python3.9/site-packages/alembic/util/pyfiles.py", line 110, in load_module_py
spec.loader.exec_module(module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/venv_apps/bui/share/burpui/migrations/env.py", line 98, in <module>
run_migrations_online()
File "/venv_apps/bui/share/burpui/migrations/env.py", line 79, in run_migrations_online
context.configure(
TypeError: alembic.context.configure() got multiple values for keyword argument 'compare_type' |
Hm, thanks for the update. I'll try to have a look and reproduce when I have a moment. |
Hey, sorry for the delay... I've been able to reproduce the issue. I'll try to come up with a fix ASAP |
Hello Benjamin,
Extremely happy to hear back. Great to hear you've been able to
reproduce the issue.
I'll keep an ear to the ground!
Sincerely,
Jay
Jay Lepore
CompuMatter
*Office*: 360 299 2428 | *Cell*: 360 202 0434
*Email*: ***@***.***
/If you are satisfied with your service, please consider providing us a
social media review at https://compumatter.com/reviews
...If you are not, please let me know so I can make it better/
…On 6/3/2023 3:01 AM, ziirish wrote:
Hey, sorry for the delay... I've been able to reproduce the issue.
I'll try to come up with a fix ASAP
—
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA5WC52F4QWYOVKED6D7YTXJMDP3ANCNFSM6AAAAAAUW32CZ4>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello, I've had a pretty busy month but I have just pushed a fix for this issue. |
New release 1.1.1 published just now. |
Hello,
I'm trying to setup Burp-UI on the same server I use as a Burp server. I target the play on an Ubuntu 22.04 server. When the role (or me manually) try to call http://localhost:5000/about, the gunicorn service crash.
Aand I have this in my logs:
Any idea what's wrong?
Thanks.
The text was updated successfully, but these errors were encountered: