root@hostname [ ~ ]# /usr/lib/loginsight/application/sbin/li-reset-admin-passwd.sh --checkAdminStatus
FAILED: Unable to get user data. Possible cassandra is down
root@hostname [ ~ ]# /usr/lib/loginsight/application/sbin/../lib/apache-cassandra-4.1.3/bin/cqlsh-no-pass
Connection error: ('Unable to connect to any servers', {'loopback:9042': PermissionError(1, "Tried connecting to [('loopback', 9042)]. Last error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1007)")})
The "reset admin password" script is failing because it is using cqlsh-no-pass command underneath, which is in-turn failing because of expired certificate.
The internal certificates are expiring, and it can be validated by executing the commands below:
keytool -list --keystore /usr/lib/loginsight/application/etc/truststore
keytool -list --keystore /usr/lib/loginsight/application/etc/3rd_config/keystore
echo "" | keytool -list -keystore /usr/lib/loginsight/application/etc/3rd_config/keystore -rfc 2> /dev/null | openssl x509 -noout -enddate
To resolve the issue, follow the steps below to reset admin password:
/storage/core/loginsight/cidata/cassandra/config/cqlshrcvalidate = true should be replaced with validate = falseli-reset-admin-passwd.sh script from this KB: Process to reset admin passwordAfter the password has been changed and you are able to access the UI, you can replace the expired cert by following the steps mentioned below:
SSLecho "" | keytool -list -keystore /usr/lib/loginsight/application/etc/3rd_config/keystore -rfc 2> /dev/null | openssl x509 -noout -enddate
Once the certificate is renewed, revert the changes done in file: /storage/core/loginsight/cidata/cassandra/config/cqlshrc.
/storage/core/loginsight/cidata/cassandra/config/cqlshrcvalidate = false should be reverted to validate = trueTo check if Cassandra is Up / Normal by running the command on primary node:
/usr/lib/loginsight/application/lib/apache-cassandra-*/bin/nodetool-no-pass status
Guidance to replace certificates: