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 2018/12/13 10:51:42 UTC

[GitHub] shizidushu opened a new issue #6527: SQL lab keeps show "rendering", no result appears

shizidushu opened a new issue #6527: SQL lab keeps show "rendering", no result appears
URL: https://github.com/apache/incubator-superset/issues/6527
 
 
   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.
   
   
   ### Superset version
   0.29.0rc7
   
   ### Expected results
   keep showing "rendering"
   
   ### Actual results
   In the query history tab, it shows 74 rows.
   
   ### Steps to reproduce
   - Build image from custom Dockerfile. https://github.com/shizidushu/superset/blob/report-issue/Dockerfile (modified from https://github.com/amancevice/superset)
   - Create a network for superset. `docker network create -d overlay --attachable superset-overlay`
   - Pull the image and deploy it with `docker stack deploy -c docker-compose.yml superset`
   
   > docker-compose.yml
   ```yml
   version: '3.7'
   services:
     redis:
       image: redis
       ports:
         - "6379"
       networks:
         - superset-overlay
     postgres:
       image: postgres:10
       environment:
         - POSTGRES_USER=superset
         - POSTGRES_PASSWORD=superset
         - POSTGRES_DB=superset
         - PGDATA=/var/lib/postgresql/data/pgdata
       networks:
         - superset-overlay
       volumes:
         - ../persistent-data/superset/postgres:/var/lib/postgresql/data
     superset:
       image: shizidushu/superset:0.29.0rc7
       depends_on:
         - postgres
         - redis
       ports:
         - target: 8088
           published: 8088
           mode: host
       healthcheck:
         test: ["CMD", "curl", "-f", "http://localhost:8088/health"]
         interval: 30s
         timeout: 15000s
         retries: 1
         start_period: 10s
       networks:
         - superset-overlay
       volumes:
         - ./config/superset_config.py:/etc/superset/superset_config.py
     worker:
       image: shizidushu/superset:0.29.0rc7
       depends_on:
         - postgres
         - redis
       volumes:
         - ./config/superset_config.py:/etc/superset/superset_config.py
       networks:
         - superset-overlay
       command: celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair
   
   networks:
     superset-overlay:
       driver: overlay
       external: true
   ```
   
   > superset_config.py
   
   ```python
   import os
   
   from werkzeug.contrib.cache import RedisCache
   
   
   # MAPBOX_API_KEY = os.getenv('MAPBOX_API_KEY', '')
   
   CACHE_CONFIG = {
       'CACHE_TYPE': 'redis',
       'CACHE_DEFAULT_TIMEOUT': 300,
       'CACHE_KEY_PREFIX': 'superset_',
       'CACHE_REDIS_HOST': 'redis',
       'CACHE_REDIS_PORT': 6379,
       'CACHE_REDIS_DB': 1,
       'CACHE_REDIS_URL': 'redis://redis:6379/1'}
   SQLALCHEMY_DATABASE_URI = \
       'postgresql+psycopg2://superset:superset@postgres:5432/superset'
   SQLALCHEMY_TRACK_MODIFICATIONS = True
   SECRET_KEY = 'thisISaSECRET_1234'
   
   
   class CeleryConfig(object):
       BROKER_URL = 'redis://redis:6379/0'
       CELERY_IMPORTS = ('superset.sql_lab', )
       CELERY_RESULT_BACKEND = 'redis://redis:6379/0'
       CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
   
   
   CELERY_CONFIG = CeleryConfig
   RESULTS_BACKEND = RedisCache(
       host='redis',
       port=6379,
       key_prefix='superset_results'
   )
   
   ```
   
   - run `superset-init` in container (`docker exec -it d7a1f711b205 superset-init`).
   - go the the web browser and run a query `SELECT * FROM ab_permission`
   
   ![rendering](https://github.com/shizidushu/superset/raw/report-issue/rendering.png)
   ![query history](https://github.com/shizidushu/superset/raw/report-issue/query-history.png)
   
   ### Logs
   > docker logs 0eb22be57abb (`superset_superset` container)
   ```
   [2018-12-13 10:36:21 +0000] [1] [INFO] Starting gunicorn 19.8.0
   [2018-12-13 10:36:21 +0000] [1] [INFO] Listening at: http://0.0.0.0:8088 (1)
   [2018-12-13 10:36:21 +0000] [1] [INFO] Using worker: sync
   [2018-12-13 10:36:21 +0000] [8] [INFO] Booting worker with pid: 8
   [2018-12-13 10:36:21 +0000] [9] [INFO] Booting worker with pid: 9
   2018-12-13 10:36:38,368:INFO:root:Database.get_sqla_engine(). Masked URL: postgresql+psycopg2://superset:XXXXXXXXXX@postgres:5432/superset
   2018-12-13 10:37:07,201:INFO:root:Database.get_sqla_engine(). Masked URL: postgresql+psycopg2://superset:XXXXXXXXXX@postgres:5432/superset
   2018-12-13 10:37:11,906:DEBUG:root:[stats_logger] (incr) sql_json
   2018-12-13 10:37:11,910:INFO:root:Parsing with sqlparse statement SELECT * FROM ab_permission
   2018-12-13 10:37:11,951:INFO:root:Parsing with sqlparse statement SELECT * FROM ab_permission
   2018-12-13 10:37:11,964:INFO:root:Triggering query_id: 1
   2018-12-13 10:37:11,995:INFO:root:Parsing with sqlparse statement SELECT * FROM ab_permission
   2018-12-13 10:37:11,996:INFO:root:Parsing with sqlparse statement SELECT * FROM ab_permission
   2018-12-13 10:37:12,003:INFO:root:Set query to 'running'
   2018-12-13 10:37:12,009:INFO:root:Database.get_sqla_engine(). Masked URL: postgresql+psycopg2://superset:XXXXXXXXXX@postgres:5432/superset
   2018-12-13 10:37:12,019:INFO:root:Running query: 
   SELECT * FROM ab_permission LIMIT 1000
   2018-12-13 10:37:12,019:INFO:root:SELECT * FROM ab_permission LIMIT 1000
   2018-12-13 10:37:12,020:INFO:root:Handling cursor
   2018-12-13 10:37:12,023:INFO:root:Fetching data: {'changedOn': datetime.datetime(2018, 12, 13, 10, 37, 11, 998982), 'changed_on': '2018-12-13T10:37:11.998982', 'dbId': 1, 'db': 'main', 'endDttm': None, 'errorMessage': None, 'executedSql': 'SELECT * FROM ab_permission LIMIT 1000', 'id': 'Jown1TcLh', 'limit': 1000, 'progress': 0, 'rows': None, 'schema': 'null', 'ctas': False, 'serverId': 1, 'sql': 'SELECT * FROM ab_permission', 'sqlEditorId': 'teid-4ase', 'startDttm': Decimal('1544697431952.956000'), 'state': 'running', 'tab': 'Untitled Query', 'tempTable': '', 'userId': 1, 'user': 'admin user', 'limit_reached': False, 'resultsKey': None, 'trackingUrl': None}
   2018-12-13 10:37:12,023:DEBUG:root:[stats_logger] (timing) sqllab.query.time_executing_query | 3.3427734375 
   2018-12-13 10:37:12,023:DEBUG:root:[stats_logger] (timing) sqllab.query.time_fetching_results | 0.1298828125 
   2018-12-13 10:37:12,023:INFO:root:Fetching cursor description
   ```
   
   > docker logs of `superset_worker` is empty
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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