Quarantine Database is Malformed, or Missing Messages. Rebuild QMS Without Mail Flow Interruption.

  • 7020339
  • 22-Apr-2008
  • 07-Aug-2017

Environment


GWAVA 4 / 5 / 6
Linux OES, SLES 9.3, SLES 10.x, SLES 11.x
Windows Server 2003, 2008, 2012
NetWare 6.5.x, 6.0.x, 5.1.x
SQLite Database

Situation

No mail in Quarantine back to a certain date Error in QMS log or on console, "Database is malformed…" Error in QMS log or on console, "DB Error: file is encrypted or is not a database" Error in QMS log or on console, "Failed to Write Records: Error 9" No message envelope when trying to release a quarantined message.

Resolution



This method of rebuilding the quarantine database will allow the QMS rebuild to occur while mail continues to flow uninterrupted.
If your GWAVA server is already using Postgre (for example GWAVA 6 appliances) you should not run the following steps.

NOTE:  All quarantine access will be disabled during rebuild.  All mail to be quarantined will be queued during rebuild.


 
Linux:

1) Unload GWAVAQMS.  Type "rcgwavaman stop gwavaqms" at the terminal


2) Change directory to /opt/beginfinite/gwava/assets/bin/linux/x32 (for GWAVA 4 / 5 you'll need to go to /opt/beginfinite/gwava/assets/bin/)

3)  Run GWAVAQMS with rebuild switch.  Type ./qms2 /recovery=rebuild /consolelog at the terminal.  (Do this process while GWAVA is running to maintain mail flow during rebuild)


**NOTE**

If using GWAVA4 version 1.03 or earlier, use ./gwavaqms /recovery=rebuild /consolelog instead.

When in a cluster environment, the gwavaman address needs to be included, for example ./qms2 /recovery=rebuild /consolelog /gmanAddress=10.1.1.58(IP address of the resource)
For more information on cluster resources in Linux check this link for the Clustering how-to guide (https://support.microfocus.com/kb/doc.php?id=7020502)

There's an optional switch that may be used at the end, /recoverdays=x.  Replace the x with the number of days you would like to recover from your quarantine.
For example: ./qms2 /recovery=rebuild /consolelog /recoverdays=7
will perform the rebuild, and recover the last 7 days worth of email from the QMS.  This switch is useful for speeding up the rebuild process and reducing the size of the database.

4) Wait for the rebuild to complete.


5)  After the rebuild GWAVAQMS will unload itself.  Reload all of gwava to make sure everything loads correctly. Type rcgwavaman stop at the terminal.


6)   Type rcgwavaman start to reload GWAVA.

 



Windows:

1) Unload GWAVAQMS by opening services.msc (start/run/services.msc), right click on GWAVAQMS and choose 'Stop'.



2) Load QMS with rebuild switch by:

a) Open a command prompt

b) Browse to C:\programfiles\gwava\gwava5\assets\bin

c) Type: qms2.exe /recovery=rebuild /consolelog

d) The QMS log file should open. Watch for the rebuild to complete. When it is finished it will say that the recovery operations have completed and to restart the QMS.

e) Stop the QMS by closing the GWAVAQMS window that opened when the rebuild was started.

f) Start the QMS by opening services, right click on gwavaqms and choose start.

For information on how to minimize future database corruptions:
https://support.microfocus.com/kb/doc.php?id=421




NetWare:

1.) Unload QMS2.  Type "unload address space=gwava4qms" at the system console. 



Wait for QMS to unload...



2)  Load GWAVAQMS manually from the command line, by typing:
load address space=gwava4qms qms2 /recovery=rebuild /consolelog

**NOTE**

if using GWAVA4 version 1.03 or earlier, use load address space=gwava4qms gwavaqms /recovery=rebuild /consolelog

When in a cluster environment, the gwavaman address needs to be included, for example load address space=gwava4qms qms2 /recovery=rebuild /consolelog /gmanAddress=10.1.1.152(IP address of the resource)
For more information on cluster resources in Netware check this link https://support.microfocus.com/kb/doc.php?id=343

There's an optional switch that may be used at the end, /recoverdays=x.  Replace the x with the number of days you would like to recover from your quarantine.  For example,
load address space=gwava4qms qms2 /recovery=rebuild /consolelog /recoverdays=7
will perform the rebuild, and recover the last 7 days worth of email from the QMS.  This switch is useful for speeding up the rebuild process and reducing the size of the database. 

3)  Take a look on the GWAVAQMS2 server console to see if the rebuild is in process



Then wait for the rebuild to complete:



4)  Upon completion unload GWAVA4 by typing gwavadn at the system console.

 5) Then start GWAVA4 back up using gwavaup

 

Additional Information

This article was originally published in the GWAVA knowledgebase as article ID 235.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.