You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/05/20 10:38:42 UTC

[GitHub] [superset] teatonic opened a new issue #14735: Connection to postgres database as a source DB refused but working as a metadata DB

teatonic opened a new issue #14735:
URL: https://github.com/apache/superset/issues/14735


   Supeserset is running in a docker contrainer, using postgres as a metadata database
   This works fine as I am able to add new user and roles
   
   But when I add my first datasource which is a postgres database, I got the following error mesage : 
   _An error occurred while creating database: (configuration_method) Missing data for required field._
   
   
   **### Expected results**
   
   A new source database is added
   
   **### Actual results**
   I get the following error message when clicking on "connect" : 
   _An error occurred while creating database: (configuration_method) Missing data for required field._
   
   **#### Screenshots**
   
   ![Capture](https://user-images.githubusercontent.com/13731871/118964181-850e2980-b967-11eb-818d-73f8a5ace63b.PNG)
   
   ==> See capture
   
   **#### How to reproduce the bug**
   
   1. Go to 'Data/database' menu
   2. Click on '+ Database' button in the upper right corner
   3. Fill the fields  : 
   ==>  'display name' = 'test_db' 
   ==> 'SQLALCHEMY URI*' = 'postgresql://username/mypassword@host:port/my_db_name'
   4. Click on 'TEST CONNECTION' button ==> Connection looks good!
   5. Click on 'CONNECT' ==> error message "An error occurred while creating database: (configuration_method) Missing data for required field"
   
   **#### Environment**
   (please complete the following information):
   
   - superset version: 0.999.0dev
   - python version: 3.7.9
   - node.js version: command not found
   - superset --version
   Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
   Python 3.7.9
   Flask 1.1.2
   Werkzeug 1.0.1
   
   
   ### Checklist
   
   Make sure to follow these steps 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.
   
   ### Additional context
   
   **Dockerfile**
   
   ```
   FROM apache/superset
   
   USER root
   RUN pip install psycopg2-binary
   COPY superset_config.py /app/pythonpath/
   # Initialize the database
   RUN superset db upgrade
   # Create an admin user (you will be prompted to set a username, first and last name before setting a password)
   ENV FLASK_APP=superset
   RUN superset fab create-admin --username admin --password admin --firstname admin --lastname admin --email my.mail@box.fr
   # Load some data to play with
   #RUN superset load_examples : timeout Error 
   # Create default roles and permissions
   RUN superset init
   # To start a development web server on port 8088, use -p to bind to another port
   CMD superset run -h 0.0.0.0 -p 8088 --with-threads --reload --debugger
   ```
   
   **Superset_config.py**
   
   ```
   SQLALCHEMY_DATABASE_URI = 'postgresql://superset:superset@host:port/superset'
   
   # Flask-WTF flag for CSRF
   WTF_CSRF_ENABLED = True
   # Add endpoints that need to be exempt from CSRF protection
   WTF_CSRF_EXEMPT_LIST = []
   # A CSRF token that expires in 1 year
   WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 365
   
   # Set this API key to enable Mapbox visualizations
   MAPBOX_API_KEY = 
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] teatonic closed issue #14735: Connection to postgres database as a source DB refused while working as a metadata DB

Posted by GitBox <gi...@apache.org>.
teatonic closed issue #14735:
URL: https://github.com/apache/superset/issues/14735


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] teatonic commented on issue #14735: Connection to postgres database as a source DB refused while working as a metadata DB

Posted by GitBox <gi...@apache.org>.
teatonic commented on issue #14735:
URL: https://github.com/apache/superset/issues/14735#issuecomment-845248378






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] teatonic edited a comment on issue #14735: Connection to postgres database as a source DB refused while working as a metadata DB

Posted by GitBox <gi...@apache.org>.
teatonic edited a comment on issue #14735:
URL: https://github.com/apache/superset/issues/14735#issuecomment-845248450


   Thank you @xch-jack , it works fine with and older  version  (FROM apache/superset:1.0 in dockerfile) prior to #14451 . 
    


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] xch-jack commented on issue #14735: Connection to postgres database as a source DB refused while working as a metadata DB

Posted by GitBox <gi...@apache.org>.
xch-jack commented on issue #14735:
URL: https://github.com/apache/superset/issues/14735#issuecomment-844994699


   This error was due to the modification of #14451.Restore the #14451 configuration before correcting it.I also encountered this problem, and then corrected the connection to the database according to what I said.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org