question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cassandra query runner not working in docker

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dermatoucommented, Mar 7, 2018

@RichardLitt Sorry for the confusion, I was solving my own question below the divider. I will edit it to make it more obvious.

0reactions
at9169commented, Apr 2, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot connect to cassandra docker with cqlsh - Stack Overflow
The problem was particular resolved. I install new cqlsh from cassandra source and have connection docker container, but don't have connection from PHP...
Read more >
Problems connecting to Cassandra using Docker
Hi! I am sure the problem is due to my inexperience with Docker and Cassandra, and even more so networking between multiple Docker...
Read more >
How to monitor cql queries on cassandra docker containers ...
I tried by enabling cql and java cql driver but no queries shows up. I have installed dynatrace one agent in my local...
Read more >
Five Minute Guide: Getting Started with Cassandra on Docker
We will execute the docker run command to create new containers from pulled images. ... Select the “Working with CQL” notebook.
Read more >
Setting up Cassandra with Docker | 2much2learn.com
Using docker · logs -f cassandra cassandra · :23:34.21 Welcome to the Bitnami cassandra container cassandra · :23:34.21 Submit issues and feature ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found