When running the Sites 9 installElasticsearchIndexes.ps1 script, script does execute successfully if no params are specified. Documentation link is https://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20Sites-v1/GUID-C0549FC9-E15D-4A63-BE9A-16A7BC3ADFE4
When including the param --es-host SERVERNAME (.\installElasticSearchIndexes.ps1 --es-host HOSTNAME), I see an index creation error
ERROR com.sdl.delivery.iq.provider.elastic.connector.bootstrap.BootstrappedElasticSearchConnector
- PUT http://SERVERNAME:9200/--es-hostudp-index: HTTP/1.1 400 Bad Request
{"error":{"root_cause":[{"type":"invalid_index_name_exception",
"reason":"Invalid index name [--es-hostudp-index], must not start with
'_', '-', or '+'","index_uuid":"_na_","index":"--es-hostudp-index"}],
"type":"invalid_index_name_exception"
When also including the param --es-index-common-name-prefix (.\installElasticSearchIndexes.ps1 --es-host HOSTNAME --es-index-common-name-prefix udp2), I see an index NumberFormatException error relating to the elasticPort param
WARNING: Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultConnectorConfig':
Unsatisfied dependency expressed through field 'elasticPort'; nested exception is org.springframework.beans.TypeMismatchException:
Failed to convert value of type 'java.lang.String' to required type 'int'; nested exception is java.lang.NumberFormatException: For input string:
"--es-index-common-name-prefix"
When using the params --es-port and --es-host (.\installElasticSearchIndexes.ps1 --es-host HOSTNAME --es-port 9200), a different NumberFormatException error is seen
Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'defaultConnectorConfig': Unsatisfied dependency expressed through field 'elasticPort';
nested exception is org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'int';
nested exception is java.lang.NumberFormatException: For input string: "--es-port"
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
Should a different syntax be used for params? I've tried using double and single quotes for the param values. Again, script completes successfully with no params added.