Bug 492624 - add a check or command to start oracle before /etc/init.d/rhn-search clean-index is executed
add a check or command to start oracle before /etc/init.d/rhn-search clean-in...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
530
All Linux
low Severity medium
: ---
: ---
Assigned To: John Matthews
wes hayutin
:
Depends On:
Blocks: 457073
  Show dependency treegraph
 
Reported: 2009-03-27 14:50 EDT by wes hayutin
Modified: 2009-09-10 15:32 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 15:32:22 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-03-27 14:50:01 EDT
Description of problem:

add a check or command to start oracle before /etc/init.d/rhn-search clean-index is executed

if oracle is stopped rhn-search clean-index bails out badly.


clean rhn search index
Stopping rhn-search...
rhn-search was not running.
09/03/27 13:23:10 INFO search.DeleteIndexes: Running query: deleteLastErrata
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/redhat/satellite/search/db/errata.xml.  
--- The error occurred while executing mapped statement.  
--- Check the deleteLastErrata.  
--- Check the statement or the result map.  
--- Cause: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:505)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:528)
	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)
	at com.redhat.satellite.search.db.WriteQuery.delete(WriteQuery.java:72)
	at com.redhat.satellite.search.DeleteIndexes.deleteQuery(DeleteIndexes.java:88)
	at com.redhat.satellite.search.DeleteIndexes.main(DeleteIndexes.java:135)
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
	at java.sql.DriverManager.getConnection(DriverManager.java:316)
	at java.sql.DriverManager.getConnection(DriverManager.java:353)
	at com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)
	at com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
	... 6 more
09/03/27 13:23:10 WARN search.DeleteIndexes: Failed to run query: deleteLastErrata
09/03/27 13:23:10 INFO search.DeleteIndexes: Running query: deleteLastPackage
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/redhat/satellite/search/db/package.xml.  
--- The error occurred while executing mapped statement.  
--- Check the deleteLastPackage.  
--- Check the statement or the result map.  
--- Cause: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:505)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:528)
	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)
	at com.redhat.satellite.search.db.WriteQuery.delete(WriteQuery.java:72)
	at com.redhat.satellite.search.DeleteIndexes.deleteQuery(DeleteIndexes.java:88)
	at com.redhat.satellite.search.DeleteIndexes.main(DeleteIndexes.java:135)
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
	at java.sql.DriverManager.getConnection(DriverManager.java:316)
	at java.sql.DriverManager.getConnection(DriverManager.java:353)
	at com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)
	at com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
	... 6 more
09/03/27 13:23:10 WARN search.DeleteIndexes: Failed to run query: deleteLastPackage
09/03/27 13:23:10 INFO search.DeleteIndexes: Running query: deleteLastServer
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/redhat/satellite/search/db/server.xml.  
--- The error occurred while executing mapped statement.  
--- Check the deleteLastServer.  
--- Check the statement or the result map.  
--- Cause: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:505)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:528)
	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)
	at com.redhat.satellite.search.db.WriteQuery.delete(WriteQuery.java:72)
	at com.redhat.satellite.search.DeleteIndexes.deleteQuery(DeleteIndexes.java:88)
	at com.redhat.satellite.search.DeleteIndexes.main(DeleteIndexes.java:135)
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
	at java.sql.DriverManager.getConnection(DriverManager.java:316)
	at java.sql.DriverManager.getConnection(DriverManager.java:353)
	at com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)
	at com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
	... 6 more
09/03/27 13:23:10 WARN search.DeleteIndexes: Failed to run query: deleteLastServer
09/03/27 13:23:10 INFO search.DeleteIndexes: Running query: deleteLastHardwareDevice
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/redhat/satellite/search/db/hwdevice.xml.  
--- The error occurred while executing mapped statement.  
--- Check the deleteLastHardwareDevice.  
--- Check the statement or the result map.  
--- Cause: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:505)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:528)
	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)
	at com.redhat.satellite.search.db.WriteQuery.delete(WriteQuery.java:72)
	at com.redhat.satellite.search.DeleteIndexes.deleteQuery(DeleteIndexes.java:88)
	at com.redhat.satellite.search.DeleteIndexes.main(DeleteIndexes.java:135)
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
	at java.sql.DriverManager.getConnection(DriverManager.java:316)
	at java.sql.DriverManager.getConnection(DriverManager.java:353)
	at com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)
	at com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
	... 6 more
