Cassandra query runner not working in docker
See original GitHub issueI’ve added
REDASH_ADDITIONAL_QUERY_RUNNERS: "redash.query_runner.cass"
to my docker-compose.yml and cassandra appears as a valid type of data source in the UI, testing the connection succeeds, and the query editor can see my schema. However, when I go to actually execute a query, the query (any query) fails with:
`
worker_1 | [2017-11-08 23:39:12,363][PID:1][ERROR][MainProcess] Task redash.tasks.execute_query[d26f4030-53e2-4556-8ff5-95c74912c2bb] raised unexpected: AttributeError(“‘NoneType’ object has no attribute ‘annotate_query’”,)
worker_1 | Traceback (most recent call last):
worker_1 | File “/usr/local/lib/python2.7/dist-packages/celery/app/trace.py”, line 240, in trace_task worker_1 | R = retval = fun(*args, **kwargs) worker_1 | File “/app/redash/worker.py”, line 71, in call worker_1 | return TaskBase.call(self, *args, **kwargs) worker_1 | File “/usr/local/lib/python2.7/dist-packages/celery/app/trace.py”, line 438, in protected_call worker_1 | return self.run(*args, **kwargs) worker_1 | File “/app/redash/tasks/queries.py”, line 522, in execute_query worker_1 | scheduled_query).run() worker_1 | File “/app/redash/tasks/queries.py”, line 444, in run worker_1 | annotated_query = self._annotate_query(query_runner) worker_1 | File “/app/redash/tasks/queries.py”, line 485, in _annotate_query worker_1 | if query_runner.annotate_query(): worker_1 | AttributeError: ‘NoneType’ object has no attribute ‘annotate_query’ `
is there any additional configuration needed besides
REDASH_ADDITIONAL_QUERY_RUNNERS: "redash.query_runner.cass"
to make cassandra work properly?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
@RichardLitt Sorry for the confusion, I was solving my own question below the divider. I will edit it to make it more obvious.
I have some problem too with Cassandra Driver in the docker redash version. I added the env REDASH_ADDITIONAL_QUERY_RUNNERS: “redash.query_runner.cass” and I can see it inside the containers but I am unable to connect to Cassandra from Redash. Any ideas?
[2019-04-02 14:40:28,186][PID:12][INFO][metrics] method=POST path=/api/data_sources/1 endpoint=data_source status=200 content_type=application/json content_length=290 duration=13.77 query_count=6 query_duration=6.28 [2019-04-02 14:40:29,597][PID:11][WARNING][cassandra.cluster] [control connection] Error connecting to 192.168.186.125: Traceback (most recent call last): File “cassandra/cluster.py”, line 2666, in cassandra.cluster.ControlConnection._reconnect_internal (cassandra/cluster.c:52861) return self._try_connect(host) File “cassandra/cluster.py”, line 2688, in cassandra.cluster.ControlConnection._try_connect (cassandra/cluster.c:53414) connection = self._cluster.connection_factory(host.address, is_control_connection=True) File “cassandra/cluster.py”, line 1119, in cassandra.cluster.Cluster.connection_factory (cassandra/cluster.c:16094) return self.connection_class.factory(address, self.connect_timeout, *args, **kwargs) File “cassandra/connection.py”, line 330, in cassandra.connection.Connection.factory (cassandra/connection.c:5963) conn = cls(host, *args, **kwargs) File “/usr/local/lib/python2.7/dist-packages/cassandra/io/asyncorereactor.py”, line 307, in init self._connect_socket() File “cassandra/connection.py”, line 369, in cassandra.connection.Connection._connect_socket (cassandra/connection.c:7477) raise socket.error(sockerr.errno, “Tried connecting to %s. Last error: %s” % ([a[4] for a in addresses], sockerr.strerror or sockerr)) error: [Errno 111] Tried connecting to [(‘192.168.186.125’, 0)]. Last error: Connection refused [2019-04-02 14:40:29,599][PID:11][ERROR][cassandra.cluster] Control connection failed to connect, shutting down Cluster: Traceback (most recent call last): File “cassandra/cluster.py”, line 1180, in cassandra.cluster.Cluster.connect (cassandra/cluster.c:18405) self.control_connection.connect() File “cassandra/cluster.py”, line 2640, in cassandra.cluster.ControlConnection.connect (cassandra/cluster.c:52211) self._set_new_connection(self._reconnect_internal()) File “cassandra/cluster.py”, line 2677, in cassandra.cluster.ControlConnection._reconnect_internal (cassandra/cluster.c:53182) raise NoHostAvailable(“Unable to connect to any servers”, errors) NoHostAvailable: (‘Unable to connect to any servers’, {‘192.168.186.125’: error(111, “Tried connecting to [(‘192.168.186.125’, 0)]. Last error: Connection refused”)}) [2019-04-02 14:40:29,600][PID:11][INFO][metrics] method=POST path=/api/data_sources/1/test endpoint=datasourcetestresource status=200 content_type=application/json content_length=179 duration=12.16 query_count=4 query_duration=4.32