These are chat archives for getredash/redash

24th
May 2016
Neil Shah
@shahneil88
May 24 2016 01:26
@Orange19810_twitter - What you can try is
1) Create a new data source. Let us call it "new_data"
2) Create a new group. Let us call it as "readonly" group
3) In that group, add our datasource called "new_data". Change permission to readonly permission
4) Assign the user to "readonly" group.
5) Make sure your all widgets/tables in the dashboard belong to "new_data" data source.
6) You might want to remove this user from other groups.
Mango Baaz
@Orange19810_twitter
May 24 2016 01:37
@shahneil88 , I tried that. Let me explain exactly what i am looking for and maybe you can guide me. So i have one data source which has multiple tables. I can create different queries specific to each of my users and form dashboards but it seems from teh same data source each user will be able to view each others reports. So somehow i need to create a separate data source for each user or give them access to their own query or dashboard only
I was thinking maybe i could create a new data source from a current redash query
Neil Shah
@shahneil88
May 24 2016 01:44
@Orange19810_twitter - Actually, thats what I did. I have Redshift data source. I created same data source twice - "all" and "readonly_data". "all" data source, I kept for me (with all permissions) and "readonly_data" for "readonly" users. Whenever I create dashboards , I use "readonly_data"
If you need "access permission" at table level, then I am really not sure, how we can achieve that.
davidjhall
@davidjhall
May 24 2016 01:55
Help! Looks like my queries aren't running on the server -- when I try to perform the supervisor restarts, I get :
Error: .ini file does not include supervisorctl section
For help, use /usr/local/bin/supervisorctl -h
Mango Baaz
@Orange19810_twitter
May 24 2016 02:54
@shahneil88 , hmm that might work for now. Thanks. Let me know if you figure out if we can convert a re:dash query into a new data source
Arik Fraimovich
@arikfr
May 24 2016 07:15
@Orange19810_twitter I don't see how creating a data source from a query is better than creating separate data source for each user? If you give the users read only permission, then they will be able to see only the queries you created for them, and won't be able to run other queries even though it's the same DB.
@davidjhall can you share more details about your setup? how did you install redash?
Kiran
@kiraninbng
May 24 2016 10:01
Hi All, does "All Queries" return all the queries, I have logged in as admin and trying to check for scheduled queries by users but the result does not seem to have those
Arik Fraimovich
@arikfr
May 24 2016 10:02
@kiraninbng "All Queries" shows all named queries. Queries that have no name (named "New Query") are considered drafts and show up only to their owners.
Kiran
@kiraninbng
May 24 2016 10:05
thanks, is there a way to disable refresh of no name queries through admin console?
Arik Fraimovich
@arikfr
May 24 2016 10:06
yes - go to /admin/query
Kiran
@kiraninbng
May 24 2016 10:10
works
jcborras
@jcborras
May 24 2016 11:33

Flask-Mail is not logging. I've modified redash/init.py in my test dev env with the following lines app.config.update(
DEBUG=True,
TESTING = False,
MAIL_DEBUG = True,
MAIL_SUPRESS_SEND = False,
)
mail.init_app(app)

...

plus some Handlers added so that I redirect it under /var/log mail.init_app(app) but I can't see any logging statements from Flask-Mail....

Arik Fraimovich
@arikfr
May 24 2016 11:34
what logs are you looking for?
usually when it fails you can find it in the celery log (/opt/redash/logs/celery_error.log)
jcborras
@jcborras
May 24 2016 11:35
One can find it there indeed.... Thanks!
Arik Fraimovich
@arikfr
May 24 2016 11:35
:+1:
jcborras
@jcborras
May 24 2016 11:36
@arikfr What time zone are you based?
Arik Fraimovich
@arikfr
May 24 2016 11:40
@jcborras UTC+3.
davidjhall
@davidjhall
May 24 2016 13:22
@arikfr Hi Arik - I followed the install docs on the site for the AWS instance install and have been upgrading
The only thing I remember doing that was suspicious was I added a data set ( my client's) and there were 2 so I deleted the other one -- I don't know if that was an internal database and how to rebuild/restore it --- other than that, nothing at the OS level was different than the wiki install
Arik Fraimovich
@arikfr
May 24 2016 13:31
@davidjhall when you run supervisord --version, what do you get?
davidjhall
@davidjhall
May 24 2016 13:32
3.1.2
Arik Fraimovich
@arikfr
May 24 2016 13:33
and do you get the same error message if you just run supervisorctl status??
davidjhall
@davidjhall
May 24 2016 13:41
Hmm -- I just got "refused connection" -- don't know why/how it died --- so I /etc/init.d/redash-server start
And I get:
redash_celery RUNNING pid 11413, uptime 0:00:02
redash_celery_scheduled RUNNING pid 11415, uptime 0:00:02
redash_server RUNNING pid 11414, uptime 0:00:02
but server line keeps restarting
redash_celery RUNNING pid 11413, uptime 0:00:32
redash_celery_scheduled RUNNING pid 11415, uptime 0:00:32
redash_server STARTING
over and over
Arik Fraimovich
@arikfr
May 24 2016 13:42

you did /etc/init.d/redash-server start or /etc/init.d/redash_supervisord start?

as for why it restarts, check /opt/redash/logs/api_error.log.

davidjhall
@davidjhall
May 24 2016 13:42
I did start this time
Logs said there was already an instance running -- so I've killed all redash server/celery instances and did a redash-server start
now server is stable
Arik Fraimovich
@arikfr
May 24 2016 13:46
good , can you try and see if supervisorctl works now?
davidjhall
@davidjhall
May 24 2016 13:48
yes - supervisorctl looks like it works now

sudo supervisorctl restart redash_celery

redash_celery: stopped
redash_celery: started

same for doing redash_server
Thank you @arikfr - I'll check later to see if the queries reload but you have pointed me where to look/status check/ etc.
Arik Fraimovich
@arikfr
May 24 2016 13:49
ok, not sure what went wrong, but glad it's working now.
davidjhall
@davidjhall
May 24 2016 14:01
just checked and it died : sudo supervisorctl restart redash_server
http://localhost:9001 refused connection
Arik Fraimovich
@arikfr
May 24 2016 14:02
check the log (/opt/redash/logs/supervisord.log)
jcborras
@jcborras
May 24 2016 14:06
Could someone tell me if MAIL_USE_SSL is actually in use? It seems I get to set it but:
app.logger.debug(app.extensions['mail'].use_ssl)
just before the end of createap redash/_init.py tells me otherwise....
Arik Fraimovich
@arikfr
May 24 2016 14:07
we pass all the settings to flask-mail. check their code to see if it's used
jcborras
@jcborras
May 24 2016 14:08
It does because I have a demo for doing precisely so...
Arik Fraimovich
@arikfr
May 24 2016 14:09
where you log the vlaue of app.extensions['mail'].use_ssl, did you try logging settings.MAIL_USE_SSL as well?
jcborras
@jcborras
May 24 2016 14:10
app.logger.debug(app.extensions['mail'].use_ssl)
return app
let me dig
jcborras
@jcborras
May 24 2016 14:19
yup, it seems a Flask-Mail issue...
jcborras
@jcborras
May 24 2016 14:25
nope it doesn't...
davidjhall
@davidjhall
May 24 2016 14:56
@arikfr : looked at logs . There's a few : [WARNING][redash.query_runner] Microsoft SQL Server query runner enabled but not supported, not registering. Either disable or install missing dependencies.
Then INFO Metrics
[INFO][metrics] method=POST path=/api/events endpoint=events status=500 content_type=? content_length=-1 duration=259.27 query_count=33 query_duration=20.70
Then a signal term
[2016-05-24 13:47:35 +0000] [13526] [INFO] Handling signal: term
[2016-05-24 13:47:35 +0000] [13558] [INFO] Worker exiting (pid: 13558)
[2016-05-24 13:47:35 +0000] [13549] [INFO] Worker exiting (pid: 13549)
[2016-05-24 13:47:35 +0000] [13550] [INFO] Worker exiting (pid: 13550)
[2016-05-24 13:47:35 +0000] [13551] [INFO] Worker exiting (pid: 13551)
[2016-05-24 13:47:35 +0000] [13526] [INFO] Shutting down: Master
[2016-05-24 13:47:36 +0000] [13693] [INFO] Starting gunicorn 19.4.5
[2016-05-24 13:47:36 +0000] [13693] [INFO] Listening at: http://127.0.0.1:5000 (13693)
Last line after not coming back was the microsoft one:
[2016-05-24 13:47:37,355][PID:13709][WARNING][redash.query_runner] Microsoft SQL Server query runner enabled but not supported, not registering. Either disable or install missing dependencies.
Arik Fraimovich
@arikfr
May 24 2016 15:01
the microsoft one is a warning that you can ignore
davidjhall
@davidjhall
May 24 2016 15:02
Sorry - wrong logs :
In the supervisor logs, I'm guessing low memory
2016-05-24 13:42:42,845 INFO success: redash_server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-05-24 13:42:49,911 INFO exited: redash_server (exit status 1; not expected)
2016-05-24 13:42:51,232 INFO spawnerr: unknown error: ENOMEM
2016-05-24 13:44:43,073 INFO RPC interface 'supervisor' initialized
2016-05-24 13:44:43,073 CRIT Server 'inet_http_server' running without any HTTP authentication checking
2016-05-24 13:44:43,075 INFO daemonizing the supervisord process
2016-05-24 13:44:43,075 INFO set current directory: '/opt/redash/current'
2016-05-24 13:44:43,075 INFO supervisord started with pid 13524
2016-05-24 13:44:44,077 INFO spawned: 'redash_celery' with pid 13525
2016-05-24 13:44:44,078 INFO spawned: 'redash_server' with pid 13526
2016-05-24 13:44:44,079 INFO spawned: 'redash_celery_scheduled' with pid 13527
2016-05-24 13:44:45,593 INFO success: redash_celery entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-05-24 13:44:45,593 INFO success: redash_server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-05-24 13:44:45,593 INFO success: redash_celery_scheduled entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-05-24 13:47:04,962 INFO stopped: redash_celery (exit status 0)
2016-05-24 13:47:05,966 INFO spawned: 'redash_celery' with pid 13671
2016-05-24 13:47:07,845 INFO success: redash_celery entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-05-24 13:47:35,288 INFO stopped: redash_server (exit status 0)
2016-05-24 13:47:36,295 INFO spawned: 'redash_server' with pid 13693
2016-05-24 13:47:37,348 INFO success: redash_server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-05-24 13:53:59,471 INFO exited: redash_celery (exit status 0; expected)
2016-05-24 13:54:00,476 INFO spawned: 'redash_celery' with pid 13753
2016-05-24 13:54:01,477 INFO success: redash_celery entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-05-24 13:56:56,488 INFO exited: redash_celery (terminated by SIGSEGV; not expected)
2016-05-24 13:56:58,769 INFO spawnerr: unknown error: ENOMEM
I used a t2.micro per the docs but I'm guessing that's too small? I wonder if it's because some of the queries are large datasets.
Arik Fraimovich
@arikfr
May 24 2016 15:06
that's definitely possible. current implementation isn't optimized for conservative memory usage (because most datasets are small)
Andrew Stewart
@astewart-twist
May 24 2016 22:05
Thanks @arikfr. Unfortunately that’s not an option (sharing the doc outside of the google app domain). Will have to find another way.