Closed jotamjr closed 4 months ago
I have the same error
@jotamjr Hi, we are aware of the issue, and it will be corrected shortly.
I hava the same error:
docker logs faraday_db 2>&1 | grep ERROR
2024-04-19 02:55:55.941 UTC [56] ERROR: relation "agent" does not exist at character 307 2024-04-19 02:56:00.048 UTC [57] ERROR: relation "agent" does not exist at character 307 2024-04-19 02:56:00.142 UTC [57] ERROR: relation "vulnerability" does not exist 2024-04-19 02:56:06.005 UTC [58] ERROR: relation "agent" does not exist at character 307 2024-04-19 02:56:10.110 UTC [59] ERROR: relation "agent" does not exist at character 307 2024-04-19 02:56:10.148 UTC [59] ERROR: relation "vulnerability" does not exist 2024-04-19 02:56:16.132 UTC [60] ERROR: relation "agent" does not exist at character 307 2024-04-19 02:56:20.549 UTC [61] ERROR: relation "agent" does not exist at character 307
It seems like the table "alembic_version" will always be found during the database initialization at line:425-428 in initdb.py even though the metadata tables have not been created yet. This resulted in the function returning and skipping the "create_all" function that will create all required tables, and then the migration failed.
Here is my work-around solution:
Edit initdb.py (should be located in /usr/local/lib/python3.8/site-packages/faraday/server/commands/initdb.py) by removing the return statement at line:432
Run the command "faraday-manage create-tables" in faraday-app's docker Exec console to create all required tables
Now, you should be able to access the Faraday application
Run the command "faraday-manage create-superuser" in faraday-app's docker Exec console
Hope this helps!
@jotamjr please do a pull for the community version (5.3.0), delete the $HOME/.faraday folder and do a docker-compose up.
check you dont have volumes persistent in docker, and delete the images you have in docker about faraday.
Cheers!
Faraday version
5.2.0
Component Name
Docker image (faradaysec/faraday)
Steps to reproduce