Description of problem: Getting error message when calling `service rhn-search cleanindex`. Version-Release number of selected component (if applicable): Satellite-5.3.0-RHEL5-re20090507.1-x86_64 How reproducible: always Steps to Reproduce: 1. # /etc/init.d/rhn-search cleanindex Actual results: Stopping rhn-search... rhn-search was not running. /etc/init.d/rhn-search: line 79: exec: java: not found Expected results: indexes cleaned
# rpm -qa | grep -i java | sort java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 java-1.6.0-ibm-1.6.0.4-1jpp.1.el5.x86_64 java-1.6.0-ibm-devel-1.6.0.4-1jpp.1.el5.x86_64 java-1.6.0-openjdk-1.6.0.0-0.25.b09.el5.x86_64 java-1.6.0-openjdk-devel-1.6.0.0-0.25.b09.el5.x86_64 spacewalk-java-0.5.44-17.el5sat.noarch spacewalk-java-config-0.5.44-17.el5sat.noarch spacewalk-java-lib-0.5.44-17.el5sat.noarch
Most likely want to use: /etc/alternatives/java as command, rather than 'java' for the 'exec java' and hope that it is correctly within the bash environment $PATH. removeindex() { SEARCH_CLASS_PATH=`build-classpath-directory /usr/share/rhn/search/lib /usr/share/java/ojdbc14.jar` CLASSPATH=${SEARCH_CLASS_PATH} exec java com.redhat.satellite.search.DeleteIndexes } Cliff PS - John - not sure why, but maybe cleanindex should also restart search post running, my older (month old 530 Sat shows): 'cleanindex') stopit unlock removeindex ;;
I have just resolved this. This appeared on the system where I have installed & uninstalled Satellite few times and I have just noted that /etc/alternatives/java was a broken link. So this is not a $PATH issue, this was problem with a system. `alternatives --auto java` fixed the link. Sorry for a mess :-(
Vader commit: 3a09a2120282008ade983a6075e4893f28bc8a04 Changed cleanindex to start search after clean has completed.
Seems to be working correctly now on Satellite-5.3.0-RHEL5-re20090612.0-x86_64: # service rhn-search cleanindex Stopping rhn-search... Stopped rhn-search. 09/06/17 13:34:50 INFO search.DeleteIndexes: Running query: deleteLastErrata 09/06/17 13:34:51 INFO search.DeleteIndexes: Attempting to delete /usr/share/rhn/search/indexes/errata 09/06/17 13:34:52 INFO search.DeleteIndexes: Running query: deleteLastPackage 09/06/17 13:34:52 INFO search.DeleteIndexes: Attempting to delete /usr/share/rhn/search/indexes/package 09/06/17 13:34:52 INFO search.DeleteIndexes: Running query: deleteLastServer 09/06/17 13:34:52 INFO search.DeleteIndexes: Attempting to delete /usr/share/rhn/search/indexes/server 09/06/17 13:34:52 INFO search.DeleteIndexes: Running query: deleteLastHardwareDevice 09/06/17 13:34:52 INFO search.DeleteIndexes: Attempting to delete /usr/share/rhn/search/indexes/hwdevice 09/06/17 13:34:52 INFO search.DeleteIndexes: Running query: deleteLastSnapshotTag 09/06/17 13:34:52 INFO search.DeleteIndexes: Running query: deleteLastServerCustomInfo 09/06/17 13:34:52 INFO search.DeleteIndexes: Index files have been deleted and database has been cleaned up, ready to reindex Starting rhn-search... # service rhn-search status rhn-search is running (6381).
5.3.0 stage testing: service rhn-search cleanindex cleans the indexes and starts the service again -> RELEASE_PENDING
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