superset icon indicating copy to clipboard operation
superset copied to clipboard

Cannot upgrade database

Open kaspergaj opened this issue 6 years ago • 8 comments

I wanted to upgrade the database to 0.35 according to the website: https://superset.apache.org/installation.html#upgrading

However, as I run superset db upgrade the command tries to create existing tables and encounters an error from this.

I'm using MySQL.

Expected results

To upgrade the database and run the server again.

Actual results

Error when upgrading and unable to run the server.

Screenshots

image

How to reproduce the bug

  1. pip install apache-superset --upgrade 2. superset db upgrade

Environment

(please complete the following information):

  • superset version: uncertain
  • python version: 3.7.2
  • node.js version: 10.16.3
  • npm version: 6.9.0

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • [x ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [ x] I have reproduced the issue with at least the latest released version of superset.
  • [ x] I have checked the issue tracker for the same issue and I haven't found one similar.

kaspergaj avatar Dec 04 '19 16:12 kaspergaj

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.89. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Dec 04 '19 16:12 issue-label-bot[bot]

@kaspergaj, what do you get when you run:

SELECT version_num FROM alembic_version;

?

betodealmeida avatar Dec 04 '19 17:12 betodealmeida

@betodealmeida I get 6c7537a6004a

kaspergaj avatar Dec 04 '19 18:12 kaspergaj

I have experienced same error when upgrading to Superset 0.35.1

I removed all tables in the database and then ran superset db upgrade (or copied to another database) I moved back the all tables to my database.

I realized that I could not more start the server with the command: superset runserver -d

Instead I used

gunicorn \
      -w 10 \
      -k gevent \
      --timeout 120 \
      -b  0.0.0.0:6666 \
      --limit-request-line 0 \
      --limit-request-field_size 0 \
      --statsd-host localhost:8125 \
      superset:app

I got an error when running, but then I updated to Gunicorn 20.0.4 and then I could start the apache server without error

BUT I still can't access Apache Superset on the domain.com:8088

What am I missing?

Hope somebody can come with a quick answer as it is important that I have it running again.

Thank you

envicon avatar Dec 04 '19 22:12 envicon

I found that when I changed 6666 to 8088 then I could open Apache Superset

gunicorn \
      -w 10 \
      -k gevent \
      --timeout 120 \
      -b  0.0.0.0:8088 \
      --limit-request-line 0 \
      --limit-request-field_size 0 \
      --statsd-host localhost:8125 \
      superset:app

But I had to add a field 'published' in the Table dashboards to open without error

And I can't see my charts - I get a yellow text saying I need to have permission

This endpoint requires the datasource noegletal_on, database or all_datasource_access permission

Any one knows how to get these permissions?

envicon avatar Dec 04 '19 23:12 envicon

Run superset init to bootstrap all necessary initial permissions you may be missing, or you can always add the missing permissions to your Admin role

dpgaspar avatar Dec 12 '19 17:12 dpgaspar

Create seperate virtual environmnet instead of using "pip install apache-superset --upgrade" follow this step you can see in step8 where superst db gets upgrade without any error like "existing database"

Step1: Install - "pip install virtualenv"

Step2: Create VM- "py -m venv your_env_name" or "python -m venv your_env_name" or just create environment using conda

Step3: Activate -"your_env_name\Scripts\activate"

Step4: Downlaod- python-geohash wheel with compitable version from the link:https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-geohash

Step5: Install the python-geohash library "pip install python-geohash directory"

step6: anaconda prompt -"pip install superset"

step7: # Create an admin user (you will be prompted to set username, first and last name before setting a password) by typing this- "fabmanager create-admin --app superset"

step8: type -"cd your_env_name/Scripts"

Step9: python superset db upgrade

image

drnancy avatar Dec 17 '19 06:12 drnancy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Feb 15 '20 06:02 stale[bot]