SAS® Visual Investigator 10.8 Hot Fix 16 and later requires Java11 for OpenSearch


SAS Visual Investigator 10.8 Hot Fix16 and later requires Java11 for OpenSearch. Earlier versions of SAS Visual Investigator 10.8 allowed either Java8 or Java11 for OpenSearch. 

This SAS KB article outlines the steps to install and configure OpenSearch to use Java11.

Note that issues can occur if you continue to use Java8 with OpenSearch following the update to SAS Visual Investigator 10.8 Hot Fix 16 or later, such as the following:

  1. All searches in a web browser fail immediately after installing SAS Visual Investigator 10.8 Hot Fix 16 or later.
    An error occurred during a request to a different service. The error has been logged and the application administrators have been notified.
  2. Indexing might fail immediately after installing SAS Visual Investigator 10.8 Hot Fix 16 or later.
  3. The following error occurs in the /opt/sas/viya/config/var/log/svi-elasticsearch/sas-opensearch.log:

    [datetime][ERROR][o.o.s.s.DynamicConfigModelV7] [hostname] Unable to initialize auth domain jwt_auth_domain=AuthcDomain [http_enabled=true, transport_enabled=true, order=1, http_authenticator=HttpAuthenticator [challenge=false, type=openid, config={openid_connect_url=https://hostname.sas.com/SASLogon/.well-known/openid-configuration, jwt_header=Authorization, roles_key=scope, subject_key=user_name}], authentication_backend=AuthcBackend [type=noop, config={}], description=null] due to OpenSearchException[java.lang.reflect.InvocationTargetException]; nested: InvocationTargetException; nested: UnsupportedClassVersionError[org/apache/cxf/rs/security/jose/jwk/JsonWebKeys has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0];

Workaround

To circumvent this issue, complete the following steps. Note that you must install Java11 on the Linux operating system for the first four steps. Consult with your Linux operating system administrator as needed for these instructions.

1. sudo yum list available java-11*
2. sudo yum install java-11-openjdk.x86_64
3. ls -la /usr/lib/jvm | grep -i jre-11-openjdk-11     
Note: Take a note of the directory name returned in this step. (This article uses the jre-11-openjdk-11.0.23.0.9-3.el8.x86_64 directory.)
4. cd /usr/lib/jvm/jre-11-openjdk-11.0.23.0.9-3.el8.x86_64
./bin/java -version

Here an example output:

Example output

Then, complete the following steps to reconfigure OpenSearch to use Java11.

5. sudo su - sas
6. vi /opt/sas/viya/config/etc/sysconfig/sas-svi-elasticsearch/default/sas-svi-elasticsearch
7. Ensure that the OPENSEARCH_JAVA_HOME line is uncommented and uses the directory from step #4. Here is an example:




Note: If the OPENSEARCH_JAVA_HOME variable is not present in the file, you can manually add it:
export OPENSEARCH_JAVA_HOME='/usr/lib/jvm/java-11-openjdk-11.0.23.0.9-3.el8.x86_64'

8. Save the file.
9. Repeat steps #1-8 on each OpenSearch node.
10. Then, restart each of the OpenSearch nodes: sudo systemctl restart sas-viya-svi-elasticsearch-default