Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-126079

Reindex all search indexes not working with Solr

    Details

      Description

      Steps to Reproduce:

      1. Start 7.0.x portal with Solr
      2. Create a web content with name "Apple"
      3. Go to Site, search for "Apple", and assert web content is displayed
      4. Shut down portal, clean database, and delete osgi/state folder
      5. Start up portal
      6. Create a web content with name "Apple"
      7. Go to Control Panel > Configuration > Server Administration
      8. Scroll down and execute "Reindex all search indexes."
      9. Go to Site, search for "Apple"

      Expected Results:
      Apple is displayed in search results

      Actual Result:
      Portlet says "Search is temporarily unavailable." and there are errors in the console log

      2021-01-19 19:35:17.284 ERROR [http-nio-8080-exec-10][render_portlet_jsp:131] null
      com.liferay.journal.exception.NoSuchArticleResourceException: No JournalArticleResource exists with the primary key 31816
      	at com.liferay.journal.service.persistence.impl.JournalArticleResourcePersistenceImpl.findByPrimaryKey(JournalArticleResourcePersistenceImpl.java:2774)
      	at com.liferay.journal.service.persistence.impl.JournalArticleResourcePersistenceImpl.findByPrimaryKey(JournalArticleResourcePersistenceImpl.java:2792)
      	at com.liferay.journal.service.impl.JournalArticleResourceLocalServiceImpl.getArticleResource(JournalArticleResourceLocalServiceImpl.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:169)
      	at com.liferay.journal.web.asset.JournalArticleAssetRendererFactory.getAssetRenderer(JournalArticleAssetRendererFactory.java:105)
      	at com.liferay.asset.kernel.model.BaseAssetRendererFactory.getAssetRenderer(BaseAssetRendererFactory.java:75)
      	at com.liferay.portal.search.web.internal.result.display.builder.SearchResultSummaryDisplayBuilder.build(SearchResultSummaryDisplayBuilder.java:90)
      	at org.apache.jsp.search_jsp._jspService(search_jsp.java:878)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

      Note: Tested and failed with web contents, documents, and blog entries. A workaround is to reindex the article specifically e.x: Reindex com.liferay.journal.model.JournalArticle.

      Another Note: Adding index.on.startup=true in the portal-ext.properties file successfully reindexes the assets but causes multiple background task NPEs on startup

      2021-01-19 19:02:04.143 ERROR [liferay/background_task-2][BackgroundTaskMessageListener:166] Unable to execute background task
      java.lang.NullPointerException
      	at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.getBackgroundTaskExecutor(BackgroundTaskMessageListener.java:217)
      	at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.wrapBackgroundTaskExecutor(BackgroundTaskMessageListener.java:266)
      	at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:99)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
      	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:753)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:665)
      	at java.lang.Thread.run(Thread.java:748)

      Reproduced on:
      Tomcat 8.0.32 + MySQL 5.7 Portal 7.0 DXP GA1 with FP97
      Tomcat 8.0.32 + MySQL 5.7 Portal 7.0 DXP GA1 with FP88 and Solr 5 release 1.1.2
      Tomcat 8.5.57 + MySQL 5.7 Portal 7.0.x GIT ID 9851c459eb76645428fb54701b6a3e176e19fe9f

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bryan.engler Bryan Engler
              Reporter:
              brooke.dalton Brooke Dalton
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              Engineering Assignee:
              Wade Cao
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                43 weeks, 3 days ago
                Development End Date:
                Development Start Date:

                  Packages

                  Version Package