(This message has been automatically imported from the retired mailing list)
I was wondering if somebody could help me troubleshoot running the Cassandra
example from the documentation or not?
I’m getting an error trying to connect to the ‘cassy’ Cassandra connection
using the code from the documentation.
I can reach the database from my windows box using port 49154 in this case.
It’s running on Ubuntu server as a Docker container on the same box as zato
Here is the code from the docs that is deployed as a service (not sure why
the semicolon is missing from the query or if it should be there or not.):
test1.test-service Yes test1.TestService No
from zato.server.service import Service
def handle(self): # Obtains a connection the named pool conn = self.cassandra_conn['cassy'].conn # Executes an ad-hoc query and obtains result result = conn.execute('SELECT * FROM schema_columns') # Let's find out what we have here.. for row in result: self.logger.info(row)
Invoking and getting error:
zato@32bf993b7dc6:~/env/qs-1/server1/pickup-dir$ zato service invoke
Traceback (most recent call last):
", line 198, in dispatch
payload, worker_store, self.simple_io_config, post_data)
", line 351, in handle
line 423, in update_handle
KeyError: u’No such connection
Here’s the connection ‘cassy’ that I see.
How it looks in the admin ui. The port is the mapped docker port to the
docker container running Datastax.
Name Active Contact points Port cassy Yes localhost
49154 Change password Edit Delete
I changed the password to empty. I don’t know how that’s used anyway.