Skip to content

Database initialization fails: Table 'threatkb.kb_users' doesn't exist during Docker Compose deployment #508

@chan-shaw

Description

@chan-shaw

When deploying the project using Docker Compose, I'm encountering the following error:

ERROR 1146 (42S02) at line 1: Table 'threatkb.kb_users' doesn't exist

Questions
Is there a database migration step I'm missing?
Are there any specific configuration settings required for proper database initialization?
Any help would be greatly appreciated as I'm trying to get the application running in my environment.

Command execution log for debugging Docker Compose deployment error

ubuntu@VM-140-17-ubuntu:~/ThreatKB$ sudo docker compose up
WARN[0000] /home/ubuntu/ThreatKB/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
[+] Running 12/12
 ✔ db Pulled                                                                                                                                                                               6.8s 
   ✔ e54b73e95ef3 Pull complete                                                                                                                                                            2.1s 
   ✔ 327840d38cb2 Pull complete                                                                                                                                                            2.1s 
   ✔ 642077275f5f Pull complete                                                                                                                                                            2.2s 
   ✔ e077469d560d Pull complete                                                                                                                                                            2.3s 
   ✔ cbf214d981a6 Pull complete                                                                                                                                                            2.3s 
   ✔ 7d1cc1ea1b3d Pull complete                                                                                                                                                            2.3s 
   ✔ d48f3c15cb80 Pull complete                                                                                                                                                            3.0s 
   ✔ 94c3d7b2c9ae Pull complete                                                                                                                                                            3.0s 
   ✔ f6cfbf240ed7 Pull complete                                                                                                                                                            5.8s 
   ✔ e12b159b2a12 Pull complete                                                                                                                                                            5.8s 
   ✔ 4e93c6fd777f Pull complete                                                                                                                                                            5.8s 
[+] Running 6/6
 ✔ Network threatkb_default             Created                                                                                                                                            0.0s 
 ✔ Volume "threatkb_db_data"            Created                                                                                                                                            0.0s 
 ✔ Container threatkb-db-1              Created                                                                                                                                            0.8s 
 ✔ Container threatkb-redis-1           Created                                                                                                                                            0.0s 
 ✔ Container threatkb-threatkb-1        Created                                                                                                                                            0.0s 
 ✔ Container threatkb-threatkb_agent-1  Created                                                                                                                                            0.0s 
