These are chat archives for getredash/redash

29th
Mar 2016
galdoron
@galdoron
Mar 29 2016 05:40

@arikfr I'm trying to connect redash to impala and i'm getting an error can you please have a look?

[2016-03-29 05:31:57,566: ERROR/MainProcess] Task redash.tasks.execute_query[402f43aa-daaf-4f22-948f-a90a86885666] raised unexpected: AttributeError("'NoneType' object has no attribute 'close'",)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(args, **kwargs)
File "/opt/redash/redash.0.9.2.b1536/redash/tasks.py", line 31, in call
return super(BaseTask, self).call(
args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 437, in protected_call
return self.run(*args,
kwargs)
File "/opt/redash/redash.0.9.2.b1536/redash/tasks.py", line 293, in execute_query
data, error = query_runner.run_query(annotated_query)
File "/opt/redash/redash.0.9.2.b1536/redash/query_runner/impala_ds.py", line 145, in run_query
connection.close()
AttributeError: 'NoneType' object has no attribute 'close'

Arik Fraimovich
@arikfr
Mar 29 2016 06:29

@galdoron based on the stacktrace, it seems there is an exception in the connect call. You can update line 145 in /opt/redash/redash.0.9.2.b1536/redash/query_runner/impala_ds.py to be:

if connection:
    connection.close()

(only call connection.close if there is a connection object)

This will fix the error you had and show you what was the connection problem.
moshe0076
@moshe0076
Mar 29 2016 06:42
Hi,
@arikfr @galdoron
We added the "if connection:" and we get AttributeError: 'NoneType' object has no attribute 'close'
Arik Fraimovich
@arikfr
Mar 29 2016 06:43
can you add full stakc trace?
did you restart celery after adding it?
moshe0076
@moshe0076
Mar 29 2016 07:06
[2016-03-29 07:05:44,573: ERROR/Worker-2] connect() argument after must be a mapping, not ConfigurationContainer
Traceback (most recent call last):
File "/opt/redash/redash.0.9.2.b1536/redash/query_runner/impala_ds.py", line 104, in run_query
connection = connect(
self.configuration)
TypeError: connect() argument after must be a mapping, not ConfigurationContainer
[2016-03-29 07:05:44,591: ERROR/MainProcess] Task redash.tasks.execute_query[0d988226-a254-430d-92bb-db6271f41268] raised unexpected: TypeError('connect() argument after
must be a mapping, not ConfigurationContainer',)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(args, **kwargs)
File "/opt/redash/redash.0.9.2.b1536/redash/tasks.py", line 31, in call
return super(BaseTask, self).call(
args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 437, in protected_call
return self.run(*args,
kwargs)
File "/opt/redash/redash.0.9.2.b1536/redash/tasks.py", line 293, in execute_query
data, error = query_runner.run_query(annotated_query)
File "/opt/redash/redash.0.9.2.b1536/redash/query_runner/impala_ds.py", line 104, in run_query
connection = connect(self.configuration)
TypeError: connect() argument after
must be a mapping, not ConfigurationContainer
Gal said Thanks
And me too
Arik Fraimovich
@arikfr
Mar 29 2016 07:23
@moshe0076 @galdoron change line 104 to connection = connect(**self.configuration.to_dict())
moshe0076
@moshe0076
Mar 29 2016 07:25
How do I make sure that celery is restarted?
Hi,
It solved the problem.
Thanks!
Arik Fraimovich
@arikfr
Mar 29 2016 07:29
great, thanks for reporting! will get it into master as well
getredash/redash#956
moshe0076
@moshe0076
Mar 29 2016 07:38
Great!!!
galdoron
@galdoron
Mar 29 2016 13:56
@arikfr me again :smile: , is there a way to limit users accessing to certain queries/Dashboards ?
Arik Fraimovich
@arikfr
Mar 29 2016 14:15
@galdoron you can limit users using groups. see details here: getredash/redash#724
oratthumzap
@oratthumzap
Mar 29 2016 14:22
hi, i'm trying to send a test email after setting up redash on an AWS EC2 instance, but it keeps on hanging, any idea why?
i only see these warnings in the log: 2016-03-29 14:18:10,209][PID:2365][WARNING][redash.query_runner] MQL query runner enabled but not supported, not registering. Either disable or install missing dependencies.
[2016-03-29 14:18:10,254][PID:2365][WARNING][redash.query_runner] Oracle query runner enabled but not supported, not registering. Either disable or install missing dependencies.
Arik Fraimovich
@arikfr
Mar 29 2016 14:22
@oratthumzap maybe waiting for a timeout from your smtp server?
oratthumzap
@oratthumzap
Mar 29 2016 14:44
thanks. this was indeed the issue, which was caused by EC2 port throttling. switching to port 2587 solved the issue. as stated here: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-issues.html
it's amazing how this port was not stated in their dashboard, but only in their troubleshooting guide :/
Arik Fraimovich
@arikfr
Mar 29 2016 14:45
yeah, Google has similar limitations
galdoron
@galdoron
Mar 29 2016 15:01
@arikfr Thanks again , Working , I' ve created another connection to BQ and gave only one group access to it
Arik Fraimovich
@arikfr
Mar 29 2016 15:14
:+1:
Zack!
@zmaril
Mar 29 2016 15:35
@arikfr how much work would it be to add support for a new sql database (specifically Vertica)? I know some python and am happy to do it myself, just wondering how doable it would be.
Zack!
@zmaril
Mar 29 2016 15:50
oh wait, it already works! great
Arik Fraimovich
@arikfr
Mar 29 2016 17:22
:D
Zack!
@zmaril
Mar 29 2016 17:46
Some vertica instances have many, many tables on them, to the point that it may cause cluster performance issues if you ask Vertica for a list of all the tables. I don't know how configuration quote works yet, but would you be open to a pull request that allows admins/users the ability to return [] when __get_tables is called?
Arik Fraimovich
@arikfr
Mar 29 2016 17:49
@zmaril someone already started this: getredash/redash#937
Zack!
@zmaril
Mar 29 2016 17:50
@arikfr sweet, can I finish it?
Arik Fraimovich
@arikfr
Mar 29 2016 17:50
sure
Zack!
@zmaril
Mar 29 2016 17:50
We need to make sure the query is never even submitted, instead of just not being displayed
Arik Fraimovich
@arikfr
Mar 29 2016 17:51
yep. that's what I suggested there
Zack!
@zmaril
Mar 29 2016 17:51
okay, I'll take a shot at this