Liferay services are not starting due to continuous exceptions on the console

Issue

  • DXP fails to startup and shows the following errors and warnings on the terminal
    • ERROR [Portal Dependency Manager Component Executor--2][ElasticsearchSearchEngine:56] bundle com.liferay.portal.search.elasticsearch7.impl:6.0.61 (1555)[com.liferay.portal.search.elasticsearch7.internal.ElasticsearchSearchEngine(5416)] : The activate method has thrown an exception
      com.liferay.portal.search.elasticsearch7.internal.connection.ElasticsearchConnectionNotInitializedException: Elasticsearch connection not found. Production Mode Enabled: false, Connection ID: null, Prefer Local Cluster: true, Cross-Cluster Replication Enabled: false. Enable INFO logs on class com.liferay.portal.search.elasticsearch7.internal.connection.ElasticsearchConnectionManager for more information
      at com.liferay.portal.search.elasticsearch7.internal.connection.ElasticsearchConnectionManager.getRestHighLevelClient(ElasticsearchConnectionManager.java:193) ~[?:?]
      at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.cluster.HealthClusterRequestExecutorImpl._getClusterHealthResponse(HealthClusterRequestExecutorImpl.java:91) ~[?:?]
      at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.cluster.HealthClusterRequestExecutorImpl.execute(HealthClusterRequestExecutorImpl.java:49) ~[?:?]
      at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.cluster.ElasticsearchClusterRequestExecutor.executeClusterRequest(ElasticsearchClusterRequestExecutor.java:53) ~[?:?]
      at com.liferay.portal.search.engine.adapter.cluster.HealthClusterRequest.accept(HealthClusterRequest.java:40) ~[?:?]
      at com.liferay.portal.search.engine.adapter.cluster.HealthClusterRequest.accept(HealthClusterRequest.java:22) ~[?:?] .................................................................................................................................................................................WARN [Portal Dependency Manager Component Executor--2][IndexSearcherHelperImpl:62] bundle com.liferay.portal.search:8.0.47 (1122)[com.liferay.portal.search.internal.IndexSearcherHelperImpl(4020)] : Could not get service from ref {com.liferay.portal.kernel.search.SearchEngineHelper}={component.id=4028, component.name=com.liferay.portal.search.internal.SearchEngineHelperImpl, service.id=5286, service.scope=bundle, service.bundleid=1122}
      ...........................................................................................
      WARN [Framework Event Dispatcher: Equinox Container: 743e87ac-5dd1-4cdc-814c-c518784bb7cd][Framework:62] FrameworkEvent WARNING
      org.osgi.framework.ServiceException: org.apache.felix.scr.impl.manager.SingleComponentManager.getService() returned a null service object
      at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:232) ~[org.eclipse.osgi.jar:?]
      at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111) ~[org.eclipse.osgi.jar:?]

Environment

  • Liferay DXP 7.4 
  • Embedded Elasticsearch

Resolution

  • In this scenario, please verify the elasticsearch-sidecar folder within the Liferay_home to see if any of the folders or files are missing or corrupted.
    • If the above scenario is applicable, the simplest workaround is to replace this entire folder with a new one from the same vanilla update and restart the server.
    • Before restarting the server, clear all temp folders:
      1. Delete liferay_home/osgi/state
      2. Delete liferay_home/work
      3. Delete liferay_home/tomcat/work
      4. Delete liferay_home/tomcat/temp
      5. Restart the server

Additional Information

  • The recommended approach is always to perform the above activities or operations in a lower environment first and in a complete shutdown state. 
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0