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 2019/12/30 18:47:48 UTC

[GitHub] [incubator-superset] henry145145 opened a new issue #8903: Cannot login when server is starting by systemd service

henry145145 opened a new issue #8903: Cannot login when server is starting by systemd service
URL: https://github.com/apache/incubator-superset/issues/8903
 
 
   Hi, 
   I am currently trying to install superset inside an AWS EC2 instance
   
   My superset version is 0.35.1, python is 3.7.4
   I made three changes inside `/usr/local/lib/python3.7/site-packages/superset/config.py`
   - add mapbox key
   - enable proxy fix = true
   - enable redis cache
   
   After I install superset, I ran the following command:
   ```
   superset db upgrade
   export FLASK_APP=superset
   flask fab create-admin
   superset init
   superset run -h 0.0.0.0 -p 8080 --reload --debugger
   ```
   
   After that, I was able to login to superset using the admin account I created through `flask fab create-admin`
   
   Then,  I am trying to set up auto restart and here is my superset.service
   ```
   [Unit]
   Description=Superset service
   After=network.target
   
   [Service]
   Restart=always
   Type=simple
   ExecStart=/usr/local/bin/superset run -h 0.0.0.0 -p 8080 --reload --debugger
   
   [Install]
   WantedBy=multi-user.target
   ```
   I ran `sudo service superset start` and `sudo service superset status` and things look ok
   ```
   ● superset.service - Superset service
      Loaded: loaded (/etc/systemd/system/superset.service; disabled; vendor preset: disabled)
      Active: active (running) since Mon 2019-12-30 18:22:04 UTC; 5min ago
    Main PID: 15224 (superset)
      CGroup: /system.slice/superset.service
              ├─15224 /usr/bin/python3 /usr/local/bin/superset run -h 0.0.0.0 -p 8080 --reload --debugger
              └─15232 /usr/bin/python3 /usr/local/bin/superset run -h 0.0.0.0 -p 8080 --reload --debugger
   ```
   
   I was able to go to the superset login page, however, I was not able to login using the admin account above (it return "Invalid login. Please try again."). 
   
   Then, I stop the serivce and manually run `superset run -h 0.0.0.0 -p 8080 --reload --debugger` and I was able to login again.
   
   My guess is that when the server is starting by systemd, it is not recognizing `/home/ec2-user/.superset/superset.db`. If that is the case, then how do I point it to the correct db?
   
   
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] charlesoblack commented on issue #8903: Cannot login when server is starting by systemd service

Posted by GitBox <gi...@apache.org>.
charlesoblack commented on issue #8903: Cannot login when server is starting by systemd service
URL: https://github.com/apache/incubator-superset/issues/8903#issuecomment-571004804
 
 
   I think you can set it to run as a user (as opposed to root) by setting
   
   ```
   User=ec2-user
   ```
   
   in your systemd service. Otherwise, I assume it looks for the `superset.db` in `/.superset/`, not in `/home/ec2-user/.superset`.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] issue-label-bot[bot] commented on issue #8903: Cannot login when server is starting by systemd service

Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #8903: Cannot login when server is starting by systemd service
URL: https://github.com/apache/incubator-superset/issues/8903#issuecomment-569761718
 
 
   Issue Label Bot is not confident enough to auto-label this issue. See [dashboard](https://mlbot.net/data/apache/incubator-superset) for more details.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] henry145145 commented on issue #8903: Cannot login when server is starting by systemd service

Posted by GitBox <gi...@apache.org>.
henry145145 commented on issue #8903: Cannot login when server is starting by systemd service
URL: https://github.com/apache/incubator-superset/issues/8903#issuecomment-571244135
 
 
   > I think you can set it to run as a user (as opposed to root) by setting
   > 
   > ```
   > User=ec2-user
   > ```
   > 
   > in your systemd service. Otherwise, I assume it looks for the `superset.db` in `/.superset/`, not in `/home/ec2-user/.superset`.
   
   @charlesoblack Thank you so much! It works!
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] henry145145 closed issue #8903: Cannot login when server is starting by systemd service

Posted by GitBox <gi...@apache.org>.
henry145145 closed issue #8903: Cannot login when server is starting by systemd service
URL: https://github.com/apache/incubator-superset/issues/8903
 
 
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] jjgong7 commented on issue #8903: Cannot login when server is starting by systemd service

Posted by GitBox <gi...@apache.org>.
jjgong7 commented on issue #8903:
URL: https://github.com/apache/incubator-superset/issues/8903#issuecomment-663938812


   For anyone else with a similar issue and is running it on virtualenv with gunicorn: 
   You need to set your working directory and environment path. See instructions [here](https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-16-04) for more details.
   
   ```
   [Unit]
   Description=Gunicorn instance to serve myproject
   After=network.target
   
   [Service]
   User=ubuntu
   WorkingDirectory=/home/ubuntu/venv
   Environment="PATH=/home/ubuntu/venv/bin"
   ExecStart=/home/ubuntu/venv/bin/gunicorn -c /home/ubuntu/venv/gunicorn_config.py "superset.app:create_app()"
   
   [Install]
   WantedBy=multi-user.target
   ```


----------------------------------------------------------------
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