Attaching to db-1, redis-1, threatkb-1, threatkb_agent-1
db-1              | 2025-05-09 07:22:17+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1.el8 started.
db-1              | 2025-05-09 07:22:17+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db-1              | 2025-05-09 07:22:17+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1.el8 started.
db-1              | 2025-05-09 07:22:18+00:00 [Note] [Entrypoint]: Initializing database files
threatkb_agent-1  | + env
threatkb_agent-1  | REDIS_TASK_SERIALIZER=json
threatkb_agent-1  | HOSTNAME=7290daa8ef6b
threatkb_agent-1  | REDIS_ACCEPT_CONTENT=["json"]
threatkb_agent-1  | C_FORCE_ROOT=true
threatkb_agent-1  | PWD=/opt/threatkb
threatkb_agent-1  | HOME=/root
threatkb_agent-1  | RUN_AGENT=1
threatkb_agent-1  | REDIS_RESULT_SERIALIZER=json
threatkb_agent-1  | SHLVL=1
threatkb_agent-1  | REDIS_BROKER_URL=redis://redis:6379/0
threatkb_agent-1  | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
db-1              | 2025-05-09T07:22:18.073259Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
threatkb_agent-1  | _=/usr/bin/env
db-1              | 2025-05-09T07:22:18.073274Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.29) initializing of server in progress as process 42
threatkb_agent-1  | + cd /opt/threatkb
db-1              | 2025-05-09T07:22:18.081108Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
threatkb_agent-1  | + ./wait-for-it.sh db:3306 -- echo 'db is up'
threatkb_agent-1  | wait-for-it.sh: waiting 15 seconds for db:3306
redis-1           | 1:C 09 May 2025 07:22:18.113 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis-1           | 1:C 09 May 2025 07:22:18.113 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-1           | 1:C 09 May 2025 07:22:18.113 * Redis version=7.4.3, bits=64, commit=00000000, modified=0, pid=1, just started
redis-1           | 1:C 09 May 2025 07:22:18.113 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-1           | 1:M 09 May 2025 07:22:18.114 * monotonic clock: POSIX clock_gettime
redis-1           | 1:M 09 May 2025 07:22:18.115 * Running mode=standalone, port=6379.
redis-1           | 1:M 09 May 2025 07:22:18.115 * Server initialized
redis-1           | 1:M 09 May 2025 07:22:18.115 * Ready to accept connections tcp
threatkb-1        | + env
threatkb-1        | HOSTNAME=f70d439f8aa4
threatkb-1        | PWD=/opt/threatkb
threatkb-1        | SQL_HOST=db
threatkb-1        | MYSQL_ROOT_PASSWORD=b5vXcqzUtn4suyS
threatkb-1        | HOME=/root
threatkb-1        | SQL_PROTOCOL=mysql
threatkb-1        | LISTEN_PORT=5000
threatkb-1        | THREATKB_USER=admin@inquest.net
threatkb-1        | SQL_PASSWORD=b5vXcqzUtn4suyS
threatkb-1        | SHLVL=1
threatkb-1        | SQL_USERNAME=threatkb
threatkb-1        | SQL_DATABASE=threatkb
threatkb-1        | REDIS_CACHE_URL=redis://localhost:6379/0
threatkb-1        | LISTEN_ON=0.0.0.0
threatkb-1        | THREATKB_PASS=b5vXcqzUtn4suyS
threatkb-1        | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
threatkb-1        | SQL_PORT=3306
threatkb-1        | _=/usr/bin/env
threatkb-1        | + cd /opt/threatkb
threatkb-1        | + ./wait-for-it.sh db:3306 -- echo 'db is up'
threatkb-1        | wait-for-it.sh: waiting 15 seconds for db:3306
db-1              | 2025-05-09T07:22:18.460136Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
db-1              | 2025-05-09T07:22:19.445349Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
db-1              | 2025-05-09 07:22:21+00:00 [Note] [Entrypoint]: Database files initialized
db-1              | 2025-05-09 07:22:21+00:00 [Note] [Entrypoint]: Starting temporary server
db-1              | 2025-05-09T07:22:22.101863Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
db-1              | 2025-05-09T07:22:22.101877Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 91
db-1              | 2025-05-09T07:22:22.117095Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
db-1              | 2025-05-09T07:22:22.228819Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
db-1              | 2025-05-09T07:22:22.422143Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
db-1              | 2025-05-09T07:22:22.422172Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
db-1              | 2025-05-09T07:22:22.426061Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db-1              | 2025-05-09T07:22:22.438296Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.29'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server - GPL.
db-1              | 2025-05-09 07:22:22+00:00 [Note] [Entrypoint]: Temporary server started.
db-1              | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
db-1              | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
db-1              | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
db-1              | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
db-1              | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
db-1              | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
db-1              | 2025-05-09 07:22:23+00:00 [Note] [Entrypoint]: Creating database threatkb
db-1              | 2025-05-09 07:22:23+00:00 [Note] [Entrypoint]: Creating user threatkb
db-1              | 2025-05-09 07:22:23+00:00 [Note] [Entrypoint]: Giving user threatkb access to schema threatkb
db-1              | 
db-1              | 2025-05-09 07:22:24+00:00 [Note] [Entrypoint]: Stopping temporary server
db-1              | 2025-05-09T07:22:24.011873Z 13 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.29).
db-1              | 2025-05-09T07:22:25.124489Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29)  MySQL Community Server - GPL.
db-1              | 2025-05-09 07:22:26+00:00 [Note] [Entrypoint]: Temporary server stopped
db-1              | 
db-1              | 2025-05-09 07:22:26+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
db-1              | 
db-1              | 2025-05-09T07:22:26.272290Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
db-1              | 2025-05-09T07:22:26.272304Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 1
db-1              | 2025-05-09T07:22:26.278160Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
db-1              | 2025-05-09T07:22:26.392124Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
db-1              | 2025-05-09T07:22:26.559152Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
db-1              | 2025-05-09T07:22:26.559179Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
db-1              | 2025-05-09T07:22:26.560952Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db-1              | 2025-05-09T07:22:26.573657Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.29'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
threatkb_agent-1  | wait-for-it.sh: db:3306 is available after 9 seconds
threatkb_agent-1  | db is up
threatkb_agent-1  | + [[ ! -z 1 ]]
threatkb_agent-1  | + env/bin/celery -A app.celery worker --uid uwsgi --loglevel=info
threatkb-1        | wait-for-it.sh: db:3306 is available after 9 seconds
threatkb-1        | db is up
threatkb-1        | + [[ ! -z '' ]]
threatkb-1        | + find . -name '*.pyc' -exec rm -f '{}' ';'
threatkb-1        | + env/bin/flask db upgrade
threatkb_agent-1  | app config: <Config {'DEBUG': False, 'TESTING': False, 'PROPAGATE_EXCEPTIONS': None, 'SECRET_KEY': 'aaaaaaaaaaaaaaaaaaaaaaaa', 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(days=31), 'USE_X_SENDFILE': False, 'SERVER_NAME': None, 'APPLICATION_ROOT': '/', 'SESSION_COOKIE_NAME': 'session', 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_PATH': None, 'SESSION_COOKIE_HTTPONLY': True, 'SESSION_COOKIE_SECURE': False, 'SESSION_COOKIE_SAMESITE': None, 'SESSION_REFRESH_EACH_REQUEST': True, 'MAX_CONTENT_LENGTH': None, 'SEND_FILE_MAX_AGE_DEFAULT': None, 'TRAP_BAD_REQUEST_ERRORS': None, 'TRAP_HTTP_EXCEPTIONS': False, 'EXPLAIN_TEMPLATE_LOADING': False, 'PREFERRED_URL_SCHEME': 'http', 'TEMPLATES_AUTO_RELOAD': None, 'MAX_COOKIE_SIZE': 4093, 'LOGGING_LEVEL': 10, 'SQLALCHEMY_DATABASE_URI': 'mysql://root:yourpassword@127.0.0.1:3306/threatkb_test?use_unicode=1&charset=utf8', 'SQLALCHEMY_TRACK_MODIFICATIONS': False, 'SQL_DATABASE': 'threatkb_test', 'SQL_HOST': '127.0.0.1', 'SQL_PASSWORD': 'yourpassword', 'SQL_PORT': '3306', 'SQL_PROTOCOL': 'mysql', 'SQL_USERNAME': 'root', 'TEST_PASSWORD': 'password', 'TEST_PASSWORD_HASHED': b'$2b$12$Rx9.vQCk489tO0bg50/Sfem9VOggC.L/WNhO1XMPlArsRXsxPkKZG', 'TEST_USER': 'admin', 'SQLALCHEMY_ENGINE_OPTIONS': {}, 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_BINDS': {}, 'SQLALCHEMY_RECORD_QUERIES': False, 'BROKER_URL': 'redis://redis:6379/0', 'TASK_SERIALIZER': 'json', 'RESULT_SERIALIZER': 'json', 'ACCEPT_CONTENT': '["json"]', 'FILE_STORE_PATH': None, 'MAX_MILLIS_PER_FILE_THRESHOLD': None}>
threatkb_agent-1  |  
threatkb_agent-1  |  -------------- celery@7290daa8ef6b v5.2.6 (dawn-chorus)
threatkb_agent-1  | --- ***** ----- 
threatkb_agent-1  | -- ******* ---- Linux-6.8.0-57-generic-x86_64-with-glibc2.29 2025-05-09 07:22:30
threatkb_agent-1  | - *** --- * --- 
threatkb_agent-1  | - ** ---------- [config]
threatkb_agent-1  | - ** ---------- .> app:         app:0x7568caa29b20
threatkb_agent-1  | - ** ---------- .> transport:   redis://redis:6379/0
threatkb_agent-1  | - ** ---------- .> results:     redis://redis:6379/0
threatkb_agent-1  | - *** --- * --- .> concurrency: 8 (prefork)
threatkb_agent-1  | -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
threatkb_agent-1  | --- ***** ----- 
threatkb_agent-1  |  -------------- [queues]
threatkb_agent-1  |                 .> celery           exchange=celery(direct) key=celery
threatkb_agent-1  |                 
threatkb_agent-1  | 
threatkb_agent-1  | [tasks]
threatkb_agent-1  |   . app.routes.test_yara_rule.test_yara_rule_task
threatkb_agent-1  | 
threatkb_agent-1  | [2025-05-09 07:22:30,634: WARNING/MainProcess] /opt/threatkb/env/lib/python3.8/site-packages/celery/app/utils.py:204: CDeprecationWarning: 
threatkb_agent-1  |     The 'BROKER_URL' setting is deprecated and scheduled for removal in
threatkb_agent-1  |     version 6.0.0. Use the broker_url instead
threatkb_agent-1  | 
threatkb_agent-1  |   deprecated.warn(description=f'The {setting!r} setting',
threatkb_agent-1  | 
threatkb_agent-1  | [2025-05-09 07:22:30,634: WARNING/MainProcess] Please run `celery upgrade settings path/to/settings.py` to avoid these warnings and to allow a smoother upgrade to Celery 6.0.
threatkb_agent-1  | [2025-05-09 07:22:31,051: INFO/MainProcess] Connected to redis://redis:6379/0
threatkb_agent-1  | [2025-05-09 07:22:31,053: INFO/MainProcess] mingle: searching for neighbors
threatkb_agent-1  | [2025-05-09 07:22:32,061: INFO/MainProcess] mingle: all alone
threatkb_agent-1  | [2025-05-09 07:22:32,069: INFO/MainProcess] celery@7290daa8ef6b ready.
threatkb-1        | app config: <Config {'DEBUG': False, 'TESTING': False, 'PROPAGATE_EXCEPTIONS': None, 'SECRET_KEY': 'aaaaaaaaaaaaaaaaaaaaaaaa', 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(days=31), 'USE_X_SENDFILE': False, 'SERVER_NAME': None, 'APPLICATION_ROOT': '/', 'SESSION_COOKIE_NAME': 'session', 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_PATH': None, 'SESSION_COOKIE_HTTPONLY': True, 'SESSION_COOKIE_SECURE': False, 'SESSION_COOKIE_SAMESITE': None, 'SESSION_REFRESH_EACH_REQUEST': True, 'MAX_CONTENT_LENGTH': None, 'SEND_FILE_MAX_AGE_DEFAULT': None, 'TRAP_BAD_REQUEST_ERRORS': None, 'TRAP_HTTP_EXCEPTIONS': False, 'EXPLAIN_TEMPLATE_LOADING': False, 'PREFERRED_URL_SCHEME': 'http', 'TEMPLATES_AUTO_RELOAD': None, 'MAX_COOKIE_SIZE': 4093, 'LOGGING_LEVEL': 10, 'SQLALCHEMY_DATABASE_URI': 'mysql://threatkb:b5vXcqzUtn4suyS@db:3306/threatkb?use_unicode=1&charset=utf8', 'SQLALCHEMY_TRACK_MODIFICATIONS': False, 'SQL_DATABASE': 'threatkb', 'SQL_HOST': 'db', 'SQL_PASSWORD': 'b5vXcqzUtn4suyS', 'SQL_PORT': '3306', 'SQL_PROTOCOL': 'mysql', 'SQL_USERNAME': 'threatkb', 'TEST_PASSWORD': 'password', 'TEST_PASSWORD_HASHED': b'$2b$12$VK75mMiKzJijwzSNNx8NdOPOnvmQMOfTyeJqRV.38EvGjSqygtHw2', 'TEST_USER': 'admin', 'SQLALCHEMY_ENGINE_OPTIONS': {}, 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_BINDS': {}, 'SQLALCHEMY_RECORD_QUERIES': False, 'BROKER_URL': None, 'TASK_SERIALIZER': None, 'RESULT_SERIALIZER': None, 'ACCEPT_CONTENT': None, 'FILE_STORE_PATH': None, 'MAX_MILLIS_PER_FILE_THRESHOLD': None}>
threatkb-1        | Traceback (most recent call last):
threatkb-1        |   File "env/bin/flask", line 8, in <module>
threatkb-1        |     sys.exit(main())
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/flask/cli.py", line 1063, in main
threatkb-1        |     cli.main()
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/click/core.py", line 1055, in main
threatkb-1        |     rv = self.invoke(ctx)
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
threatkb-1        |     return _process_result(sub_ctx.command.invoke(sub_ctx))
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
threatkb-1        |     return _process_result(sub_ctx.command.invoke(sub_ctx))
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
threatkb-1        |     return ctx.invoke(self.callback, **ctx.params)
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/click/core.py", line 760, in invoke
threatkb-1        |     return __callback(*args, **kwargs)
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
threatkb-1        |     return f(get_current_context(), *args, **kwargs)
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/flask/cli.py", line 357, in decorator
threatkb-1        |     return __ctx.invoke(f, *args, **kwargs)
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/click/core.py", line 760, in invoke
threatkb-1        |     return __callback(*args, **kwargs)
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/flask_migrate/cli.py", line 150, in upgrade
threatkb-1        |     _upgrade(directory, revision, sql, tag, x_arg)
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/flask_migrate/__init__.py", line 111, in wrapped
threatkb-1        |     f(*args, **kwargs)
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/flask_migrate/__init__.py", line 200, in upgrade
threatkb-1        |     command.upgrade(config, revision, sql=sql, tag=tag)
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/alembic/command.py", line 378, in upgrade
threatkb-1        |     script.run_env()
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/alembic/script/base.py", line 569, in run_env
threatkb-1        |     util.load_python_file(self.dir, "env.py")
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/alembic/util/pyfiles.py", line 94, in load_python_file
threatkb-1        |     module = load_module_py(module_id, path)
threatkb-1        |   File "/opt/threatkb/env/lib/python3.8/site-packages/alembic/util/pyfiles.py", line 110, in load_module_py
threatkb-1        |     spec.loader.exec_module(module)  # type: ignore
threatkb-1        |   File "<frozen importlib._bootstrap_external>", line 848, in exec_module
threatkb-1        |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
threatkb-1        |   File "/opt/threatkb/migrations/env.py", line 88, in <module>
threatkb-1        |     run_migrations_online()
threatkb-1        |   File "/opt/threatkb/migrations/env.py", line 73, in run_migrations_online
threatkb-1        |     context.configure(connection=connection,
threatkb-1        | TypeError: configure() got multiple values for keyword argument 'compare_type'
threatkb-1        | ++ echo 'select count(*) from kb_users;'
threatkb-1        | ++ mysql -u threatkb -pb5vXcqzUtn4suyS -h db threatkb
threatkb-1        | ++ sed 's/[^0-9]//g'
threatkb-1        | mysql: [Warning] Using a password on the command line interface can be insecure.
threatkb-1        | ERROR 1146 (42S02) at line 1: Table 'threatkb.kb_users' doesn't exist
threatkb-1        | + num_users=
threatkb-1        | + '[' -lt 1 ']'
threatkb-1        | /opt/threatkb/docker-entrypoint.sh: line 17: [: -lt: unary operator expected
threatkb-1        | + env/bin/python3.8 run.py --listen-on 0.0.0.0 --listen-port 5000
threatkb-1        | app config: <Config {'DEBUG': False, 'TESTING': False, 'PROPAGATE_EXCEPTIONS': None, 'SECRET_KEY': 'aaaaaaaaaaaaaaaaaaaaaaaa', 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(days=31), 'USE_X_SENDFILE': False, 'SERVER_NAME': None, 'APPLICATION_ROOT': '/', 'SESSION_COOKIE_NAME': 'session', 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_PATH': None, 'SESSION_COOKIE_HTTPONLY': True, 'SESSION_COOKIE_SECURE': False, 'SESSION_COOKIE_SAMESITE': None, 'SESSION_REFRESH_EACH_REQUEST': True, 'MAX_CONTENT_LENGTH': None, 'SEND_FILE_MAX_AGE_DEFAULT': None, 'TRAP_BAD_REQUEST_ERRORS': None, 'TRAP_HTTP_EXCEPTIONS': False, 'EXPLAIN_TEMPLATE_LOADING': False, 'PREFERRED_URL_SCHEME': 'http', 'TEMPLATES_AUTO_RELOAD': None, 'MAX_COOKIE_SIZE': 4093, 'LOGGING_LEVEL': 10, 'SQLALCHEMY_DATABASE_URI': 'mysql://threatkb:b5vXcqzUtn4suyS@db:3306/threatkb?use_unicode=1&charset=utf8', 'SQLALCHEMY_TRACK_MODIFICATIONS': False, 'SQL_DATABASE': 'threatkb', 'SQL_HOST': 'db', 'SQL_PASSWORD': 'b5vXcqzUtn4suyS', 'SQL_PORT': '3306', 'SQL_PROTOCOL': 'mysql', 'SQL_USERNAME': 'threatkb', 'TEST_PASSWORD': 'password', 'TEST_PASSWORD_HASHED': b'$2b$12$HJYk9wcgjFtc8TzKgWK2pOQCJ4ujAqwFTDZQTl8.3Vo2TV9FwwLbq', 'TEST_USER': 'admin', 'SQLALCHEMY_ENGINE_OPTIONS': {}, 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_BINDS': {}, 'SQLALCHEMY_RECORD_QUERIES': False, 'BROKER_URL': None, 'TASK_SERIALIZER': None, 'RESULT_SERIALIZER': None, 'ACCEPT_CONTENT': None, 'FILE_STORE_PATH': None, 'MAX_MILLIS_PER_FILE_THRESHOLD': None}>
threatkb-1        |  * Serving Flask app 'app'
threatkb-1        |  * Debug mode: on
threatkb-1        | WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
threatkb-1        |  * Running on all addresses (0.0.0.0)
threatkb-1        |  * Running on http://127.0.0.1:5000
threatkb-1        |  * Running on http://172.19.0.5:5000
threatkb-1        | Press CTRL+C to quit
threatkb-1        |  * Restarting with stat
threatkb-1        |  * Debugger is active!
threatkb-1        |  * Debugger PIN: 637-419-994

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions