4cat
4cat copied to clipboard
AttributeError: 'Namespace' object has no attribute 'release'
Fresh installation on MAC with Docker from local files. Any idea what i did wrong?
4cat_backend:
Waiting for postgres... PostgreSQL started Database already created
Traceback (most recent call last):
File "helper-scripts/migrate.py", line 66, in
4cat_backend EXITED (1)
Woops! Should be fixed now, thanks for reporting.
Thanks @stijn-uva is up and running now, but http://localhost:4444 and http://localhost:443 are not working, any ideas?
Does localhost:80 work?
No, and i dnt have nothing running in port 80 @stijn-uva
Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
`[2022-08-25 16:16:52 +0000] [33] [ERROR] Exception on /first-run/ [GET]
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/opt/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1947, in full_dispatch_request
rv = self.preprocess_request()
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 2241, in preprocess_request
rv = func()
File "/usr/src/app/webtool/views/views_user.py", line 79, in banned_users
if current_user and current_user.is_authenticated and current_user.is_deactivated:
File "/opt/venv/lib/python3.8/site-packages/werkzeug/local.py", line 329, in bool
return bool(self._get_current_object())
File "/opt/venv/lib/python3.8/site-packages/werkzeug/local.py", line 307, in _get_current_object
return self.__local()
File "/opt/venv/lib/python3.8/site-packages/flask_login/utils.py", line 26, in
[2022-08-25 16:16:53 +0000] [33] [ERROR] Exception on /favicon.ico [GET]
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/opt/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1947, in full_dispatch_request
rv = self.preprocess_request()
File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 2241, in preprocess_request
rv = func()
File "/usr/src/app/webtool/views/views_user.py", line 79, in banned_users
if current_user and current_user.is_authenticated and current_user.is_deactivated:
File "/opt/venv/lib/python3.8/site-packages/werkzeug/local.py", line 329, in bool
return bool(self._get_current_object())
File "/opt/venv/lib/python3.8/site-packages/werkzeug/local.py", line 307, in _get_current_object
return self.__local()
File "/opt/venv/lib/python3.8/site-packages/flask_login/utils.py", line 26, in
`
Did you do a completely fresh install after I fixed the issue? If the initialisation script crashed earlier there may be issues with the set-up that can only be fixed by rebuilding the containers.
I did a new fresh install and i got this @stijn-uva :
docker-compose -f docker-compose_prod.yml up
Creating network "4cat_default" with the default driver
Creating 4cat_db ... done
Creating 4cat_backend ... done
Creating 4cat_frontend ... done
Attaching to 4cat_db, 4cat_backend, 4cat_frontend
backend_1 | Waiting for postgres...
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2022-08-26 15:12:47.027 UTC [1] LOG: starting PostgreSQL 14.5 (Debian 14.5-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
db_1 | 2022-08-26 15:12:47.044 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
db_1 | 2022-08-26 15:12:47.046 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2022-08-26 15:12:47.053 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2022-08-26 15:12:47.111 UTC [26] LOG: database system was shut down at 2022-08-25 19:11:26 UTC
db_1 | 2022-08-26 15:12:47.243 UTC [1] LOG: database system is ready to accept connections
backend_1 | PostgreSQL started
backend_1 | Database already created
backend_1 |
backend_1 | 4CAT migration agent
backend_1 | ------------------------------------------
backend_1 | Current 4CAT version: 1.28
backend_1 | Checked out version: 1.28
backend_1 | Already up to date.
backend_1 |
backend_1 | Configuration file config/config.ini already exists
backend_1 | Checking Docker .env variables and updating if necessary
backend_1 | Starting app
backend_1 | 4CAT is accessible at:
backend_1 | http://localhost:80
backend_1 |
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
backend_1 | Starting 4CAT Backend Daemon...
backend_1 | ...4CAT Backend Daemon started.
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
frontend_1 | Backend has not started - sleeping
db_1 | 2022-08-26 15:13:33.103 UTC [71] ERROR: relation "users_notifications" does not exist at character 13
db_1 | 2022-08-26 15:13:33.103 UTC [71] STATEMENT: DELETE FROM users_notifications WHERE timestamp_expires IS NOT NULL AND timestamp_expires < 1661526813
db_1 | 2022-08-26 15:13:33.752 UTC [73] ERROR: relation "users_notifications" does not exist at character 13
db_1 | 2022-08-26 15:13:33.752 UTC [73] STATEMENT: DELETE FROM users_notifications WHERE username = '!admins' AND notification LIKE 'A new version of 4CAT%'
frontend_1 | Backend is up
frontend_1 | [2022-08-26 15:13:36 +0000] [1] [INFO] Starting gunicorn 20.1.0
frontend_1 | [2022-08-26 15:13:36 +0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)
frontend_1 | [2022-08-26 15:13:36 +0000] [1] [INFO] Using worker: gthread
frontend_1 | [2022-08-26 15:13:36 +0000] [70] [INFO] Booting worker with pid: 70
frontend_1 | [2022-08-26 15:13:37 +0000] [72] [INFO] Booting worker with pid: 72
frontend_1 | [2022-08-26 15:14:07 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:70)
frontend_1 | [2022-08-26 15:14:07 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:72)
frontend_1 | [2022-08-26 15:14:07 +0000] [70] [INFO] Worker exiting (pid: 70)
frontend_1 | [2022-08-26 15:14:07 +0000] [72] [INFO] Worker exiting (pid: 72)
frontend_1 | [2022-08-26 15:14:07 +0000] [95] [INFO] Booting worker with pid: 95
frontend_1 | [2022-08-26 15:14:07 +0000] [1] [WARNING] Worker with pid 70 was terminated due to signal 9
frontend_1 | [2022-08-26 15:14:07 +0000] [97] [INFO] Booting worker with pid: 97
db_1 | 2022-08-26 15:14:19.523 UTC [138] ERROR: relation "users_notifications" does not exist at character 17
db_1 | 2022-08-26 15:14:19.523 UTC [138] STATEMENT: SELECT n.* FROM users_notifications AS n, users AS u WHERE u.name = 'anonymous' AND (u.name = n.username OR (u.is_admin AND n.username = '!admins') OR n.username = '!everyone')
frontend_1 | Warning: Not all modules could be found, which might cause data sources and modules to not function.
frontend_1 | Missing modules:
frontend_1 | flag (for processors datasources.fourchan.scrapers.scrape_threads, datasources.eightchan.scrapers.scrape_threads, datasources.eightkun.scrapers.scrape_threads)
frontend_1 |
frontend_1 | /opt/venv/lib/python3.8/site-packages/flask/sessions.py:208: UserWarning: "localhost" is not a valid cookie domain, it must contain a ".". Add an entry to your hosts file, for example "localhost.localdomain", and use that instead.
frontend_1 | warnings.warn(
frontend_1 | [2022-08-26 15:14:19 +0000] [95] [ERROR] Exception on /first-run/ [GET]
frontend_1 | Traceback (most recent call last):
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 2446, in wsgi_app
frontend_1 | response = self.full_dispatch_request()
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request
frontend_1 | rv = self.handle_user_exception(e)
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception
frontend_1 | reraise(exc_type, exc_value, tb)
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
frontend_1 | raise value
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request
frontend_1 | rv = self.dispatch_request()
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1935, in dispatch_request
frontend_1 | return self.view_functionsrule.endpoint
frontend_1 | File "/usr/src/app/webtool/views/views_user.py", line 172, in create_first_user
frontend_1 | return render_template("account/first-run.html", incomplete=missing, form=request.form)
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/templating.py", line 136, in render_template
frontend_1 | ctx.app.update_template_context(context)
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 838, in update_template_context
frontend_1 | context.update(func())
frontend_1 | File "/usr/src/app/webtool/lib/template_filters.py", line 220, in inject_now
frontend_1 | notifications = current_user.get_notifications()
frontend_1 | File "/usr/src/app/webtool/lib/user.py", line 401, in get_notifications
frontend_1 | notifications = self.db.fetchall(
frontend_1 | File "/usr/src/app/common/lib/database.py", line 299, in fetchall
frontend_1 | self.query(query, cursor=cursor, args)
frontend_1 | File "/usr/src/app/common/lib/database.py", line 77, in query
frontend_1 | return cursor.execute(query, replacements)
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/psycopg2/extras.py", line 236, in execute
frontend_1 | return super().execute(query, vars)
frontend_1 | psycopg2.errors.UndefinedTable: relation "users_notifications" does not exist
frontend_1 | LINE 1: SELECT n. FROM users_notifications AS n, users AS u WHERE u...
frontend_1 | ^
frontend_1 |
db_1 | 2022-08-26 15:14:19.895 UTC [138] ERROR: current transaction is aborted, commands ignored until end of transaction block
db_1 | 2022-08-26 15:14:19.895 UTC [138] STATEMENT: SELECT * FROM users WHERE name = 'anonymous'
frontend_1 | [2022-08-26 15:14:19 +0000] [95] [ERROR] Exception on /favicon.ico [GET]
frontend_1 | Traceback (most recent call last):
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 2446, in wsgi_app
frontend_1 | response = self.full_dispatch_request()
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request
frontend_1 | rv = self.handle_user_exception(e)
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception
frontend_1 | reraise(exc_type, exc_value, tb)
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
frontend_1 | raise value
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 1947, in full_dispatch_request
frontend_1 | rv = self.preprocess_request()
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask/app.py", line 2241, in preprocess_request
frontend_1 | rv = func()
frontend_1 | File "/usr/src/app/webtool/views/views_user.py", line 79, in banned_users
frontend_1 | if current_user and current_user.is_authenticated and current_user.is_deactivated:
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/werkzeug/local.py", line 329, in bool
frontend_1 | return bool(self._get_current_object())
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/werkzeug/local.py", line 307, in _get_current_object
frontend_1 | return self.__local()
frontend_1 | File "/opt/venv/lib/python3.8/site-packages/flask_login/utils.py", line 26, in
Hi @psegovias apologies for the wait. We've reworked the Docker setup and startup quite extensively over the past weeks. Would you be able to test if this still occurs for you when building the containers from the current master branch? Thanks!
Given the lack of reply, we're assuming this works now after the changes mentioned above.