Wednesday, January 29, 2020

Cassandra Error: nodetool: Failed to connect to '159.65.236.256:7199' - NoSuchObjectException: 'no such object in table'.

Cassandra Error: nodetool: Failed to connect to '159.65.236.256:7199' - NoSuchObjectException: 'no such object in table'.

Make sure these parameters were set.

In cassandra-env.sh, enable hostname to IP address/resolvable hostname.
Example: JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=204.48.27.256"

and set
LOCAL_JMX=no --- This will allow other hosts JMX connection
&
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false" --- This will disable authentication, we can keep it true if needed.

***

Sunday, January 26, 2020

cqlsh connecting to remote host

cqlsh connecting to remote host.

error: cqlsh 159.65.236.256
Connection error: ('Unable to connect to any servers', {'159.65.236.256': error(111, "Tried connecting to [('159.65.236.256', 9042)]. Last error: Connection refused")})

How to avoid:
1) Edit the cassandra.yaml, look for rpc_address and set it to its nodes IP address and restart the service.
rpc_address: 204.48.257.10 (respecitive hosts IP)
service dse/cassandra restart

***

Saturday, January 25, 2020

Login error: "This account is currently not available."

Example: After installing Datastax Cassandra, when we try to login as cassandra user as 'su cassandra' we get above error.

How to resolve?
Run below commands as root user or user with sudo permission.

1) Verify if the user was created.
cat /etc/passwd | grep cassandra
(or)
getent passwd cassandra (get entries from Name Service Switch libraries)

output: cassandra:x:112:116:Cassandra database,,,:/var/lib/cassandra:/usr/sbin/nologin
Here, Note the /usr/sbin/nologin
It's not pointed to any shell to execute. So change it to point to any shell.

2) Use usermod to change the shell.
usermod -s /bin/bash cassandra

3) Verify the contents again.
cat /etc/passwd | grep cassandra
cassandra:x:112:116:Cassandra database,,,:/var/lib/cassandra:/bin/bash

4) Switch to cassandra user.
su cassandra

***