In a new SAS Viya platform environment deployed on Red Hat OpenShift, your internal OpenSearch cluster that is deployed as part of the SAS Viya platform might fail with jar hell and Permission denied errors against a druid-<version>.jar file. These errors might occur in the logs of your sas-opendistro-* pods as follows:
{"type": "server", "timestamp": "2024-12-05T21:41:05,738Z", "level": "ERROR", "component": "o.o.b.OpenSearchUncaughtExceptionHandler", "cluster.name": "sas-opendistro", "node.name": "sas-opendistro-default-0", "message": "uncaught exception in thread [main]",
"stacktrace": ["org.opensearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to load plugin opensearch-sql due to jar hell",
"at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:185) ~[opensearch-2.17.0.jar:2.17.0]",
"at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:172) ~[opensearch-2.17.0.jar:2.17.0]",
"Caused by: java.io.FileNotFoundException: /usr/share/elasticsearch/plugins/opensearch-sql/druid-1.1.20.jar (Permission denied)",
"at java.base/java.io.RandomAccessFile.open0(Native Method) ~[?:?]",
…
Similarly, in other pods or services logs that interact with OpenSearch and/or have a dependency on OpenSearch (for example, sas-svi-datahub and sas-svi-sand pods on SAS® Visual Investigator), a Waiting for OpenSearch to start message might occur. This message implies that the pod or service is waiting for OpenSearch to start.
These errors usually occur when you miss OpenShift pre-installation steps that are specific to OpenSearch—especially service account, UID, and security context constraints (SCC) related steps that are supposed to be completed before the SAS Viya platform is deployed. Those pre-installation steps are documented below. See the version of the document that matches with the version of your SAS Viya platform environment:
Confirm that you completed all the applicable steps from the documentation above before you deploy the SAS Viya platform:
To check, run oc adm policy who-can use scc sas-opendistro. In the output, under Users, a sas-opendistro service account along with your SAS Viya namespace must occur. For example, you should see the following if your Viya namespace is “viya”:
Namespace: viya
Verb: use
resource: securitycontextconstraints.security.openshift.io
Users: system:serviceaccount:viya:sas-opendistro
Note: Do as follows if you missed any of these steps and/or there is an UID mismatch between the UID that is returned by the id command from one of the sas-opendistro-* pods and the UID in the run-user-transformer.yaml and sas-opendistro-scc.yaml files:
Removing the OpenSearch cluster results in loss of indices related data if anything has been indexed. However, you can get that data back by reindexing everything manually once the cluster has been recreated after you redeploy. You most likely do not have anything indexed if you have a newly deployed SAS Viya platform environment. In this scenario, it should be safe to remove and recreate the cluster from scratch. However, if you do have data, SAS Technical Support recommends taking a full-system backup of the entire SAS Viya platform before removing your OpenSearch cluster. See SAS® Viya® Platform: Backup and Restore for backup and restore documentation. (Be sure to use the version of the doc that matches the version of your SAS Viya platform environment). Once you redeploy and the cluster is recreated from scratch, you can reindex the data manually.