When you install or upgrade to SAS® Visual Investigator 10.8, the playbook deployment can fail when attempting to execute the /opt/sas/viya/home/share/elasticsearch-secure/svi-opendistro-config.sh script. An error that is similar to the following then appears in the deployment.log file:
2021-10-26 12:05:57] [FATAL] An error occurred in line 91 of file /opt/sas/viya/home/share/elasticsearch-secure/svi-opendistro-config.sh:",
" timeout 300s \"$OPENDISTRO_SECURITYCONFIG_TOOLS_DIR/securityadmin.sh\" --hostname \"$SAS_HOSTNAME\" -ts \"$ELASTICSEARCH_OPENDISTRO_CERTS_DIR/trustedcerts.jks\" -ks \"$ELASTICSEARCH_OPENDISTRO_KEYS_DIR/opendistro-key-sgadmin.jks\" -icl >> \"$LOG_FILE\" 2>&1",
"[2021-10-26 12:05:57] [ERROR] /opt/sas/viya/home/share/../share/svi-configuration/svi-configuration-functions.sh exited with return code 124"
"[2021-10-26 12:00:17] [INFO] TLS enabled, installing OpenDistro.",
"[2021-10-26 12:00:57] [INFO] Cluster Status #1: {\"error\":{\"root_cause\":[{\"type\":\"master_not_discovered_exception\",\"reason\":null}],\"type\":\"master_not_discovered_exception\",\"reason\":null},\"status\":503}"
This error is provoked when the Linux hostname command returns the host short name rather than the fully qualified domain name (FQDN).
You can test for this issue by comparing the output of the hostname command with the output of the hostname -f command on the server. As documented in SAS Help Center: Confirm the Identities of the Hosts, these commands must return the same FQDN host name.
Also check the host name that is being written to the elasticsearch.log file under /opt/sas/viya/config/var/log/svi-elasticsearch. The host name appears as follows:
2021-10-26T17:18:11,196][INFO ][c.a.o.s.OpenDistroSecurityPlugin] [serverName] .........
If you see the host short name, then the problem is that the hostname command is returning the short name. You should be seeing the FQDN instead, as shown here:
2021-10-26T17:18:11,196][INFO ][c.a.o.s.OpenDistroSecurityPlugin] [serverName.secondLevel.domain] .........
The svi-opendistro-config.sh script is failing while attempting to find Elasticsearch using the FQDN, and the error is generated when the short name is found instead.
To resolve the issue, a Linux administrator must configure the system so that the hostname command returns the FQDN and has the same output as the hostname -f command:
sudo hostnamectl set-hostname serverName.secondLevel.domain
sudo hostnamectl set-hostname "serverName" --pretty
You then need to restart Elasticsearch:
systemctl restart sas-svi-elasticsearch-default
After restarting, the elasticsearch.log file should record the FQDN rather than the host short name.
After you confirm that the FQDN appears in the elasticsearch.log file, you can then execute the /opt/sas/viya/home/share/elasticsearch-secure/svi-opendistro-config.sh script to check that it completes successfully before re-running the deployment playbook. Or you can simply re-run the deployment playbook.
This issue is fixed in the SAS Visual Investigator 10.8 update for February 2022.
Operating System and Release Information
| SAS System | SAS Visual Investigator | Linux for x64 | 10.8 | 10.8 | Viya | Viya |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.