[Freeswitch-users] Problems with sqlite on 32bit CentOS

Helmut Kuper helmut.kuper at ewetel.de
Mon Sep 6 07:45:14 PDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I have a freshly checked out FS code base (git). bootsrapping,
configuring, compiling and installing went smoothly.

It's a "Linux ippbx-test-node0 2.6.18-194.11.3.el5 #1 SMP Mon Aug 30
16:23:24 EDT 2010 i686 i686 i386 GNU/Linux" CentOS 5.5 Pentium4 system.

When it starts up, I get a lot of error messages about
accessing/creating sqlite database tables. This error occurs on updated
installations as well as on fresh installations. It occurs on existing
database files and also when all db files were removed befor start up.

I have an old SVN trunk version "FreeSWITCH Version 1.0.trunk (16134M)"
which works fine on the same machine.

On my CentOS 5.4 64bit machines the latest git head works nice.



Here a bit of the startup logs of lates git head version:

2010-09-06 15:54:58.580865 [INFO] switch_core_sqldb.c:1528 Opening DB
2010-09-06 15:54:58.581658 [ERR] switch_core_sqldb.c:448 SQL ERR [no
such table: channels]
drop table channels
2010-09-06 15:54:58.581886 [ERR] switch_core_sqldb.c:448 SQL ERR [no
such table: calls]
drop table calls
2010-09-06 15:54:58.582027 [ERR] switch_core_sqldb.c:448 SQL ERR [no
such table: interfaces]
drop table interfaces
2010-09-06 15:54:58.582157 [ERR] switch_core_sqldb.c:448 SQL ERR [no
such table: tasks]
drop table tasks
2010-09-06 15:54:58.582491 [DEBUG] switch_core_sqldb.c:815 SQL ERR [no
such table: complete]
[select hostname from complete]
Auto Generating Table!
2010-09-06 15:54:58.582661 [DEBUG] switch_core_sqldb.c:822 SQL ERR [no
such table: complete]
[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-09-06 15:54:58.588655 [DEBUG] switch_core_sqldb.c:815 SQL ERR [no
such table: aliases]
[select hostname from aliases]
Auto Generating Table!
2010-09-06 15:54:58.588911 [DEBUG] switch_core_sqldb.c:822 SQL ERR [no
such table: aliases]
[CREATE TABLE aliases (
   sticky  INTEGER,
   alias  VARCHAR(128),
   command  VARCHAR(4096),
   hostname VARCHAR(256)
);
]
2010-09-06 15:54:58.589953 [DEBUG] switch_core_sqldb.c:815 SQL ERR [no
such table: nat]
[select hostname from nat]
Auto Generating Table!
2010-09-06 15:54:58.590176 [DEBUG] switch_core_sqldb.c:822 SQL ERR [no
such table: nat]
[CREATE TABLE nat (
   sticky  INTEGER,
        port    INTEGER,
        proto   INTEGER,
   hostname VARCHAR(256)
);
]
2010-09-06 15:54:58.592369 [ERR] switch_core_sqldb.c:448 SQL ERR [no
such table: main.channels]
CREATE TABLE channels (
   uuid  VARCHAR(256),
   direction  VARCHAR(32),
   created  VARCHAR(128),
   created_epoch  INTEGER,
   name  VARCHAR(1024),
   state  VARCHAR(64),
   cid_name  VARCHAR(1024),
   cid_num  VARCHAR(256),
   ip_addr  VARCHAR(256),
   dest  VARCHAR(1024),
   application  VARCHAR(128),
   application_data  VARCHAR(4096),
   dialplan VARCHAR(128),
   context VARCHAR(128),
   read_codec  VARCHAR(128),
   read_rate  VARCHAR(32),
   write_codec  VARCHAR(128),
   write_rate  VARCHAR(32),
   secure VARCHAR(32),
   hostname VARCHAR(256),
   presence_id VARCHAR(4096),
   presence_data VARCHAR(4096),
   callstate  VARCHAR(64),
   callee_name  VARCHAR(1024),
   callee_num  VARCHAR(256),
   callee_direction  VARCHAR(5),
   call_uuid  VARCHAR(256)
);
create index uuindex on channels (uuid,hostname);
create index uuindex2 on channels (call_uuid,hostname);

2010-09-06 15:54:58.593489 [ERR] switch_core_sqldb.c:448 SQL ERR [no
such table: main.calls]
CREATE TABLE calls (
   call_uuid  VARCHAR(255),
   call_created  VARCHAR(128),
   call_created_epoch  INTEGER,
   function  VARCHAR(1024),
   caller_cid_name  VARCHAR(1024),
   caller_cid_num   VARCHAR(256),
   caller_dest_num  VARCHAR(256),
   caller_chan_name VARCHAR(1024),
   caller_uuid      VARCHAR(256),
   callee_cid_name  VARCHAR(1024),
   callee_cid_num   VARCHAR(256),
   callee_dest_num  VARCHAR(256),
   callee_chan_name VARCHAR(1024),
   callee_uuid      VARCHAR(256),
   hostname VARCHAR(256)
);
create index eruuindex on calls (caller_uuid,hostname);
create index eeuuindex on calls (callee_uuid,hostname);
create index eeuuindex2 on calls (call_uuid,hostname);

2010-09-06 15:54:58.594950 [ERR] switch_core_sqldb.c:448 SQL ERR [no
such table: complete]
delete from complete where sticky=0
2010-09-06 15:54:58.595189 [ERR] switch_core_sqldb.c:448 SQL ERR [no
such table: aliases]
delete from aliases where sticky=0
2010-09-06 15:54:58.595362 [ERR] switch_core_sqldb.c:448 SQL ERR [no
such table: nat]
delete from nat where sticky=0



Accessing manually the db core file I see only one table:

sqlite3 db/core.db
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> .tables
tasks
sqlite> .schema tasks
CREATE TABLE tasks (
   task_id             INTEGER,
   task_desc           VARCHAR(4096),
   task_group          VARCHAR(1024),
   task_sql_manager    INTEGER,
   hostname VARCHAR(256)
);
sqlite>

ls -l db/
- -rw-r--r-- 1 ippbx voip  14336 27. Aug 16:07 call_limit.db
- -rw-r--r-- 1 ippbx voip 129024  6. Sep 16:43 core.db
- -rw-r--r-- 1 ippbx voip   2048 27. Aug 16:07 fifo.db
- -rw-r--r-- 1 ippbx voip  61440  6. Sep 16:43 sofia_reg_external.db
- -rw-r--r-- 1 ippbx voip  61440  6. Sep 16:43 sofia_reg_internal.db
- -rw-r--r-- 1 ippbx voip  61440  6. Sep 16:43 sofia_reg_internal-ipv6.db


Andy hints, what's wrong here?


regards
helmut



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)

iD8DBQFMhP554tZeNddg3dwRAvMRAJ9V+vwAR9U3GRoOTfbufeKqR+W3MwCaA1JU
lmE6iBv77Ej35yz/cPSG/QY=
=CDbX
-----END PGP SIGNATURE-----



More information about the FreeSWITCH-users mailing list