alephdata / aleph

Search and browse documents and data; find the people and companies you look for.

Home Page:http://docs.aleph.occrp.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG: Install errors with AttributeError: module 'aleph:manage' has no attribute 'app'

jezcaudle opened this issue · comments

Describe the bug
When installing and running the following errors occur:

api-1 | Traceback (most recent call last):
api-1 | File "/usr/local/lib/python3.8/dist-packages/gunicorn/util.py", line 414, in import_app
api-1 | app = getattr(mod, name)
api-1 | AttributeError: module 'aleph.manage' has no attribute 'app'
api-1 | Failed to find attribute 'app' in 'aleph.manage'.
api-1 | [2024-02-16 11:06:48 +0000] [10] [INFO] Worker exiting (pid: 10)
api-1 | Traceback (most recent call last):
api-1 | File "/usr/local/lib/python3.8/dist-packages/gunicorn/util.py", line 414, in import_app
api-1 | app = getattr(mod, name)
api-1 | AttributeError: module 'aleph.manage' has no attribute 'app'
api-1 | Failed to find attribute 'app' in 'aleph.manage'.
api-1 | [2024-02-16 11:06:48 +0000] [13] [INFO] Worker exiting (pid: 13)
api-1 | Traceback (most recent call last):
api-1 | File "/usr/local/lib/python3.8/dist-packages/gunicorn/util.py", line 414, in import_app
api-1 | app = getattr(mod, name)
api-1 | AttributeError: module 'aleph.manage' has no attribute 'app'
api-1 | Failed to find attribute 'app' in 'aleph.manage'.
api-1 | [2024-02-16 11:06:48 +0000] [12] [INFO] Worker exiting (pid: 12)
api-1 | Traceback (most recent call last):
api-1 | File "/usr/local/lib/python3.8/dist-packages/gunicorn/util.py", line 414, in import_app
api-1 | app = getattr(mod, name)
api-1 | AttributeError: module 'aleph.manage' has no attribute 'app'
api-1 | Failed to find attribute 'app' in 'aleph.manage'.
api-1 | [2024-02-16 11:06:48 +0000] [11] [INFO] Worker exiting (pid: 11)
api-1 | Traceback (most recent call last):
api-1 | File "/usr/local/lib/python3.8/dist-packages/gunicorn/util.py", line 414, in import_app
api-1 | app = getattr(mod, name)
api-1 | AttributeError: module 'aleph.manage' has no attribute 'app'
api-1 | Failed to find attribute 'app' in 'aleph.manage'.
api-1 | [2024-02-16 11:06:48 +0000] [9] [INFO] Worker exiting (pid: 9)
api-1 | [2024-02-16 11:06:49 +0000] [7] [ERROR] Worker (pid:10) exited with code 4
api-1 | [2024-02-16 11:06:49 +0000] [7] [ERROR] Worker (pid:12) was sent SIGTERM!
api-1 | [2024-02-16 11:06:49 +0000] [7] [ERROR] Worker (pid:9) was sent SIGTERM!
api-1 | [2024-02-16 11:06:49 +0000] [7] [ERROR] Worker (pid:13) was sent SIGTERM!
api-1 | [2024-02-16 11:06:49 +0000] [7] [ERROR] Worker (pid:11) was sent SIGTERM!
api-1 | [2024-02-16 11:06:49 +0000] [7] [ERROR] Shutting down: Master
api-1 | [2024-02-16 11:06:49 +0000] [7] [ERROR] Reason: App failed to load.
api-1 exited with code 4

To Reproduce
Steps to reproduce the behavior:

  1. Download docker-compose.yml and aleth.env.tmpl
  2. Add a random string to ALEPH_SECRET_KEY
  3. Set ALEPH_SINGLE_USER=true
  4. Rename aleth.env.tmpl to aleth.env
  5. docker run -it --rm --privileged --pid=host alpine:edge
    nsenter -t 1 -m -u -n -i
    sysctl -w vm.max_map_count=262144
  6. docker-compose up
  7. See error above

Expected behavior
No errors

Aleph version
3.15.5 I assume, not sure how to get the version. The web interface gives a 502 error. The commit for the docker-compose is edae002

aleph --version
Python 3.8.10
Flask 2.3.3
Werkzeug 3.0.1

Additional context
MacOs 13.6.4, Docker Desktop 4.27.2 (137060)

Hi @jezcaudle, thanks for reporting this problem. Unfortunately the installation guide referenced a configuration template on the unstable develop branch. This is now fixed in #3608.

In the meantime, you should be able to use the Docker Compose configuration from the main branch: https://github.com/alephdata/aleph/blob/main/docker-compose.yml

Working now thank you. It seems that GitHub links the to Develop branch - not main - from this link: https://github.com/search?q=aleph&type=repositories

I know in future to check for the main branch when ever I come to GitHub.

Once again thank you very much for your help and your speedy reply.