-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the bug
The opensearch rpm installation fails to start with a default config, and throws a confusing error.
The default error is : Caused by: org.opensearch.OpenSearchException: No SSL configuration found
While what actually happened is the following.
I tried installing the rpm while not setting the env OPENSEARCH_INITIAL_ADMIN_PASSWORD= variable.
Related component
No response
To Reproduce
install the rpm on a vanilla Almalinux 9.6 system.
- rpm -vih opensearch-3.2.0-linux-x64.rpm
try starting the service - systemctl start opensearch
OpenSearch fails to start
The stacktrace documents a Caused by: org.opensearch.OpenSearchException: No SSL configuration found
Expected behavior
- Option 0: The opensearch installation fails with a clear postinstal error that the environment variable was not set.
- Option 1: Opensearch starts with a default password
- Option 2: Opensearch starts with a random generated password it places in a documented (and verbose) location.
- Option 3: Opensearch fails to start with a clear pointer to the documentation that explains the environment variable needs to be set, rather than a related SSL error.
Options that require setting the environment parameter are my least preferred one as one of the default expectations of an RPM package is that it works out of the box with no additional configuration , thus not having to set an environment variable this way.
Additional Details
The POSTIN script that does
sh /usr/share/opensearch/plugins/opensearch-security/tools/install_demo_configuration.sh -y -i -s > /var/log/opensearch/install_demo_configuration.log 2>&1 || (echo "ERROR: Something went wrong during demo configuration installation. Please see the logs in /var/log/opensearch/install_demo_configuration.log" && exit 1)
Doesn't actually seem to catch the missing environment variable as an error.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status