Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
rsm
New Contributor III

Database error - database disk image is malformed

Hi all

I have upgraded our FortiManager to v.7.6.5. When I am trying to install policy on one of our Fortigates, the installation fails with the following message:

 

Commit failed:
error -999 - Database Error - database disk image is malformed

 Our Fortimanager is a VM on VMware, so I extended the disk space but I still get the message above. If I now run "Diagnose pm2 check-integrity all" I get the following:

--- pragma integrity_check adom db ---
--- total: 19 ok.
--- pragma integrity_check device db ---
pragma integrity_check fails: /var/pm2/devdb213 -- Tree 18 page 2866 cell 204: Rowid 11301 out of order

>>> total: 4 failed: 1
--- pragma integrity_check global db ---
--- total: 2 ok.
--- pragma integrity_check ips db ---
--- total: 3 ok.
--- pragma integrity_check task db ---
--- total: 1 ok.
--- pragma integrity_check ncmdb db ---
--- total: 22 ok.

 

I ran the other commands in FortiManager database checking tools - Fortinet Community but they don't seem to have done anything. 

 

Can anyone help me out please? I'm now stuck with an unusable FortiManager, as I cannot install a policy.  Any commands to fix db would be helpful.

 

Thanks

Roy

4 REPLIES 4
mpapisetty
Staff
Staff

Hi @rsm ,

The easiest way to recover is to restore a known working backup that was taken prior to the upgrade and run integrity checks and then perform the upgrade. 

 

If you do not have a known good backup, could you try running the command "diag cdb upgrade check resync-dev-vdoms" and check the output? 

HTH
Manoj Papisetty
rsm
New Contributor III

Hi

 

I would rather not go back to back up as I like to understand what has happened. I'd be concerned that if I revert back then upgrade again, I get the same issue. 

 

I ran 'diag cdb upgrade check resync-dev-vdoms' and the output is:

 

Checking: Resync and add any missing vdoms from device database to DVM database
No error found.

 

What I find strange, is that I can install a policy on another FortiGate fine but this gives me the error. So does /var/pm2/devdb213 refer to this FortiGate?

 

Thanks

Roy

mpapisetty

Hi @rsm ,

Yes. The error indeed refers to a particular FGT that has a problem. Not the entire FMG. Another way to recover would be to remove this FGT from the FMG and re-add and import policies. 

 

If you need a detailed root cause and next steps, I would rather recommend opening a support ticket. 

HTH
Manoj Papisetty
rsm
New Contributor III

So, I've managed to resolve the issue. I kept trying to install the policy and device setting separately, which kept throwing the errors. I also removed the CLI template and applying policy, which obviously threw up errors. But then when I re-assigned the template, the install wizard completed. 

I've tried this a few times and the the installation is successful and DB integrity checks are all good now. 

I can only assume that some configuration setting was not getting applied correctly but doing what I did, the incorrect setting has been removed. 

Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors