-------- Weitergeleitete Nachricht -------- Betreff: Re: [SR-Users] Kamailio 5.6.4 and htable dbmode=1 Datum: Mon, 17 Jul 2023 09:50:37 +0200 Von: Bernd Krueger-Knauber bkk@ednt.de An: miconda@gmail.com
Hi Daniel,
thank you for your response. As you can see in the provided debug output:
kamailio[]: DEBUG: htable [ht_api.c:1046]: ht_table_spec(): htable [callpush] - dbmode [1] kamailio[]: DEBUG: htable [ht_api.c:1027]: ht_table_spec(): htable [callpush] - dbtable [userpush] kamailio[]: DEBUG: htable [ht_api.c:1036]: ht_table_spec(): htable [callpush] - expire [86400] kamailio[]: DEBUG: htable [ht_api.c:1041]: ht_table_spec(): htable [callpush] - size [10]
dbmode is set to 1 in the config:
modparam("htable", "db_url", "sqlite:////etc/kamailio/htable.sqlite") ... modparam("htable", "htable", "userpush=>size=3;autoexpire=600;dbtable=userpush;dbmode=1")
If I execute
kamcmd htable.store userpush
I get Ok. Htable successfully stored to DB.
But the table is still empty!!!
In the log I found: ERROR: db_sqlite [dbase.c:528]: db_sqlite_commit(): sqlite commit failed: attempt to write a readonly database ERROR: db_sqlite [dbase.c:177]: db_sqlite_cleanup_query(): finalize failed: attempt to write a readonly database ERROR: htable [ht_db.c:668]: ht_db_delete_records(): failed to delete db records in [userpush] ERROR: db_sqlite [dbase.c:528]: db_sqlite_commit(): sqlite commit failed: attempt to write a readonly database
Ok. But I can not see this entries if I shutdown kamailio.
And: -rw-rw-rw- 1 kamailio root 16384 Jul 13 16:14 htable.sqlite
I never used:
modparam("db_sqlite","db_set_readonly" ...
I also restarted kamailio. no difference.
No more errors then before: It is not written at shutdown. (no messages) It is not written (live) (with error messages, but why it is readonly?) The message of kamcmd is wrong (says Ok but it failed)
Best regards,
Bernd
Am 17.07.2023 um 08:48 schrieb Daniel-Constantin Mierla: