Kbase 19893: SonicMQ: Restarting Broker w/Cloudscape DB After Crash
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  08/11/2002 |
|
SUMMARY:
This solution applies to SonicMQ Versions 2000.x, 3.x, and 4.x. It
discusses crash recovery of the embedded Cloudscape database which
comes with SonicMQ.
EXPLANATION:
When the SonicMQ broker starts and connects to the Cloudscape
database, a database lock file (db.lck) is created. This file
exists while the broker is running. If the broker is shut down
using SonicMQ Explorer or the command line Admin tool, this file is
deleted. If the broker crashes or is brought down in any other way
(for example, with CTRL-C), the .lck file remains.
After a non-administrative shutdown of a SonicMQ broker running on
Unix or Linux, attempts to restart the broker will fail with the
following exceptions and error messages:
SQL Exception: Failed to start database '/usr/SonicMQ/SonicMQDB',
see the next exception for details.
at c8e.l.h._uv(Unknown Source)
at c8e.l.h._uv(Unknown Source)
at c8e.l.h.generateCsSQLException(Unknown Source)
at c8e.l.n.ic_(Unknown Source)
at c8e.l.n.<init>(Unknown Source)
at c8e.bc.e.<init>(Unknown Source)
at c8e.bc.c.getNewLocalConnection(Unknown Source)
at c8e.l.r.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:146)
at progress.message.db.Database.zR_(:1577)
at progress.message.db.Database.<init>(:233)
at progress.message.db.Database.<init>(:77)
at progress.message.broker.BrokerDatabase.<init>(:377)
at progress.message.broker.AgentRegistrar.<init>(:366)
at progress.message.broker.Broker.<init>(:347)
at progress.message.broker.Broker.main(:243)
SQLException(SQLState=XJ040, errorCode=40000):
Failed to start database'/usr/SonicMQ/SonicMQDB', see the next
exception for details.
SQLException(SQLState=XSDB8, errorCode=45000): WARNING: Cloudscape
(instance [Ljava.lang.Object;@27e353) is attempting to boot the
database {1} even though cloudscape (instance {2}) may still be active.
Only one instance of cloudscape should boot a database at a time.
Severe and non-recoverable corruption can result if 2 instances of
cloudscape boot on the same database at the same time. The cloudscape.database.forceDatabaseLock=true property
has been set, so the database will not boot until the db.lck is no
onger present. Normally this file is removed when the first instance
of cloudscape to boot on the database exits, but it may be left behind
in some shutdowns. It will be necessary to remove the file by hand in
that case. It is important to verify that no other VM is accessing the
database before deleting the db.lck file by hand.
[146] progress.message.broker.EStartupFailure: Problem with database:
[2002] progress.message.db.EDatabaseException:
SQL Exception: Failed to start database '/usr/SonicMQ/SonicMQDB',
see the next exception for details.
SOLUTION:
On Windows, the db.lck file is deleted by Cloudscape automatically
during restart, allowing the broker to successfully start. On UNIX and
Linux platforms, however, Cloudscape can't determine if the file was
left over as a result of a crash, or if it indicates that a process is
still accessing the database. Therefore, on UNIX and Linux the db.lck
file must be deleted manually. If this file is not deleted, the
broker will not start.
References To Written Documentation:
SonicMQ 3.x Installation and Administration Guide
SonicMQ 4.x Configuration and Administration Guide
Sonic Knowledge Base Solution 20548:
SonicMQ: Why Did My Broker Take Longer To Start This Time?