09/03/27 13:23:10 WARN search.DeleteIndexes: Failed to run query: deleteLastHardwareDevice
09/03/27 13:23:10 INFO search.DeleteIndexes: Running query: deleteLastSnapshotTag
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/redhat/satellite/search/db/snapshot_tag.xml.  
--- The error occurred while executing mapped statement.  
--- Check the deleteLastSnapshotTag.  
--- Check the statement or the result map.  
--- Cause: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:505)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:528)
	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)
	at com.redhat.satellite.search.db.WriteQuery.delete(WriteQuery.java:72)
	at com.redhat.satellite.search.DeleteIndexes.deleteQuery(DeleteIndexes.java:88)
	at com.redhat.satellite.search.DeleteIndexes.main(DeleteIndexes.java:135)
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
	at java.sql.DriverManager.getConnection(DriverManager.java:316)
	at java.sql.DriverManager.getConnection(DriverManager.java:353)
	at com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)
	at com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
	... 6 more
09/03/27 13:23:10 WARN search.DeleteIndexes: Failed to run query: deleteLastSnapshotTag
09/03/27 13:23:10 INFO search.DeleteIndexes: Running query: deleteLastServerCustomInfo
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/redhat/satellite/search/db/server_custom_info.xml.  
--- The error occurred while executing mapped statement.  
--- Check the deleteLastServerCustomInfo.  
--- Check the statement or the result map.  
--- Cause: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:505)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:528)
	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)
	at com.redhat.satellite.search.db.WriteQuery.delete(WriteQuery.java:72)
	at com.redhat.satellite.search.DeleteIndexes.deleteQuery(DeleteIndexes.java:88)
	at com.redhat.satellite.search.DeleteIndexes.main(DeleteIndexes.java:135)
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
	at java.sql.DriverManager.getConnection(DriverManager.java:316)
	at java.sql.DriverManager.getConnection(DriverManager.java:353)
	at com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)
	at com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
	... 6 more
09/03/27 13:23:10 WARN search.DeleteIndexes: Failed to run query: deleteLastServerCustomInfo
09/03/27 13:23:10 INFO search.DeleteIndexes: Index files have been deleted and database has been cleaned up, ready to reindex
Comment 1 John Matthews 2009-03-27 14:55:11 EDT
Initial thoughts were to solve this in /etc/init.d/rhn-search, leverage init.d functions to check that oracle (or future DB is running), if not then display a warning and exit.

On futher thoughts.....thinking more about catching this in java side of cleanindex and display error from there.
Comment 2 John Matthews 2009-04-04 17:29:38 EDT
Decided to catch the exception in the java side.  Prior to this, we caught the exception but continued to run through the routine, this meant we'd delete the indexes from the filesystem and *not* update the database.  

We now catch the exception and display a message then stop.

To test, stop the database
/etc/init.d/oracle stop
Then run cleanindex
/etc/init.d/rhn-search cleanindex


Here's an example of the expected output.

sudo /etc/init.d/rhn-search cleanindex
Stopping rhn-search...
rhn-search was not running.
2009-04-04 16:22:29,256 [main] INFO  com.redhat.satellite.search.DeleteIndexes - Running query: deleteLastErrata
2009-04-04 16:22:29,708 [main] ERROR com.redhat.satellite.search.DeleteIndexes - Caught Exception: 
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/redhat/satellite/search/db/errata.xml.  
--- The error occurred while executing mapped statement.  
--- Check the deleteLastErrata.  
--- Check the statement or the result map.  
--- Cause: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:505)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:528)
	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)
	at com.redhat.satellite.search.db.WriteQuery.delete(WriteQuery.java:72)
	at com.redhat.satellite.search.DeleteIndexes.deleteQuery(DeleteIndexes.java:87)
	at com.redhat.satellite.search.DeleteIndexes.main(DeleteIndexes.java:118)
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
	at java.sql.DriverManager.getConnection(DriverManager.java:620)
	at java.sql.DriverManager.getConnection(DriverManager.java:169)
	at net.rkbloom.logdriver.LogDriver.connect(LogDriver.java:72)
	at java.sql.DriverManager.getConnection(DriverManager.java:620)
	at java.sql.DriverManager.getConnection(DriverManager.java:200)
	at com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)
	at com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
	... 6 more
2009-04-04 16:22:29,710 [main] ERROR com.redhat.satellite.search.DeleteIndexes - Unable to establish database connection.
2009-04-04 16:22:29,710 [main] ERROR com.redhat.satellite.search.DeleteIndexes - Ensure database is available and connection details are correct, then retry
Comment 3 John Matthews 2009-04-04 17:40:07 EDT
Here's the commit in VADER branch

http://git.fedorahosted.org/git/?p=spacewalk.git;a=commit;h=5f27a23c829f536e3b412d991322955b216361f9
Comment 4 wes hayutin 2009-04-23 13:05:19 EDT
verified 4/20 build
Comment 5 Jan Pazdziora 2009-09-07 07:15:16 EDT
Stage validated with Satellite-5.3.0-RHEL5-re20090820.1. The error output matches the one shown in comment 2:

[root@xen62 ~]# /usr/sbin/rhn-satellite stop
Shutting down rhn-satellite...
Stopping RHN Taskomatic...
Stopped RHN Taskomatic.
Stopping cobbler daemon:                                   [  OK  ]
Stopping rhn-search...
Stopped rhn-search.
Stopping MonitoringScout ...  
	Stopping Dispatcher ...  [ OK ]
	Stopping Dequeuer ...  [ OK ]
	Stopping SputLite ...  [ OK ]
	Stopping NPBootstrap ...  [ OK ]
	Stopping InstallSoftwareConfig ...  [ OK ]
[ OK ]
Stopping Monitoring ...  
	Stopping TSDBLocalQueue ...  [ OK ]
	Stopping AckProcessor ...  [ OK ]
	Stopping Notifier ...  [ OK ]
	Stopping NotifLauncher ...  [ OK ]
	Stopping NotifEscalator ...  [ OK ]
	Stopping GenerateNotifConfig ...  [ OK ]
[ OK ]
Stopping httpd:                                            [  OK  ]
Stopping tomcat5:                                          [  OK  ]
Shutting down osa-dispatcher:                              [  OK  ]
Shutting down Oracle Net Listener ...                      [  OK  ]
Shutting down Oracle DB instance "rhnsat" ...              [  OK  ]
Shutting down Jabber router:                               [  OK  ]
Done.
[root@xen62 ~]# service rhn-search clean-index
Usage: /etc/init.d/rhn-search { console | start | stop | restart | status | dump | cleanindex }
[root@xen62 ~]# service rhn-search cleanindex
Stopping rhn-search...
rhn-search was not running.
09/09/07 13:13:30 INFO search.DeleteIndexes: Running query: deleteLastErrata
09/09/07 13:13:30 ERROR search.DeleteIndexes: Caught Exception: 
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in com/redhat/satellite/search/db/errata.xml.  
--- The error occurred while executing mapped statement.  
--- Check the deleteLastErrata.  
--- Check the statement or the result map.  
--- Cause: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:505)
	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:528)
	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:98)
	at com.redhat.satellite.search.db.WriteQuery.delete(WriteQuery.java:72)
	at com.redhat.satellite.search.DeleteIndexes.deleteQuery(DeleteIndexes.java:87)
	at com.redhat.satellite.search.DeleteIndexes.main(DeleteIndexes.java:118)
Caused by: 
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
	at java.sql.DriverManager.getConnection(DriverManager.java:316)
	at java.sql.DriverManager.getConnection(DriverManager.java:353)
	at com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)
	at com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
	at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
	... 6 more
09/09/07 13:13:30 ERROR search.DeleteIndexes: Unable to establish database connection.
09/09/07 13:13:30 ERROR search.DeleteIndexes: Ensure database is available and connection details are correct, then retry
Starting rhn-search...
[root@xen62 ~]# 

Moving to RELEASE_PENDING.
Comment 6 Brandon Perkins 2009-09-10 15:32:22 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.