In the last couple of days, I’ve started to get
WARNING db.c: Couldn’t execute statement: SQL logic error or missing database
messages to any attempt to update my asterisk database. The database has 664 entries in it, and reached this point only a couple of days ago.
Through the asterisk commandline, I can successfully query the contents of the database, but cannot update it. For example:
rutherford*CLI> database show Majordomo UCFN
1 results found.
rutherford*CLI> database get Majordomo UCFN
rutherford*CLI> database put Majordomo UCFN 8885551212
Failed to update entry
[2021-04-19 19:08:17.439] WARNING: db.c:348 ast_db_put: Couldn’t execute statement: SQL logic error or missing database
I have taken asterisk down, and been successful at reading, updating, and deleting from the astdb.sqlite3 table using the sqlite3 commandline tool. The database file does not seem to have any inconsistancies, and the file is readable. I’ve even duplicated (by exporting through the sqlite3 commandline) the database file; the duplicate suffers the same errors as the original when accessed by Asterisk.
I’m running Asterisk 18.1 on a 64-bit Slackware 14.2 system, with 4Gi memory and 500Mb of hard drive. My system shows only 541Mi used memory, with none of my 31Gi swap in use. Asterisk ulimit address-space size and data-size have been set to “unlimited”.
Does anyone have any suggestions as to what could be causing this DB update failure, and/or how to debug or fix it?