Hi Jonathan,

1) I guess you use the check_blacklist() script function with the wrong parameter. Indeed, the DB table is created as "globalblacklist", so you need to be careful and pass this table name via the script functions (and not the faulty "global_blacklist")

2) check your "version" table (in the opensips DB) - you must have there a record containing like this:
https://github.com/OpenSIPS/opensips/blob/master/scripts/mysql/userblacklist-create.sql#L1

Regards and A Happy New Year,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/

On 12/27/2018 03:40 PM, Jonathan Mabrito wrote:
I am working on implementing the userblacklist Module and having a few issues with it. I am running OpenSIPS 2.4.4 on Ubuntu 16.04 (using APT to install it).

1.) In regards to the Global Blacklist, the script creates a table called "globalblacklist" and it looks like the code is looking for a table called "global_blacklist" instead. I found the userblacklist-create.sql script and created the global_blacklist table and all is good. What is the proper DB table name? Was the script not updated or is the code wrong?

Here is a INFO debug statement when it queries the global_blacklist table: INFO:userblacklist:reload_sources: got 1 entries from 'global_blacklist'

If I run the FIFO command to reload the list, it also errors out if I do not have the global_blacklist table (which is how I figured out it was looking for a different table name in the first place).

2.) Having some issues on the start of OpenSIPS over time after turning on the userblacklist module. After I implemented the userblacklist module and all was working, I was working on the Event_RabbitMQ module and restarted the service to reload the script. I started seeing the following:

ERROR:core:db_check_table_version: querying version for table userblacklist
ERROR:userblacklist:db_init: during table version check.
ERROR:core:init_mod_child: failed to initializing module userblacklist, rank 10

ERROR:core:db_check_table_version: invalid version 0 for table userblacklist found, expected 2
ERROR:userblacklist:db_init: during table version check.
ERROR:core:init_mod_child: failed to initializing module userblacklist, rank 10
ERROR:core:tcp_start_processes: init_children failed

I honestly have no idea how its getting a version 0 on the userblacklist table. I see in the version table, its set to 2. I tried setting that to 0 and no luck, same message. I went ahead and dropped the userblacklist and globalblacklist tables, removed the entries in the version table and re-ran the SQL script. The service came online.

This morning, I updated the script to change a IP and restarted the service. Same issue with the DB versions of the userblacklist table. If I dropped the tables and re-ran the SQL script, the service came online.

Any ideas on this one?
--
-Jonathan


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to