I'm moving a FS installation from one Linux machine to another, and I'm getting this error: 2016-05-12 16:10:48.243672 [ERR] switch_core_sqldb.c:1197 SQL ERR: [select call_id,sip_user,sip_host,contact,status,rpid,expires,user_agent,server_user,server_host,profile_name,network_ip, network_port,0,sip_realm from sip_registrations where expires > 0 and expires <= 1463094648] database disk image is malformed The trouble is that it doesn't say which database disk image, since there are several (that start with "sofia_" that have that table. How do I find the broken one, or figure out what exactly the problem is? -- Steve
Core.db Thanks, Moishe Grunstein Tornado Computer Systems, Inc. 212.400.7650 888.IPPBX.US Service Request Email: support@nysolutions.com<mailto:support@nysolutions.com> [cid:image001.jpg@01C72F94.9EE45D60]<http://www.nysolutions.com/> Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Steven Schoch Sent: Thursday, May 12, 2016 7:14 PM To: freeswitch-users <freeswitch-users@lists.freeswitch.org> Subject: [Freeswitch-users] database disk image is malformed I'm moving a FS installation from one Linux machine to another, and I'm getting this error: 2016-05-12 16:10:48.243672 [ERR] switch_core_sqldb.c:1197 SQL ERR: [select call_id,sip_user,sip_host,contact,status,rpid,expires,user_agent,server_user,server_host,profile_name,network_ip, network_port,0,sip_realm from sip_registrations where expires > 0 and expires <= 1463094648] database disk image is malformed The trouble is that it doesn't say which database disk image, since there are several (that start with "sofia_" that have that table. How do I find the broken one, or figure out what exactly the problem is? -- Steve
Do you know what profile is in use at the time from any other logs? The name of the profile is in the db filename. The sofia_* db all regenerate anyway on restart so you could just delete all the sofia ones. On Thursday, May 12, 2016, Steven Schoch <schoch+freeswitch.org@xwin32.com> wrote:
I'm moving a FS installation from one Linux machine to another, and I'm getting this error:
2016-05-12 16:10:48.243672 [ERR] switch_core_sqldb.c:1197 SQL ERR: [select call_id,sip_user,sip_host,contact,status,rpid,expires,user_agent,server_user,server_host,profile_name,network_ip, network_port,0,sip_realm from sip_registrations where expires > 0 and expires <= 1463094648] database disk image is malformed
The trouble is that it doesn't say which database disk image, since there are several (that start with "sofia_" that have that table. How do I find the broken one, or figure out what exactly the problem is?
-- Steve
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬ ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900 https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA
I shut down freeswitch, removed all the sofia_*.db files, and restarted freeswitch. The error still occurs soon after log entries that say it pinged the providers (flowroute and sip2sip). The sofia_*.db files were recreated, and using sqlite3, they seem to have valid tables, although the sip_registrations table is empty in sofia_reg_external.db. The symptom of this problem is that outgoing calls work, but incoming calls are rejected, and Flowroute redirects it to the backup (sip2sip voicemail). core.db seems to be a valid database that has tables, but not sip_registrations (which I don't think it's supposed to have anyway). What will I lose if I delete core.db? I know voicemail_default.db has stuff that I don't want to lose, but what long-term stuff is in core.db? -- Steve On Thu, May 12, 2016 at 5:21 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote: Do you know what profile is in use at the time from any other logs? The
name of the profile is in the db filename.
The sofia_* db all regenerate anyway on restart so you could just delete all the sofia ones.
You should be able to rename the core.db, it will be recreated when you restart freeswitch. You can also move to postgres or a odbc for the core. Thanks, Moishe Grunstein Tornado Computer Systems, Inc. 212.400.7650 888.IPPBX.US Service Request Email: support@nysolutions.com<mailto:support@nysolutions.com> [cid:image001.jpg@01C72F94.9EE45D60]<http://www.nysolutions.com/> Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Steven Schoch Sent: Friday, May 13, 2016 12:35 AM To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] database disk image is malformed I shut down freeswitch, removed all the sofia_*.db files, and restarted freeswitch. The error still occurs soon after log entries that say it pinged the providers (flowroute and sip2sip). The sofia_*.db files were recreated, and using sqlite3, they seem to have valid tables, although the sip_registrations table is empty in sofia_reg_external.db. The symptom of this problem is that outgoing calls work, but incoming calls are rejected, and Flowroute redirects it to the backup (sip2sip voicemail). core.db seems to be a valid database that has tables, but not sip_registrations (which I don't think it's supposed to have anyway). What will I lose if I delete core.db? I know voicemail_default.db has stuff that I don't want to lose, but what long-term stuff is in core.db? -- Steve On Thu, May 12, 2016 at 5:21 PM, Anthony Minessale <anthony.minessale@gmail.com<mailto:anthony.minessale@gmail.com>> wrote: Do you know what profile is in use at the time from any other logs? The name of the profile is in the db filename. The sofia_* db all regenerate anyway on restart so you could just delete all the sofia ones.
I shut down freeswitch, removed core.db (and sofia_reg*.db), and restarted freeswitch. core.db was recreated, but I still get this message in the log file: 2016-05-13 08:29:16.382469 [ERR] switch_core_sqldb.c:1197 SQL ERR: [select call_id,sip_user,sip_host,contact,status,rpid,expires,user_agent,server_user,server_host,profile_name,network_ip, network_port,0,sip_realm from sip_registrations where expires > 0 and expires <= 1463153356] database disk image is malformed The messages immediately before that message were: FreeSWITCH Started Max Sessions [1000] Session Rate [30] SQL [Enabled] 2016-05-13 08:25:54.002477 [CONSOLE] mod_voicemail.c:4088 Event Thread Started 2016-05-13 08:26:10.282464 [WARNING] sofia.c:5912 Ping succeeded flowroute with code 200 - count 1/1/1, state UP 2016-05-13 08:26:10.422469 [WARNING] sofia.c:5912 Ping succeeded sip2sip with code 200 - count 1/1/1, state UP -- Steve On Fri, May 13, 2016 at 5:52 AM, Moishe Grunstein <max@nysolutions.com> wrote:
You should be able to rename the core.db, it will be recreated when you restart freeswitch.
what distro? Are you using the most recent sqlite3 package for that distro?
On May 13, 2016, at 11:34 AM, Steven Schoch <schoch+freeswitch.org@xwin32.com> wrote:
I shut down freeswitch, removed core.db (and sofia_reg*.db), and restarted freeswitch. core.db was recreated, but I still get this message in the log file:
2016-05-13 08:29:16.382469 [ERR] switch_core_sqldb.c:1197 SQL ERR: [select call_id,sip_user,sip_host,contact,status,rpid,expires,user_agent,server_user,server_host,profile_name,network_ip, network_port,0,sip_realm from sip_registrations where expires > 0 and expires <= 1463153356] database disk image is malformed
The messages immediately before that message were: FreeSWITCH Started Max Sessions [1000] Session Rate [30] SQL [Enabled] 2016-05-13 08:25:54.002477 [CONSOLE] mod_voicemail.c:4088 Event Thread Started 2016-05-13 08:26:10.282464 [WARNING] sofia.c:5912 Ping succeeded flowroute with code 200 - count 1/1/1, state UP 2016-05-13 08:26:10.422469 [WARNING] sofia.c:5912 Ping succeeded sip2sip with code 200 - count 1/1/1, state UP
-- Steve
On Fri, May 13, 2016 at 5:52 AM, Moishe Grunstein <max@nysolutions.com <mailto:max@nysolutions.com>> wrote: You should be able to rename the core.db, it will be recreated when you restart freeswitch.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi, This error message corresponds to sqlite3 SQLITE_CORRUPT error code. You may find this page interesting: https://www.sqlite.org/lockingv3.html#how_to_corrupt You can alternatively try to put your core db in RAM disk: https://freeswitch.org/confluence/display/FREESWITCH/SSD+Tuning+for+Linux#SSDTuningforLinux-FreeSWITCH'score.dbI/Obottleneck -- Best Regards, Vallimamod .
On 13 May 2016, at 17:34, Steven Schoch <schoch+freeswitch.org@xwin32.com> wrote:
I shut down freeswitch, removed core.db (and sofia_reg*.db), and restarted freeswitch. core.db was recreated, but I still get this message in the log file:
2016-05-13 08:29:16.382469 [ERR] switch_core_sqldb.c:1197 SQL ERR: [select call_id,sip_user,sip_host,contact,status,rpid,expires,user_agent,server_user,server_host,profile_name,network_ip, network_port,0,sip_realm from sip_registrations where expires > 0 and expires <= 1463153356] database disk image is malformed
The messages immediately before that message were: FreeSWITCH Started Max Sessions [1000] Session Rate [30] SQL [Enabled] 2016-05-13 08:25:54.002477 [CONSOLE] mod_voicemail.c:4088 Event Thread Started 2016-05-13 08:26:10.282464 [WARNING] sofia.c:5912 Ping succeeded flowroute with code 200 - count 1/1/1, state UP 2016-05-13 08:26:10.422469 [WARNING] sofia.c:5912 Ping succeeded sip2sip with code 200 - count 1/1/1, state UP
-- Steve
I'm pretty sure the core.db is not corrupted. I ran "sqlite3 core.db", dumped all the tables, and got no errors. Then I removed the entire core.db file and restart freeswitch. It still gave me those errors immediately after it created a brand new core.db. I don't want to go through the trouble of the RAM disk route until I find the root cause first. -- Steve On Fri, May 13, 2016 at 9:08 AM, Vallimamod Abdullah <vma@440hz.fr> wrote:
Hi,
This error message corresponds to sqlite3 SQLITE_CORRUPT error code. You may find this page interesting: https://www.sqlite.org/lockingv3.html#how_to_corrupt You can alternatively try to put your core db in RAM disk: https://freeswitch.org/confluence/display/FREESWITCH/SSD+Tuning+for+Linux#SSDTuningforLinux-FreeSWITCH'score.dbI/Obottleneck
-- Best Regards, Vallimamod
Make sure the filesystem perms are correct for the user that freeswitch is running as. It is safe to stop FreeSWITCH, remove the files, and allow FreeSWITCH to recreate them with the correct permissions. The only file that needs to hang around across reboots is the voicemail one which contains the metadata for any voicemails that are still on the system. If you are not using mod_voicemail on a particular FreeSWITCH install, it is also safe to delete. From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Steven Schoch Sent: Friday, May 13, 2016 11:18 AM To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] database disk image is malformed I'm pretty sure the core.db is not corrupted. I ran "sqlite3 core.db", dumped all the tables, and got no errors. Then I removed the entire core.db file and restart freeswitch. It still gave me those errors immediately after it created a brand new core.db. I don't want to go through the trouble of the RAM disk route until I find the root cause first. -- Steve On Fri, May 13, 2016 at 9:08 AM, Vallimamod Abdullah <vma@440hz.fr <mailto:vma@440hz.fr> > wrote: Hi, This error message corresponds to sqlite3 SQLITE_CORRUPT error code. You may find this page interesting: https://www.sqlite.org/lockingv3.html#how_to_corrupt You can alternatively try to put your core db in RAM disk: https://freeswitch.org/confluence/display/FREESWITCH/SSD+Tuning+for+Linux#SSDTuningforLinux-FreeSWITCH'score.dbI/Obottleneck -- Best Regards, Vallimamod
I'll try again: root@pbx:/var/lib/freeswitch/db# service freeswitch stop root@pbx:/var/lib/freeswitch/db# rm call_limit.db core.db directory.db fifo.db share_presence.db sofia_reg_*.db root@pbx:/var/lib/freeswitch/db# ls -l total 48 -rw-r--r-- 1 freeswitch freeswitch 49152 May 12 16:03 voicemail_default.db root@pbx:/var/lib/freeswitch/db# service freeswitch start root@pbx:/var/lib/freeswitch/db# ls -l total 564 -rw-r----- 1 freeswitch freeswitch 14336 May 13 09:39 call_limit.db -rw-r----- 1 freeswitch freeswitch 204800 May 13 09:39 core.db -rw-r----- 1 freeswitch freeswitch 2048 May 13 09:39 directory.db -rw-r----- 1 freeswitch freeswitch 5120 May 13 09:39 fifo.db -rw-r----- 1 freeswitch freeswitch 95232 May 13 09:39 share_presence.db -rw-r----- 1 freeswitch freeswitch 95232 May 13 09:39 sofia_reg_external.db -rw-r----- 1 freeswitch freeswitch 95232 May 13 09:39 sofia_reg_lan.db -rw-r--r-- 1 freeswitch freeswitch 49152 May 12 16:03 voicemail_default.db Hey! It worked! the DB error isn't there anymore! Now I can work on the next problem, which is that incoming calls are immediately rejected. That's just me digging through the logs, reading the documentation, and seeing what I messed up when I moved them to the new system. -- Steve On Fri, May 13, 2016 at 9:29 AM, Ken Rice <krice@freeswitch.org> wrote:
Make sure the filesystem perms are correct for the user that freeswitch is running as.
It is safe to stop FreeSWITCH, remove the files, and allow FreeSWITCH to recreate them with the correct permissions. The only file that needs to hang around across reboots is the voicemail one which contains the metadata for any voicemails that are still on the system. If you are not using mod_voicemail on a particular FreeSWITCH install, it is also safe to delete.
Sometime I reckon with this bug. FS restart fails and I need to remove all file in db directory. Is it possible to disable usage sqlite db files because I have configured pgsql storage? On Fri, May 13, 2016 at 7:49 PM, Steven Schoch < schoch+freeswitch.org@xwin32.com> wrote:
I'll try again: root@pbx:/var/lib/freeswitch/db# service freeswitch stop root@pbx:/var/lib/freeswitch/db# rm call_limit.db core.db directory.db fifo.db share_presence.db sofia_reg_*.db root@pbx:/var/lib/freeswitch/db# ls -l total 48 -rw-r--r-- 1 freeswitch freeswitch 49152 May 12 16:03 voicemail_default.db root@pbx:/var/lib/freeswitch/db# service freeswitch start root@pbx:/var/lib/freeswitch/db# ls -l total 564 -rw-r----- 1 freeswitch freeswitch 14336 May 13 09:39 call_limit.db -rw-r----- 1 freeswitch freeswitch 204800 May 13 09:39 core.db -rw-r----- 1 freeswitch freeswitch 2048 May 13 09:39 directory.db -rw-r----- 1 freeswitch freeswitch 5120 May 13 09:39 fifo.db -rw-r----- 1 freeswitch freeswitch 95232 May 13 09:39 share_presence.db -rw-r----- 1 freeswitch freeswitch 95232 May 13 09:39 sofia_reg_external.db -rw-r----- 1 freeswitch freeswitch 95232 May 13 09:39 sofia_reg_lan.db -rw-r--r-- 1 freeswitch freeswitch 49152 May 12 16:03 voicemail_default.db
Hey! It worked! the DB error isn't there anymore!
Now I can work on the next problem, which is that incoming calls are immediately rejected. That's just me digging through the logs, reading the documentation, and seeing what I messed up when I moved them to the new system.
-- Steve
On Fri, May 13, 2016 at 9:29 AM, Ken Rice <krice@freeswitch.org> wrote:
Make sure the filesystem perms are correct for the user that freeswitch is running as.
It is safe to stop FreeSWITCH, remove the files, and allow FreeSWITCH to recreate them with the correct permissions. The only file that needs to hang around across reboots is the voicemail one which contains the metadata for any voicemails that are still on the system. If you are not using mod_voicemail on a particular FreeSWITCH install, it is also safe to delete.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- tarantul Dios es Amor
Have you told it to use pgsql for everything? There are several places to put the DSN, core-dsn in switch.conf.xml and odbc-dsn in sofia.conf.xml for example. I believe it'll only create the sqlite files if it is going to be using them. On 20 May 2016 at 06:17, Nick 'tarantul' Novikov <tarantul@gmail.com> wrote:
Sometime I reckon with this bug. FS restart fails and I need to remove all file in db directory. Is it possible to disable usage sqlite db files because I have configured pgsql storage?
On Fri, May 13, 2016 at 7:49 PM, Steven Schoch < schoch+freeswitch.org@xwin32.com> wrote:
I'll try again: root@pbx:/var/lib/freeswitch/db# service freeswitch stop root@pbx:/var/lib/freeswitch/db# rm call_limit.db core.db directory.db fifo.db share_presence.db sofia_reg_*.db root@pbx:/var/lib/freeswitch/db# ls -l total 48 -rw-r--r-- 1 freeswitch freeswitch 49152 May 12 16:03 voicemail_default.db root@pbx:/var/lib/freeswitch/db# service freeswitch start root@pbx:/var/lib/freeswitch/db# ls -l total 564 -rw-r----- 1 freeswitch freeswitch 14336 May 13 09:39 call_limit.db -rw-r----- 1 freeswitch freeswitch 204800 May 13 09:39 core.db -rw-r----- 1 freeswitch freeswitch 2048 May 13 09:39 directory.db -rw-r----- 1 freeswitch freeswitch 5120 May 13 09:39 fifo.db -rw-r----- 1 freeswitch freeswitch 95232 May 13 09:39 share_presence.db -rw-r----- 1 freeswitch freeswitch 95232 May 13 09:39 sofia_reg_external.db -rw-r----- 1 freeswitch freeswitch 95232 May 13 09:39 sofia_reg_lan.db -rw-r--r-- 1 freeswitch freeswitch 49152 May 12 16:03 voicemail_default.db
Hey! It worked! the DB error isn't there anymore!
Now I can work on the next problem, which is that incoming calls are immediately rejected. That's just me digging through the logs, reading the documentation, and seeing what I messed up when I moved them to the new system.
-- Steve
On Fri, May 13, 2016 at 9:29 AM, Ken Rice <krice@freeswitch.org> wrote:
Make sure the filesystem perms are correct for the user that freeswitch is running as.
It is safe to stop FreeSWITCH, remove the files, and allow FreeSWITCH to recreate them with the correct permissions. The only file that needs to hang around across reboots is the voicemail one which contains the metadata for any voicemails that are still on the system. If you are not using mod_voicemail on a particular FreeSWITCH install, it is also safe to delete.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- tarantul Dios es Amor
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (8)
-
Anthony Minessale
-
Ken Rice
-
Michael Jerris
-
Moishe Grunstein
-
Nick 'tarantul' Novikov
-
Steven Ayre
-
Steven Schoch
-
Vallimamod Abdullah