SQL ERR

Status
Not open for further replies.

kp123

New Member
Feb 6, 2017
19
1
3
43
FreeSWITCH Version 1.10.2 Fusionpbx 4.4 . Debian 9.

I am getting these errors in my FS log:

020-08-06 21:28:07.613481 [CRIT] switch_core_sqldb.c:2163 ERROR [file is encrypted or is not a database], [db="core",type="core_db"]
2020-08-06 21:28:07.613481 [ERR] switch_core_sqldb.c:732 [db="core",type="core_db"] NATIVE SQL ERR [cannot commit - no transaction is active]
COMMIT
2020-08-06 21:28:07.613481 [ERR] switch_core_sqldb.c:732 [db="core",type="core_db"] NATIVE SQL ERR [file is encrypted or is not a database]
BEGIN EXCLUSIVE
2020-08-06 21:28:07.613481 [CRIT] switch_core_sqldb.c:2163 ERROR [file is encrypted or is not a database], [db="core",type="core_db"]
2020-08-06 21:28:07.613481 [ERR] switch_core_sqldb.c:732 [db="core",type="core_db"] NATIVE SQL ERR [cannot commit - no transaction is active]
COMMIT
2020-08-06 21:28:07.613481 [ERR] switch_core_sqldb.c:732 [db="core",type="core_db"] NATIVE SQL ERR [file is encrypted or is not a database]
BEGIN EXCLUSIVE
2020-08-06 21:28:07.613481 [CRIT] switch_core_sqldb.c:2163 ERROR [file is encrypted or is not a database], [db="core",type="core_db"]
2020-08-06 21:28:07.613481 [ERR] switch_core_sqldb.c:732 [db="core",type="core_db"] NATIVE SQL ERR [cannot commit - no transaction is active]
COMMIT
2020-08-06 21:28:07.613481 [ERR] switch_core_sqldb.c:732 [db="core",type="core_db"] NATIVE SQL ERR [file is encrypted or is not a database]
BEGIN EXCLUSIVE
2020-08-06 21:28:07.613481 [CRIT] switch_core_sqldb.c:2163 ERROR [file is encrypted or is not a database], [db="core",type="core_db"]
2020-08-06 21:28:07.613481 [ERR] switch_core_sqldb.c:732 [db="core",type="core_db"] NATIVE SQL ERR [cannot commit - no transaction is active]
 

gflow

Active Member
Aug 25, 2019
262
28
28
I just had the same thing this morning, crashed my system. Freeswitch 1.8 and Fusion 4.4.

It's been running flawlessly for over 12 months then this, even after restarting freeswitch I wasn't getting any registrations, so I restored a backup from earlier in the night.

Are you still running that same machine or did you build a new one and have you run into it again?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
If you are using sqlite for this db which most of us are you can just delete it and restart freeswitch.

Many of us run with this in tmpfs

eg: in /etc/fstab:

Code:
tmpfs /var/lib/freeswitch/db tmpfs defaults 0 0

So:

Code:
service freeswitch stop
rm /var/lib/freeswitch/db/*
service freeswitch start

Freeswitch will recreate the DB as it starts.

If you just want to do the core db, then:

Code:
rm /var/lib/freeswitch/db/core.db
 
  • Like
Reactions: gflow

gflow

Active Member
Aug 25, 2019
262
28
28
Thanks for the info. I seem to be getting these sqlite errors every now and then, this was by the worst though. They all happen at exactly 6:30am in the morning as well and thats exactly the time the cron job is set for to run the FusionPBX backup and maintenance scripts (just disabled them). Have you found them to an issue at all?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
No, I do not use the backup scripts, there is definitely no need to back this db up

Also, do you have it running in tmpfs? That should make life easier.
 

gflow

Active Member
Aug 25, 2019
262
28
28
The weird thing is the FusionPBX backup and maintenance scripts HERE don't have anything to do with the sqlite DB. However my issue occurred at the exact time the backup and maintenance scripts run, but i've had a couple of other smaller issues with SQLite and they all started at exactly 6:20am which is when those scripts run. My monitoring system shows those scripts utilise a lot of CPU resources while they are running, so my guess is as they were taking up so much CPU resources sqlite encounted some issues and crashed.

I'll look at moving my sqlite into the tmpfs, thanks for the tip.
 
Status
Not open for further replies.