Apache Superset error when installing locally using Docker Compose
Asked Answered
W

3

11

I'm trying to install to my Ubuntu 20.04 local machine using docker-compose. When I run sudo docker-compose -f docker-compose-non-dev.yml up, I got several errors and the process keep giving errors and did not end, so I aborted. Can you please tell me what the problem is?

The errors I get during Init Step 1/4 [Starting] -- Applying DB migrations are:

  • sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) >relation "logs" does not exist

  • sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) >relation "ab_permission_view_role" does not exist

  • sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) >relation "report_schedule" does not exist

enter image description here

Wallenstein answered 20/6, 2021 at 21:36 Comment(0)
M
12

I had the same same issue on Mac OS. And similar issues have been reported in the GitHub issues page as well, but it was not reproducible by everyone.

There is a possibility that something may have gone wrong in the first run.

Try running docker-compose down -v and then run docker compose up.

If the above fails, try upgrading your docker installation. Installing a new version solved my problem.

Michelmichelangelo answered 1/7, 2021 at 4:16 Comment(1)
"This is probably because you already have database connections that were encrypted with the old key. You have to recreate them or update" this is the cause of the issue that is reported in GitHub. As @Ustav said, using docker-compose down -v will clean up your old containers and old data, then use docker compose up to start fresh. docker-compose will rm the superset containers. and -v will also remove the superset docker volumes which hold your old database data. I was struggling with this issue for hours due to I only deleted old containers but I did not delete the old volumes.Investigator
A
3

I experienced the same issue but these errors were at the end of a long string of cascading errors. I had this error consistently across all runs.

Looking at the first error, it seems like the initialisation script is not waiting for PostgreSQL to be ready and starts transacting right away. If the first transactions fail, many others fail subsequently. In my case the database needed a few more seconds to be ready so, I just added a sleep 60 at the beginning of docker/docker-bootstrap.sh to give time to PostgreSQL to start before other services start working.

I deleted the previously-created docker volumes and ran docker-compose -f docker-compose-non-dev.yml up again and now all works fine.

Allowedly answered 29/6, 2022 at 18:11 Comment(1)
This worked for me. I can't be the only one who thinks that it's quite poor for an obvious error like this to be present in a documented installation method for a supposedly enterprise-ready software distribution.Norenenorfleet
A
1

I had the same issue (Mac OS Monterey) where I had an instance of docker running Postgres for one of my apps, so when Superset started, it was looking at that instance of Postgres which obviously didn't have the appropriate databases/tables/views/etc.

So just stopping that other instance and restarting the Superset containers fixed the errors and properly started Superset. #embarrassed #oops

Agraphia answered 9/2, 2022 at 23:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.