<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Jonathan,<br>
<br>
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")<br>
<br>
2) check your "version" table (in the opensips DB) - you must have
there a record containing like this:<br>
<a class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/blob/master/scripts/mysql/userblacklist-create.sql#L1">https://github.com/OpenSIPS/opensips/blob/master/scripts/mysql/userblacklist-create.sql#L1</a><br>
<br>
Regards and A Happy New Year,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit 2019
<a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2019Amsterdam/">https://www.opensips.org/events/Summit-2019Amsterdam/</a>
</pre>
<div class="moz-cite-prefix">On 12/27/2018 03:40 PM, Jonathan
Mabrito wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAL4wWrhvcaBwBJqB__+H5OuH_oxDfSB3Rw1ZYrEeRBrKOj5pTg@mail.gmail.com">
<div dir="ltr">
<div>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). </div>
<div><br>
</div>
<div>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?</div>
<div><br>
</div>
<div>Here is a INFO debug statement when it queries the
global_blacklist table: <a class="moz-txt-link-freetext" href="INFO:userblacklist:reload_sources">INFO:userblacklist:reload_sources</a>: got
1 entries from 'global_blacklist'</div>
<div><br>
</div>
<div>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). </div>
<div><br>
</div>
<div>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:</div>
<div><br>
</div>
<div>ERROR:core:db_check_table_version: querying version for
table userblacklist</div>
<div>ERROR:userblacklist:db_init: during table version check.</div>
<div>ERROR:core:init_mod_child: failed to initializing module
userblacklist, rank 10</div>
<div><br>
</div>
<div>ERROR:core:db_check_table_version: invalid version 0 for
table userblacklist found, expected 2</div>
<div>ERROR:userblacklist:db_init: during table version check.</div>
<div>ERROR:core:init_mod_child: failed to initializing module
userblacklist, rank 10</div>
<div>ERROR:core:tcp_start_processes: init_children failed</div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>Any ideas on this one?</div>
</div>
-- <br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">-Jonathan</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>