[Freeswitch-users] database corruption errors

Brian May brian at microcomaustralia.com.au
Wed Aug 4 04:35:55 PDT 2010


When starting freeswitch I get a long list of errors, starting from:


2010-08-04 21:24:01.608710 [INFO] switch_core_sqldb.c:1275 Opening DB
2010-08-04 21:24:01.611895 [ERR] switch_core_sqldb.c:404 SQL ERR
[database disk image is malformed]
drop table channels
2010-08-04 21:24:01.615011 [ERR] switch_core_sqldb.c:404 SQL ERR
[database disk image is malformed]
drop table calls
2010-08-04 21:24:01.617641 [ERR] switch_core_sqldb.c:404 SQL ERR
[database disk image is malformed]
drop table interfaces
2010-08-04 21:24:01.620330 [ERR] switch_core_sqldb.c:404 SQL ERR
[database disk image is malformed]
drop table tasks
2010-08-04 21:24:01.623370 [ERR] switch_core_sqldb.c:404 SQL ERR
[database disk image is malformed]
PRAGMA synchronous=OFF;
2010-08-04 21:24:01.626318 [ERR] switch_core_sqldb.c:404 SQL ERR
[database disk image is malformed]
PRAGMA cache_size=8000
2010-08-04 21:24:01.628830 [DEBUG] switch_core_sqldb.c:765 SQL ERR
[database disk image is malformed]
[select hostname from complete]
Auto Generating Table!
2010-08-04 21:24:01.632166 [DEBUG] switch_core_sqldb.c:772 SQL ERR
[database disk image is malformed]
[CREATE TABLE complete (
   sticky  INTEGER,
   a1  VARCHAR(128),
   a2  VARCHAR(128),
   a3  VARCHAR(128),
   a4  VARCHAR(128),
   a5  VARCHAR(128),
   a6  VARCHAR(128),
   a7  VARCHAR(128),
   a8  VARCHAR(128),
   a9  VARCHAR(128),
   a10 VARCHAR(128),
   hostname VARCHAR(256)
);
]
2010-08-04 21:24:01.643766 [DEBUG] switch_core_sqldb.c:778 SQL ERR
[database disk image is malformed]
[CREATE TABLE complete (
   sticky  INTEGER,
   a1  VARCHAR(128),
   a2  VARCHAR(128),
   a3  VARCHAR(128),
   a4  VARCHAR(128),
   a5  VARCHAR(128),
   a6  VARCHAR(128),
   a7  VARCHAR(128),
   a8  VARCHAR(128),
   a9  VARCHAR(128),
   a10 VARCHAR(128),
   hostname VARCHAR(256)
);
]
2010-08-04 21:24:01.653300 [DEBUG] switch_core_sqldb.c:765 SQL ERR
[database disk image is malformed]
[select hostname from aliases]
Auto Generating Table!

[...]


Which leads to two concerns:

1. Why is it trying to drop everything when the database is corrupt?
(note: this is an older version now)

2. Which database is corrupt? Is there any command line tool I can use
to verify it is corrupt? Or repair it even?

Also not sure how it got to be corrupt in the first place. Might be
something to do with a power failure. Freeswitch seemed OK, but I
guess I should have checked the logs files at the time, the errors
started about the same time.

An automatic way of testing these files would be good, so I can ensure
I am alerted if something goes wrong again.

What is the best way to recover?
-- 
Brian May <brian at microcomaustralia.com.au>



More information about the FreeSWITCH-users mailing list