Bug 486980 - Search, package search ise on simple search
Search, package search ise on simple search
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI (Show other bugs)
530
All Linux
low Severity medium
: ---
: ---
Assigned To: John Matthews
wes hayutin
https://grandprix.rhndev.redhat.com/r...
:
: 480081 (view as bug list)
Depends On:
Blocks: 457073 486216
  Show dependency treegraph
 
Reported: 2009-02-23 10:07 EST by wes hayutin
Modified: 2010-10-23 03:50 EDT (History)
5 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 14:14:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description wes hayutin 2009-02-23 10:07:17 EST
Search, package search ise on simple search

build Satellite-5.3.0-RHEL5-re20090220.1-i386-embedded-oracle.iso

package search for "bash"

[2009-02-23 09:54:42,549] DEBUG - IndexHandler:: searching for: (name:(bash) summary:(bash) filename:(bash)) AND (arch:noarch-solaris-patch-cluster arch:ppc64 arch:ppc64pseries arch:s390 arch:noarch arch:athlon arch:nosrc arch:i486 arch:src arch:ppc64iseries arch:ia32e arch:noarch-solaris-patch arch:i386 arch:s390x arch:sparc-solaris-patch arch:sparc-solaris-patch-cluster arch:amd64 arch:i386-solaris arch:noarch-solaris arch:i586 arch:ppc arch:i386-solaris-patch arch:i686 arch:sparc-solaris arch:sparc.sun4v-solaris arch:i386-solaris-patch-cluster arch:ia64 arch:sparc.sun4u-solaris arch:x86_64 ), indexName = package, lang = en_US
[2009-02-23 09:54:42,549] DEBUG - IndexHandler:: searching for: (name:(bash) summary:(bash) filename:(bash)) AND (arch:noarch-solaris-patch-cluster arch:ppc64 arch:ppc64pseries arch:s390 arch:noarch arch:athlon arch:nosrc arch:i486 arch:src arch:ppc64iseries arch:ia32e arch:noarch-solaris-patch arch:i386 arch:s390x arch:sparc-solaris-patch arch:sparc-solaris-patch-cluster arch:amd64 arch:i386-solaris arch:noarch-solaris arch:i586 arch:ppc arch:i386-solaris-patch arch:i686 arch:sparc-solaris arch:sparc.sun4v-solaris arch:i386-solaris-patch-cluster arch:ia64 arch:sparc.sun4u-solaris arch:x86_64 ), indexName = package, lang = en_US
[2009-02-23 09:54:42,549] INFO  - IndexManager::getIndexReader(package, en_US) path = /usr/share/rhn/search/indexes/package
[2009-02-23 09:54:42,549] INFO  - IndexManager::getIndexReader(package, en_US) path = /usr/share/rhn/search/indexes/package
[2009-02-23 09:54:42,552] INFO  - IndexManager::getIndexSearcher(package, en_US) path = /usr/share/rhn/search/indexes/package
[2009-02-23 09:54:42,552] INFO  - IndexManager::getIndexSearcher(package, en_US) path = /usr/share/rhn/search/indexes/package
[2009-02-23 09:54:42,554] DEBUG - getQueryParser(package, en_US)
[2009-02-23 09:54:42,554] DEBUG - getQueryParser(package, en_US)
[2009-02-23 09:54:42,554] DEBUG - getAnalyzer(package, en_US)
[2009-02-23 09:54:42,554] DEBUG - getAnalyzer(package, en_US)
[2009-02-23 09:54:42,554] DEBUG - package using getDefaultAnalyzer()
[2009-02-23 09:54:42,554] DEBUG - package using getDefaultAnalyzer()
[2009-02-23 09:54:42,558] DEBUG - Original query was: (name:(bash) summary:(bash) filename:(bash)) AND (arch:noarch-solaris-patch-cluster arch:ppc64 arch:ppc64pseries arch:s390 arch:noarch arch:athlon arch:nosrc arch:i486 arch:src arch:ppc64iseries arch:ia32e arch:noarch-solaris-patch arch:i386 arch:s390x arch:sparc-solaris-patch arch:sparc-solaris-patch-cluster arch:amd64 arch:i386-solaris arch:noarch-solaris arch:i586 arch:ppc arch:i386-solaris-patch arch:i686 arch:sparc-solaris arch:sparc.sun4v-solaris arch:i386-solaris-patch-cluster arch:ia64 arch:sparc.sun4u-solaris arch:x86_64 )
[2009-02-23 09:54:42,558] DEBUG - Original query was: (name:(bash) summary:(bash) filename:(bash)) AND (arch:noarch-solaris-patch-cluster arch:ppc64 arch:ppc64pseries arch:s390 arch:noarch arch:athlon arch:nosrc arch:i486 arch:src arch:ppc64iseries arch:ia32e arch:noarch-solaris-patch arch:i386 arch:s390x arch:sparc-solaris-patch arch:sparc-solaris-patch-cluster arch:amd64 arch:i386-solaris arch:noarch-solaris arch:i586 arch:ppc arch:i386-solaris-patch arch:i686 arch:sparc-solaris arch:sparc.sun4v-solaris arch:i386-solaris-patch-cluster arch:ia64 arch:sparc.sun4u-solaris arch:x86_64 )
[2009-02-23 09:54:42,558] DEBUG - Parsed Query is: +((name:b name:a name:s name:h name:ba name:as name:sh name:bas name:ash name:bash) (summary:b summary:a summary:s summary:h summary:ba summary:as summary:sh summary:bas summary:ash summary:bash) filename:bash) +(arch:noarch-solaris-patch-cluster arch:ppc64 arch:ppc64pseries arch:s390 arch:noarch arch:athlon arch:nosrc arch:i486 arch:src arch:ppc64iseries arch:ia32e arch:noarch-solaris-patch arch:i386 arch:s390x arch:sparc-solaris-patch arch:sparc-solaris-patch-cluster arch:amd64 arch:i386-solaris arch:noarch-solaris arch:i586 arch:ppc arch:i386-solaris-patch arch:i686 arch:sparc-solaris arch:sparc.sun4v-solaris arch:i386-solaris-patch-cluster arch:ia64 arch:sparc.sun4u-solaris arch:x86_64)
[2009-02-23 09:54:42,558] DEBUG - Parsed Query is: +((name:b name:a name:s name:h name:ba name:as name:sh name:bas name:ash name:bash) (summary:b summary:a summary:s summary:h summary:ba summary:as summary:sh summary:bas summary:ash summary:bash) filename:bash) +(arch:noarch-solaris-patch-cluster arch:ppc64 arch:ppc64pseries arch:s390 arch:noarch arch:athlon arch:nosrc arch:i486 arch:src arch:ppc64iseries arch:ia32e arch:noarch-solaris-patch arch:i386 arch:s390x arch:sparc-solaris-patch arch:sparc-solaris-patch-cluster arch:amd64 arch:i386-solaris arch:noarch-solaris arch:i586 arch:ppc arch:i386-solaris-patch arch:i686 arch:sparc-solaris arch:sparc.sun4v-solaris arch:i386-solaris-patch-cluster arch:ia64 arch:sparc.sun4u-solaris arch:x86_64)
[2009-02-23 09:54:42,630] DEBUG - 


2009-02-23 09:54:42,544 [TP-Processor8] WARN  com.redhat.rhn.frontend.action.channel.PackageSearchAction - Performing pkg search
2009-02-23 09:54:43,240 [TP-Processor8] WARN  org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class java.lang.NullPointerException
2009-02-23 09:54:43,240 [TP-Processor8] ERROR com.redhat.rhn.frontend.servlets.SessionFilter - Error during transaction. Rolling back
javax.servlet.ServletException
        at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:237)
        at com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestProcessor.java:82)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.AuthFilter.doFilter(AuthFilter.java:73)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:142)
        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.doFilter(LocalizedEnvironmentFilter.java:67)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.EnvironmentFilter.doFilter(EnvironmentFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.SessionFilter.doFilter(SessionFilter.java:55)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:97)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:735)
Caused by: 
java.lang.NullPointerException
        at com.redhat.rhn.frontend.action.channel.PackageSearchAction.performSearch(PackageSearchAction.java:286)
        at com.redhat.rhn.frontend.action.channel.PackageSearchAction.setupForm(PackageSearchAction.java:213)
        at com.redhat.rhn.frontend.action.channel.PackageSearchAction.execute(PackageSearchAction.java:89)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
        ... 40 more
2009-02-23 09:54:43,242 [TP-Processor8] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/rhn].[action] - Servlet.service() for servlet action threw exception
java.lang.NullPointerException
        at com.redhat.rhn.frontend.action.channel.PackageSearchAction.performSearch(PackageSearchAction.java:286)
        at com.redhat.rhn.frontend.action.channel.PackageSearchAction.setupForm(PackageSearchAction.java:213)
        at com.redhat.rhn.frontend.action.channel.PackageSearchAction.execute(PackageSearchAction.java:89)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:237)
        at com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestProcessor.java:82)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.AuthFilter.doFilter(AuthFilter.java:73)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:142)
        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.doFilter(LocalizedEnvironmentFilter.java:67)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.EnvironmentFilter.doFilter(EnvironmentFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.SessionFilter.doFilter(SessionFilter.java:55)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:97)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:735)
Comment 1 John Matthews 2009-02-23 15:06:01 EST
The problem here is that the search indexes were out of sync with the database. 
This could happen when the database is wiped clean and redone, while the search indexes are not cleaned.

The search indexes can be cleaned by running:
"/sbin/service rhn-search cleanindex"


A check has been added to the webui, it will attempt to detect this in the future, when we see that there is a problem and they are out of sync we'll display the below message as a struts action message.

Package search index and database entries appear to be out of sync. Please run '/sbin/service rhn-search cleanindex; /sbin/service rhn-search start'

This also gets written to the tomcat log.

QA:  For testing to re-create this bad setup do the following.
1) You need 2 satellite installs.
2) Copy /usr/share/rhn/search/indexes from Satellite-A to Satellite-B
3) Restart search (/sbin/service rhn-search restart)
4) Do a package search
5) Check that you get the message: Package search index and database entries appear to be out of sync. Please run '/sbin/service rhn-search cleanindex; /sbin/service rhn-search start'
6) If logging is enabled, you will also see this message printed in the tomcat logs.
Comment 3 wes hayutin 2009-03-03 12:25:51 EST
Package search index and database entries appear to be out of sync. Please run '/sbin/service rhn-search cleanindex; /sbin/service rhn-search start'

also saw 

Index files missing from search-server . 
on a system search
Comment 4 Jesus M. Rodriguez 2009-03-26 00:16:00 EDT
*** Bug 480081 has been marked as a duplicate of this bug. ***
Comment 5 Milan Zazrivec 2009-08-03 04:15:41 EDT
Verified in stage -> RELEASE_PENDING.
Comment 6 Brandon Perkins 2009-09-10 14:14:51 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html

Note You need to log in before you can comment on or make changes to this bug.