(This message has been automatically imported from the retired mailing list)
Hi,
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
docker.
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
class TestService(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
/opt/zato/env/qs-1/server1 test1.test-service
Traceback (most recent call last):
File
"/opt/zato/2.0.2/zato-server/src/zato/server/connection/http_soap/channel.py
", line 198, in dispatch
payload, worker_store, self.simple_io_config, post_data)
File
"/opt/zato/2.0.2/zato-server/src/zato/server/connection/http_soap/channel.py
", line 351, in handle
params_priority=channel_item.params_pri)
File “/opt/zato/2.0.2/zato-server/src/zato/server/service/init.py”,
line 423, in update_handle
raise e
KeyError: u’No such connection cassy
in []
’
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.
Thanks!