Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

superset db upgrade(SECRET_KEY) #31920

Open
3 tasks
salah34145 opened this issue Jan 19, 2025 · 3 comments
Open
3 tasks

superset db upgrade(SECRET_KEY) #31920

salah34145 opened this issue Jan 19, 2025 · 3 comments
Labels
install:config Installation - Configuration settings

Comments

@salah34145
Copy link

Bug description

(venv) C:\superset>superset db upgrade
Usage: superset [OPTIONS] COMMAND [ARGS]...
Try 'superset --help' for help.

Error: Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a 'wsgi.py' or 'app.py' file in the current directory.

(venv) C:\superset>set FLASK_APP=superset

(venv) C:\superset>superset db upgrade

                                WARNING

A Default SECRET_KEY was detected, please use superset_config.py to override it.
Use a strong complex alphanumeric string and use a tool to help you generate
a sufficiently random sequence, ex: openssl rand -base64 42


Refusing to start due to insecure SECRET_KEY

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Copy link

dosubot bot commented Jan 19, 2025

To resolve the "Refusing to start due to insecure SECRET_KEY" error, you need to set a strong, random SECRET_KEY in your superset_config.py file or as an environment variable. Here's how you can do it:

  1. In superset_config.py: Add a strong, random SECRET_KEY to your configuration file like this:

    SECRET_KEY = 'YOUR_OWN_RANDOM_GENERATED_SECRET_KEY'

    You can generate a secure key using: openssl rand -base64 42

  2. As an Environment Variable: Alternatively, set the SUPERSET_SECRET_KEY environment variable:

    export SUPERSET_SECRET_KEY=YOUR-SECRET-KEY
  3. Ensure Configuration is Loaded: Make sure Superset is correctly reading your superset_config.py file. Set the SUPERSET_CONFIG_PATH environment variable to the path of your configuration file:

    export SUPERSET_CONFIG_PATH=/path/to/your/superset_config.py
  4. Restart Superset: After making these changes, restart the Superset service to apply the new configuration.

These steps should help you resolve the error and proceed with the database upgrade [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the install:config Installation - Configuration settings label Jan 19, 2025
@salah34145
Copy link
Author

Image
I encountered an issue when trying to access the Superset interface. Some elements or data were not visible as they are shown in the provided images. While the system appears to be functioning correctly in the background, not everything is being displayed as expected, similar to how it is shown in the images.

The interface doesn't seem to render all the content as it should, and some parts are either missing or not visible. This might be due to display settings or compatibility issues between the software version and the data.

@hainenber
Copy link
Contributor

Can you check logs of the Flask server? This is assuming you're running superset right in the host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install:config Installation - Configuration settings
Projects
None yet
Development

No branches or pull requests

2 participants