To troubleshoot this issue, determine if the database corrupted or full.
To check if the database is corrupted:
Verify if vCloud Usage Meter has been installed recently. In such case, the Postgres Database must have been overwritten by the importum tool.
To restore the database, complete the following steps:
- Create a backup/snapshot of the vCloud Usage Meter VM.
- Connect to vCloud Usage Meter VM using SSH or vCenter Console.
Note: The root user is squashed in SSH, use usgmtr as an alternate and su to root.
- Run the sql command to login to Database.
- Run the postgres database list command \l.
You should see two databases with usgmtr in the name.
- Copy the name of the usgmtr Database that is appended with a date.
database usgmtr_<yyyymmdd>_<hhmmss>
- Quit postgres using \q command.
- Stop tomcat service:
service tomcat stop
- Rename current usgmtr database and rename original database using these commands:
sql
alter database usgmtr rename to usgmtr_backup;
alter database <database name copied from earlier> rename to usgmtr;
\q
- Start tomcat service using this command:
service tomcat start
- Log in to the vCloud Usage Meter again and verify if you are able to login without error.
To check if the disk is full:
- Connect to the vCloud Usage Meter VM using SSH or vCenter Console.
Note: The root user is squashed in SSH, use usgmtr as an alternate and su to root.
- Run the df -h command to check if the disk is full.
Note: Look for the line with /dev/sda3. If the disk is full, it will show Use% as 100%. To resolve this issue, see Extending the VMware vCloud Usage Meter root partition (341916).