These are chat archives for getredash/redash

8th
Jun 2016
Wesley
@WesleyBatista
Jun 08 2016 02:20
hey guys!
quick question: where can I find the redash api logs when using docker?
I am having trouble when sharing dashboards and I want to see what is going on.
by the way, have you guys got internal error when requesting URLs like "/public/dashboards/F9YNKKapcrnAdj2AIdIP7Ycso29K61yMt8yHCptLD?org_slug=default" ?
Arik Fraimovich
@arikfr
Jun 08 2016 04:12
@WesleyBatista when using our Docker image the logs are written to stdout and if you're using plain docker should be available with the "docker logs" command. If you have some other docker orchestration solution then you need to check how it outputs logs.
moshe0076
@moshe0076
Jun 08 2016 04:56
@arikfr Hi Arik,
Following @galdoron the error we have is:
[2016-06-08 04:55:27,918][PID:1738][ERROR][redash] Exception on /api/data_sources [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python2.7/dist-packages/flaskrestful/_init.py", line 477, in wrapper
resp = resource(args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask_login.py", line 792, in decorated_view
return func(
args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask/views.py", line 84, in view
return self.dispatch_request(*args,
kwargs)
File "/opt/redash/redash.0.10.1.b1834/redash/handlers/base.py", line 25, in dispatch_request
return super(BaseResource, self).dispatch_request(args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flaskrestful/_init.py", line 587, in dispatch_request
resp = meth(
args, kwargs)
File "/opt/redash/redash.0.10.1.b1834/redash/permissions.py", line 40, in decorated
return fn(*args,
kwargs)
File "/opt/redash/redash.0.10.1.b1834/redash/handlers/data_sources.py", line 66, in get
d = ds.to_dict()
File "/opt/redash/redash.0.10.1.b1834/redash/models.py", line 364, in to_dict
'syntax': self.query_runner.syntax
AttributeError: 'NoneType' object has no attribute 'syntax'
Arik Fraimovich
@arikfr
Jun 08 2016 05:13
@moshe0076 @galdoron you have a data source whose query runner is not enabled. I remember you were using one of the query runners, which are not enabled by default. When enabling them - did you use .env for that or just edited settings.py? If it's the later, then you need to use .env for the setting to persist between upgrades...
moshe0076
@moshe0076
Jun 08 2016 06:05
@arikfr I don't think we edit any one of them.
We use bigquery and Impala. the settings on our current settings.py are:
default_query_runners = [
'redash.query_runner.big_query',
'redash.query_runner.google_spreadsheets',
'redash.query_runner.graphite',
'redash.query_runner.mongodb',
'redash.query_runner.mysql',
'redash.query_runner.pg',
'redash.query_runner.url',
'redash.query_runner.influx_db',
'redash.query_runner.elasticsearch',
'redash.query_runner.presto',
'redash.query_runner.hive_ds',
'redash.query_runner.impala_ds',
'redash.query_runner.vertica',
'redash.query_runner.treasuredata',
'redash.query_runner.sqlite',
'redash.query_runner.dynamodb_sql',
'redash.query_runner.mssql',
]
Any idea?
Thanks!
Arik Fraimovich
@arikfr
Jun 08 2016 06:06
in .env do you have any settings that have "QUERY_RUNNER" in them?
moshe0076
@moshe0076
Jun 08 2016 06:08
export REDASH_STATIC_ASSETS_PATH="../rd_ui/dist/"
export REDASH_LOG_LEVEL="INFO"
export REDASH_REDIS_URL=redis://localhost:6379/0
export REDASH_DATABASE_URL="postgresql://redash"
export REDASH_COOKIE_SECRET=Hashed by me
export REDASH_GOOGLE_APPS_DOMAIN=
export REDASH_MAIL_DEFAULT_SENDER=DELETED by me
export REDASH_HOST=DELETED by me
Ivan Brotkin
@biakaveron
Jun 08 2016 06:09
bin/run ./manage.py check_settings
Arik Fraimovich
@arikfr
Jun 08 2016 06:10
@moshe0076 I just noticed that Impala is in the default ones. Next thing - when running bin/run ./manage.py do you see messages like "Impala query runner enabled but not supported"?
moshe0076
@moshe0076
Jun 08 2016 06:10
What to look for?
[2016-06-08 06:10:36,746][PID:27241][WARNING][redash.query_runner] BigQuery query runner enabled but not supported, not registering. Either disable or install missing dependencies.
[2016-06-08 06:10:36,746][PID:27241][WARNING][redash.query_runner] BigQueryGCE query runner enabled but not supported, not registering. Either disable or install missing dependencies.
[2016-06-08 06:10:36,751][PID:27241][WARNING][redash.query_runner] GoogleSpreadsheet query runner enabled but not supported, not registering. Either disable or install missing dependencies.
[2016-06-08 06:10:36,804][PID:27241][WARNING][redash.query_runner] Microsoft SQL Server query runner enabled but not supported, not registering. Either disable or install missing dependencies.
Arik Fraimovich
@arikfr
Jun 08 2016 06:11
@moshe0076 surprisingly BigQuery is missing dependencies. is it the same machine as before or a new one?
moshe0076
@moshe0076
Jun 08 2016 06:11
The same
Arik Fraimovich
@arikfr
Jun 08 2016 06:11
:\ strange
moshe0076
@moshe0076
Jun 08 2016 06:11
:-)
Arik Fraimovich
@arikfr
Jun 08 2016 06:12
try running in a python console the following:
    import apiclient.errors
    from apiclient.discovery import build
    from apiclient.errors import HttpError
    from oauth2client.client import SignedJwtAssertionCredentials
    from oauth2client import gce
and see which one throws an error (if it is throwing)
moshe0076
@moshe0076
Jun 08 2016 06:13
from oauth2client.client import SignedJwtAssertionCredentials
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name SignedJwtAssertionCredentials
Arik Fraimovich
@arikfr
Jun 08 2016 06:14
@moshe0076 if you run pip freeze do you see oauthclient?
(oauth2client)
moshe0076
@moshe0076
Jun 08 2016 06:17
no
Arik Fraimovich
@arikfr
Jun 08 2016 06:17
sudo pip install -r oauth2client==1.2
oops
without -r
sudo pip install oauth2client==1.2
moshe0076
@moshe0076
Jun 08 2016 06:25
done.
now from oauth2client.client import SignedJwtAssertionCredentials is working now.
And it solved the problem!
Gal and I thank you!
Arik Fraimovich
@arikfr
Jun 08 2016 06:25
:) happy to help. I wonder how it disappeared :\
moshe0076
@moshe0076
Jun 08 2016 06:27
I don't know. We did not do any changes except the upgrade (0.10.1+b1836
) to fix the bug.
Arik Fraimovich
@arikfr
Jun 08 2016 06:27
that's what worries me :)
moshe0076
@moshe0076
Jun 08 2016 06:28
:-)