LCS boot delegation property on WebSphere breaks the embedded Elasticsearch 6.5 in DXP 7.1 FP5

This article documents a known issue with the embedded Elasticsearch 6.5 Connector. Elasticsearch 6.5 is now the default embedded ES connector in DXP 7.1 after applying DXP 7.1 Fix Pack 5.

It was discovered that after applying FP5, there is a startup error in platforms deployed on WebSphere 9 that uses Liferay Connected Services (LCS) to manage subscription and patches. The root cause is because the LCS boot delegation property conflicts with ES 6.5. This is the stacktrace from the console:

3.886 ERROR [Framework Event Dispatcher: Equinox Container: e9188704-5f5c-4809-b0cc-13684d07e965][com_liferay_portal_search:97] FrameworkEvent ERROR
java.lang.IllegalStateException: Unable to initialize Elasticsearch cluster: {_clusterHealthStatus=RED, _healthStatusMessage='{"cluster_name":"LiferayElasticsearchCluster","status":"red","timed_out":true,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":0,"active_shards":0,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0,"delayed_unassigned_shards":0,"number_of_pending_tasks":0,"number_of_in_flight_fetch":0,"task_max_waiting_in_queue_millis":0,"active_shards_percent_as_number":"NaN"}'}
	at com.liferay.portal.search.elasticsearch6.internal.ElasticsearchSearchEngine.waitForYellowStatus(ElasticsearchSearchEngine.java:300)
	at com.liferay.portal.search.elasticsearch6.internal.ElasticsearchSearchEngine.initialize(ElasticsearchSearchEngine.java:107)
	at com.liferay.portal.kernel.search.SearchEngineProxyWrapper.initialize(SearchEngineProxyWrapper.java:95)
	at com.liferay.portal.kernel.search.AbstractSearchEngineConfigurator.setSearchEngine(AbstractSearchEngineConfigurator.java:450)
	at com.liferay.portal.kernel.search.AbstractSearchEngineConfigurator.initSearchEngine(AbstractSearchEngineConfigurator.java:380)
	at com.liferay.portal.kernel.search.AbstractSearchEngineConfigurator.initialize(AbstractSearchEngineConfigurator.java:303)
	at com.liferay.portal.search.elasticsearch6.internal.ElasticsearchEngineConfigurator.initialize(ElasticsearchEngineConfigurator.java:107)
	at com.liferay.portal.kernel.search.AbstractSearchEngineConfigurator$1.dependenciesFulfilled(AbstractSearchEngineConfigurator.java:79)
	at com.liferay.registry.dependency.ServiceDependencyManager.verifyDependencies(ServiceDependencyManager.java:146)
	at com.liferay.registry.dependency.ServiceDependencyManager$ServiceDependencyServiceTrackerCustomizer.addingService(ServiceDependencyManager.java:242)
	at com.liferay.registry.internal.ServiceTrackerCustomizerAdapter.addingService(ServiceTrackerCustomizerAdapter.java:35)
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
	at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:321)
		

(truncated for space)

Resolution

Workaround Available

Add the property com.ibm.crypto to the existing property inside module.framework.properties.org.osgi.framework.bootdelegation=\.

Note: before making any changes to Liferay DXP, shut down the application server. This is especially true in IBM WebSphere. Always use a portal-ext.properties file to make changes to the portal.

  1. In the portal-ext.properties file, enter the following:
    module.framework.properties.org.osgi.framework.bootdelegation=\
            __redirected,\
            com.liferay.aspectj,\
            com.liferay.aspectj.*,\
            com.liferay.portal.servlet.delegate,\
            com.liferay.portal.servlet.delegate*,\
            com.sun.ccpp,\
            com.sun.ccpp.*,\
            com.sun.crypto.*,\
            com.sun.image.*,\
            com.sun.jmx.*,\
            com.sun.jna,\
            com.sun.jndi.*,\
            com.sun.mail.*,\
            com.sun.management.*,\
            com.sun.media.*,\
            com.sun.msv.*,\
            com.sun.org.*,\
            com.sun.syndication,\
            com.sun.tools.*,\
            com.sun.xml.*,\
            com.yourkit.*,\
            javax.validation,\
            javax.validation.*,\
            jdk.*,\
            com.ibm.crypto.*,\
            sun.*,\
            weblogic.jndi,\
            weblogic.jndi.*
    
    
  2. Save the file.
  3. Start the server.

After applying this property, the Elasticsearch related errors are resolved and the platform starts without errors.

Was this article helpful?
1 out of 1 found this helpful