Issue
- Need to run two or more instances of Liferay with Elasticsearch Sidecar locally.
Environment
- Liferay DXP 7.3
- Liferay DXP 7.4
Resolution
The default HTTP port in Sidecar mode is 9201
If two or more 7.3 or 7.4 instances are run locally, then this port will need to be configured differently on each of the nodes.
- Create a file com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config with content
sidecarHttpPort="AUTO"
- Place it into
[Liferay Home]/osgi/configs
- Restart DXP or the Elasticsearch 7 connector through the App Manager
This configuration only applies to the sidecar. Set the HTTP port range of the sidecar Elasticsearch node.
Set to AUTO
to automatically find the next available port in the 9201-9300
range.
If unset, the value of the Embedded HTTP port is used.
Additional Information
- The port number can also be set explicit like
9202