Issue
- You might encounter an error during portal startup or during starting an upgrade process where you see the following logs:
ERROR [Start Level: Equinox Container: 2d84ba28-dd0e-414a-bade-686084455d7c][ElasticsearchConnectionManager:81] Elasticsearch sidecar could not be started. Search will be unavailable. Manual installation of Elasticsearch and activation of remote mode is recommended.
java.lang.RuntimeException: com.liferay.petra.process.ProcessException: Unable to start elasticsearch server
at com.liferay.portal.search.elasticsearch7.internal.sidecar.Sidecar._startElasticsearch(Sidecar.java:583) ~[bundleFile:?]
at com.liferay.portal.search.elasticsearch7.internal.sidecar.Sidecar.start(Sidecar.java:116) ~[bundleFile:?]
...
Caused by: org.elasticsearch.bootstrap.StartupException: BindHttpException[Failed to bind to [::1]:9201]; nested: BindException[Address already in use];
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[?:?]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157) ~[?:?]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77) ~[?:?]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) ~[?:?]
at org.elasticsearch.cli.Command.main(Command.java:77) ~[?:?]
...
Environment
- Liferay DXP 7.0+
Resolution
- Make sure that the port you have set for your Elasticsearch is not in use
- For sidecar you can easily prevent this error if you set the following setting in the
com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config
file:sidecarHttpPort="AUTO"
Additional Information
- It is worth noting that a stable Elasticsearch connection is required even during an upgrade process
Contenido exclusivo para suscriptores.
Una Suscripción Enterprise de Liferay proporciona acceso a más de 1.500 artículos que incluyen las mejores practicas, diagnóstico de problemas y otras soluciones útiles. Inicia sesión para tener un acceso completo.
Inicia sesión