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

Internal Server Error #4086

Closed
robinwangrubin opened this issue Aug 20, 2019 · 3 comments
Closed

Internal Server Error #4086

robinwangrubin opened this issue Aug 20, 2019 · 3 comments

Comments

@robinwangrubin
Copy link

Issue Summary

Hello, My Redash has crashed by itself, We didn't do anything. This morning when i try to acess Redash, It shows this Pic:

image

Steps to Reproduce

Here is my docker-swarm stack yml file:

version: '2'
services:
  server:
    image: redash/redash:6.0.0.b8537
    command: server
    depends_on:
      - postgres
    networks:
      - web
      - database
    environment:
      PYTHONUNBUFFERED: 0
      REDASH_HOST: "http://redash.xxx.com"
      REDASH_LOG_LEVEL: "DEBUG"
      REDASH_REDIS_URL: "redis://redis:6379/0"
      REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
      REDASH_COOKIE_SECRET: "xxxxxxxxx"
      REDASH_WEB_WORKERS: 4
    deploy:
      replicas: 1
      labels:
        traefik.docker.network: "web"
        traefik.port: "5000"
        traefik.frontend.rule: "Host:redash.xxxxx.com"
      placement:
        constraints: [node.role==worker]
  worker:
    image: redash/redash:6.0.0.b8537
    command: scheduler
    networks:
      - web
      - database
    environment:
      PYTHONUNBUFFERED: 0
      REDASH_HOST: "http://redash.xxxxx.com"
      REDASH_LOG_LEVEL: "INFO"
      REDASH_REDIS_URL: "redis://redis:6379/0"
      REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
      QUEUES: "queries,scheduled_queries,celery"
      WORKERS_COUNT: 2
    deploy:
      replicas: 1     
      placement:
        constraints: [node.role==worker]  
  postgres:
    image: postgres:9.5.6-alpine
    volumes:
      - postgresql_data:/var/lib/postgresql/data
    networks:
      - database
    deploy:
      replicas: 1     
      placement:
        constraints: [node.hostname==dev-swarm-xxxxxxx-host.com]  

networks:
  web:
    external: true
  database:
    external: true

volumes:
  postgresql_data:

Redash DEBUG Log:

[SQL: 'SELECT organizations.updated_at AS organizations_updated_at, organizations.created_at AS organizations_created_at, organizations.id AS organizations_id, organizations.name AS organizations_name, organizations.slug AS organizations_slug, organizations.settings AS organizations_settings \nFROM organizations \nWHERE organizations.slug = %(slug_1)s \n LIMIT %(param_1)s'] [parameters: {'slug_1': 'default', 'param_1': 1}] (Background on this error at: http://sqlalche.me/e/f405)
[2019-08-20 05:54:28,444][PID:13][ERROR][redash] Exception on /favicon.ico [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 271, in error_router
    return original_handler(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/flask_login/utils.py", line 226, in decorated_view
    elif not current_user.is_authenticated:
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/local.py", line 343, in __getattr__
    return getattr(self._get_current_object(), name)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/local.py", line 302, in _get_current_object
    return self.__local()
  File "/usr/local/lib/python2.7/dist-packages/flask_login/utils.py", line 26, in <lambda>
    current_user = LocalProxy(lambda: _get_user())
  File "/usr/local/lib/python2.7/dist-packages/flask_login/utils.py", line 302, in _get_user
    current_app.login_manager._load_user()
  File "/usr/local/lib/python2.7/dist-packages/flask_login/login_manager.py", line 311, in _load_user
    return self._load_from_cookie(request.cookies[cookie_name])
  File "/usr/local/lib/python2.7/dist-packages/flask_login/login_manager.py", line 350, in _load_from_cookie
    self.reload_user()
  File "/usr/local/lib/python2.7/dist-packages/flask_login/login_manager.py", line 279, in reload_user
    user = self.user_callback(user_id)
  File "/app/redash/authentication/__init__.py", line 44, in load_user
    org = current_org._get_current_object()
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/local.py", line 302, in _get_current_object
    return self.__local()
  File "/app/redash/authentication/org_resolving.py", line 14, in _get_current_org
    g.org = Organization.get_by_slug(slug)
  File "/app/redash/models.py", line 325, in get_by_slug
    return cls.query.filter(cls.slug == slug).first()
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2825, in first
    ret = list(self[0:1])
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2617, in __getitem__
    return list(res)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2925, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2948, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 948, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 507, in do_execute
    cursor.execute(statement, parameters)
ProgrammingError: (psycopg2.ProgrammingError) relation "organizations" does not exist
LINE 2: FROM organizations 
             ^
 [SQL: 'SELECT organizations.updated_at AS organizations_updated_at, organizations.created_at AS organizations_created_at, organizations.id AS organizations_id, organizations.name AS organizations_name, organizations.slug AS organizations_slug, organizations.settings AS organizations_settings \nFROM organizations \nWHERE organizations.slug = %(slug_1)s \n LIMIT %(param_1)s'] [parameters: {'slug_1': 'default', 'param_1': 1}] (Background on this error at: http://sqlalche.me/e/f405)
[2019-08-20 05:54:28,445][PID:13][INFO][metrics] method=GET path=/favicon.ico endpoint=redash_index status=500 content_type=? content_length=-1 duration=3.81 query_count=0 query_duration=0.00
@support
Copy link

support bot commented Aug 20, 2019

👋 @robinwangrubin, we use the issue tracker exclusively for bug reports and planned work. However, this issue appears to be a support request. Please use our forum to get help.

@support support bot closed this as completed Aug 20, 2019
@kravets-levko
Copy link
Collaborator

Hi @robinwangrubin! As mentioned in previous comment, we don't use GitHub for support questions. But seems that your database is empty. This cannot be caused by any of Redash scripts, so check your server configuration and other people that have access to it (it's possible that someone accidentally wiped the data). And use our forum for further discussion (if it will be needed).

@robinwangrubin
Copy link
Author

@kravets-levko Thanks a lot. Sorry i didn't watch the comment carefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants