Question
JCS Lanit - BPM
RU
Last activity: 27 Sep 2016 9:51 EDT
How can I connect to DNode's Cassandra DB?
Hi,
I have a data set of type 'Decision Data Store':
And a data flow which writes data to this data set:
I've enabled external connections to my DNode:
But when I try to connect to DNode's Cassandra DB I'm getting an error:
Hi,
I have a data set of type 'Decision Data Store':
And a data flow which writes data to this data set:
I've enabled external connections to my DNode:
But when I try to connect to DNode's Cassandra DB I'm getting an error:
MacBook-Pro-Alexander-Lutay:bin lutalex$ ./cqlsh -u=dnode_ext -p=dnode_ext --cqlversion=3.0.5 XX.XX.XX.XX
Connection error: ('Unable to connect to any servers', {'XX.XX.XX.XX': TypeError("'NoneType' object is not iterable",)})
I guess, that this is due to keyspace is not specified in connection details, but I don't know which keyspace should be specified.
Does anybody knows which connection parameters should I specify to connect to DNode's Cassandra DB?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 24 May 2016 7:22 EDT
JCS Lanit - BPM
RU
I've finally found the solution:
- To connect to DNode's Cassandra DB using cqlsh one should use Cassandra distribution package 1.2.9 (relevant for Pega 7.2).
MacBook-Pro-Alexander-Lutay:bin lutalex$ ./cqlsh -u dnode_ext -p dnode_ext xxx-xxx.bpm.lanit
Connected to prpc at xxx-xxx.bpm.lanit:9160.
[cqlsh 3.1.7 | Cassandra 1.2.18 | CQL spec 3.0.0 | Thrift protocol 19.36.2]
Use HELP for help.
cqlsh>
Pegasystems Inc.
AU
Hello Alex,
The keystore details are stored in the .yaml file of the Dnode running remotely and I don't think we need to configure that to connect to external dnodes. Data-Admin-DNode-Keyspace introduced to control replication factor, compression and other important keyspace attributes.
Enabling External Connections:
- Go to landing page: Decisicioning -> Infrastructure -> Dnode Cluster Management
- Check 'Enable external Connection' option
- Set password to user "dnode_ext"
- Save your changes
In the tool of choice, use one of the ip addresses of a node listed as 'ONLINE-NORMAL' in the DNodes tab and use port 9160.
Updated: 25 May 2016 3:04 EDT
JCS Lanit - BPM
RU
Hello Basavaraj,
I've tried to specify port explicitly as you mentioned (all other steps I've come through are exactly the same as you listed). Now I'am getting another error:
MacBook-Pro-Alexander-Lutay:bin lutalex$ ./cqlsh -u=dnode_ext -p=dnode_ext --cqlversion=3.0.5 XX.XX.XX.XX 9160
Connection error: ('Unable to connect to any servers', {'XX.XX.XX.XX': ConnectionShutdown('Connection <AsyncoreConnection(4427636688)XX.XX.XX.XX:9160 (closed)> is already closed',)})
Do you have any ideas what is the reason?
When I use cqlsh to connect to locally launched Cassandra everything works fine.
Pegasystems Inc.
AU
Hello Alex,
looking at the error it seems to be a generic error preventing cqls to Cassandra, I believe it could be due to some corrupt config files in your .Cassandra directory that is preventing cqlsh. Can you try removing those from your .Cassandra directory(rm -Rf ~/.cassandra) and run the cqlsh and verify.
Updated: 25 May 2016 9:50 EDT
JCS Lanit - BPM
RU
I removed ~/.cassandra dir, but this didn't help.
I've tried different older versions of cassandra. cqlsh from cassandra 1.2.9 (released on the 03/09/2013) connected successfully to DNode's cassandra.
MacBook-Pro-Alexander-Lutay:bin lutalex$ ./cqlsh XX.XX.XX.XX
Connected to prpc at XX.XX.XX.XX:9160.
[cqlsh 3.1.7 | Cassandra 0.0.0 | CQL spec 3.0.0 | Thrift protocol 19.36.2]
Use HELP for help.
cqlsh>
But know I experience difficulties when I try to connect with login/password specified.
MacBook-Pro-Alexander-Lutay:bin lutalex$ ./cqlsh -u user -p rules XX.XX.XX.XX
Traceback (most recent call last):
File "./cqlsh", line 2407, in <module>
main(*read_options(sys.argv[1:], os.environ))
File "./cqlsh", line 2393, in main
display_float_precision=options.float_precision)
File "./cqlsh", line 504, in __init__
cql_version=cqlver, transport=transport)
File "./../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/connection.py", line 143, in connect
File "./../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/connection.py", line 59, in __init__
File "./../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/thrifteries.py", line 157, in establish_connection
File "./../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/cassandra/Cassandra.py", line 455, in login
File "./../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/cassandra/Cassandra.py", line 476, in recv_login
I removed ~/.cassandra dir, but this didn't help.
I've tried different older versions of cassandra. cqlsh from cassandra 1.2.9 (released on the 03/09/2013) connected successfully to DNode's cassandra.
MacBook-Pro-Alexander-Lutay:bin lutalex$ ./cqlsh XX.XX.XX.XX
Connected to prpc at XX.XX.XX.XX:9160.
[cqlsh 3.1.7 | Cassandra 0.0.0 | CQL spec 3.0.0 | Thrift protocol 19.36.2]
Use HELP for help.
cqlsh>
But know I experience difficulties when I try to connect with login/password specified.
MacBook-Pro-Alexander-Lutay:bin lutalex$ ./cqlsh -u user -p rules XX.XX.XX.XX
Traceback (most recent call last):
File "./cqlsh", line 2407, in <module>
main(*read_options(sys.argv[1:], os.environ))
File "./cqlsh", line 2393, in main
display_float_precision=options.float_precision)
File "./cqlsh", line 504, in __init__
cql_version=cqlver, transport=transport)
File "./../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/connection.py", line 143, in connect
File "./../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/connection.py", line 59, in __init__
File "./../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/thrifteries.py", line 157, in establish_connection
File "./../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/cassandra/Cassandra.py", line 455, in login
File "./../lib/cql-internal-only-1.4.0.zip/cql-1.4.0/cql/cassandra/Cassandra.py", line 476, in recv_login
cql.cassandra.ttypes.AuthenticationException: AuthenticationException(why='Username and/or password are incorrect')
JCS Lanit - BPM
RU
I double checked that the login/password pair matches the one I've specified on DNode Cluster Management landing page.
May this be caused by an issue saving login/password?
JCS Lanit - BPM
RU
The issue with login/password is only relevant to Pega 7.2 PE.
On "regular" Pega 7.2 installation everything works just fine.
MacBook-Pro-Alexander-Lutay:bin lutalex$ ./cqlsh -u dnode_ext -p dnode_ext xxx-xxx.bpm.lanit
Connected to prpc at xxx-xxx.bpm.lanit:9160.
[cqlsh 3.1.7 | Cassandra 1.2.18 | CQL spec 3.0.0 | Thrift protocol 19.36.2]
Use HELP for help.
cqlsh>
Accepted Solution
Updated: 24 May 2016 7:22 EDT
JCS Lanit - BPM
RU
I've finally found the solution:
- To connect to DNode's Cassandra DB using cqlsh one should use Cassandra distribution package 1.2.9 (relevant for Pega 7.2).
MacBook-Pro-Alexander-Lutay:bin lutalex$ ./cqlsh -u dnode_ext -p dnode_ext xxx-xxx.bpm.lanit
Connected to prpc at xxx-xxx.bpm.lanit:9160.
[cqlsh 3.1.7 | Cassandra 1.2.18 | CQL spec 3.0.0 | Thrift protocol 19.36.2]
Use HELP for help.
cqlsh>
Cox Communications
US
I am able to connect apache cassandra 1.2.9 using cqlsh to our dnodes. I did have to add a port forwarder but that is specific to our infrastructure set up