<div dir="ltr">Hi Both,<div><br></div><div>Juha - Thanks for sharing your config , I tweaked the values in my config but still experience the same issue.</div><div><br></div><div>Daniel - We're not using the utils module, although we are using siputils and cfgutils. OS is stock Debian 10 and GCC is version 8.3.0<br><br>For what it's worth I edited the "Bad config - you can not call 'handle_publish' function" log line to include the value for <i>pres_library_mode </i>and it appears to be set to 10. Where that's coming from, I have no idea.<br><br>Thanks again</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 10, 2021 at 6:10 PM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hello,</p>
<p>do you use utils module? If yes, what is your operating system
and the compiler version (if you compiled from sources, not
installing from packages)?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 10.05.21 15:01, Marrold wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">Hi,
<div><br>
</div>
<div>We're trying to upgrade from 5.3.X to 5.4.5 however
kamailio will not start and produces the following error,
despite the db_url being set in the config and printed in
the logs:</div>
<div><br>
</div>
<div><font face="monospace">Bad config - you can not call
'handle_publish' function (db_url not set)</font><br>
</div>
<div><br>
</div>
<div>Looking at the code this error only seems plausible if
the <i>pres_library_mode</i> is set to 1 <a href="https://github.com/kamailio/kamailio/blob/cc2a9518207e36b7b18aef5c8714f0c21da3dd95/src/modules/presence/presence.c#L296" target="_blank">here</a> but we
don't see the corresponding "switch to library mode"
message in the debug logs which leaves me a bit stuck -
I've included the grepped logs at the bottom of the
message.<br>
<br>
Does anyone have any ideas what is causing this issue?
I've seen a previous issue relating to interactions
between presence and presence_xml which we're also using,
but it looks like this was fixed in an older version.</div>
<div><br>
</div>
<div>Any suggestions appreciated.<br>
<br>
<font face="monospace"># ----- presence params -----<br>
modparam("presence", "db_url", DBURL)<br>
modparam("presence", "db_update_period", 20)<br>
modparam("presence", "clean_period", 60)<br>
modparam("presence", "local_log_facility", "LOG_LOCAL3")<br>
modparam("presence", "max_expires", 14430)<br>
<br>
# ----- presence_xml params -----<br>
modparam("presence_xml", "db_url", DBURL)<br>
modparam("presence_xml", "force_active", 1)</font><br>
</div>
<div><br>
</div>
<div><font face="monospace">root@kamailio:/etc/kamailio#
grep -i "presence" /var/log/kamailio/kamailio.log<br>
May 10 12:44:14 kamailio /sbin/kamailio[23729]: ERROR:
presence [presence.c:656]: fixup_presence(): Bad config
- you can not call 'handle_publish' function (db_url not
set)<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/cfg.y:1810]: yyparse(): loading module presence.so<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:525]: load_module(): trying to load
</lib64/kamailio/modules/presence.so><br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/kemi.c:2927]: sr_kemi_modules_add(): adding
module: presence<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:287]: register_module(): register PV
from: presence<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/cfg.lex:1796]: pp_define(): defining id:
MOD_presence<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/cfg.y:1810]: yyparse(): loading module
presence_xml.so<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:525]: load_module(): trying to load
</lib64/kamailio/modules/presence_xml.so><br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/kemi.c:2927]: sr_kemi_modules_add(): adding
module: presence_xml<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/cfg.lex:1796]: pp_define(): defining id:
MOD_presence_xml<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/cfg.y:1810]: yyparse(): loading module
presence_mwi.so<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:525]: load_module(): trying to load
</lib64/kamailio/modules/presence_mwi.so><br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/cfg.lex:1796]: pp_define(): defining id:
MOD_presence_mwi<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/cfg.y:1810]: yyparse(): loading module
presence_dialoginfo.so<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:525]: load_module(): trying to load
</lib64/kamailio/modules/presence_dialoginfo.so><br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/cfg.lex:1796]: pp_define(): defining id:
MOD_presence_dialoginfo<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:107]: set_mod_param_regex(): 'presence'
matches module 'presence'<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:744]: find_param_export(): found
<db_url> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:123]: set_mod_param_regex(): found
<db_url> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:107]: set_mod_param_regex(): 'presence'
matches module 'presence'<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:744]: find_param_export(): found
<db_update_period> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:123]: set_mod_param_regex(): found
<db_update_period> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:107]: set_mod_param_regex(): 'presence'
matches module 'presence'<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:744]: find_param_export(): found
<clean_period> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:123]: set_mod_param_regex(): found
<clean_period> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:107]: set_mod_param_regex(): 'presence'
matches module 'presence'<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:744]: find_param_export(): found
<local_log_facility> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:123]: set_mod_param_regex(): found
<local_log_facility> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:107]: set_mod_param_regex(): 'presence'
matches module 'presence'<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:744]: find_param_export(): found
<max_expires> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:123]: set_mod_param_regex(): found
<max_expires> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:107]: set_mod_param_regex():
'presence_xml' matches module 'presence_xml'<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:744]: find_param_export(): found
<db_url> in module presence_xml
[/lib64/kamailio/modules/presence_xml.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:123]: set_mod_param_regex(): found
<db_url> in module presence_xml
[/lib64/kamailio/modules/presence_xml.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:107]: set_mod_param_regex():
'presence_xml' matches module 'presence_xml'<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:744]: find_param_export(): found
<force_active> in module presence_xml
[/lib64/kamailio/modules/presence_xml.so]<br>
May 10 12:44:41 kamailio kamailio: DEBUG: <core>
[core/modparam.c:123]: set_mod_param_regex(): found
<force_active> in module presence_xml
[/lib64/kamailio/modules/presence_xml.so]<br>
May 10 12:44:43 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:652]: find_mod_export_record(): found
export of <handle_publish> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:43 kamailio kamailio: DEBUG: <core>
[core/sr_module.c:652]: find_mod_export_record(): found
export of <handle_subscribe> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:43 kamailio kamailio: DEBUG: <core>
[core/route.c:129]: route_add(): mapping routing block
(0x560e73f9a440)[PRESENCE] to 11<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
<core> [core/sr_module.c:873]: init_mod():
presence<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [presence.c:293]: mod_init():
db_url=mysql://kamailio:PASSWORD@localhost/kamailio
(len=50 addr=0x7f3a33d4e288)<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [presence.c:337]: mod_init(): server_address
parameter not set in configuration file<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [subscribe.c:2529]: restore_db_subs(): loading
information from database 0 records<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
<core> [core/sr_module.c:873]: init_mod():
presence_xml<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence_xml [presence_xml.c:170]: mod_init():
db_url=mysql://kamailio:PASSWORD@localhost/kamailio
(len=50 addr=0x7f3a33d4ef00)<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
<core> [core/sr_module.c:652]:
find_mod_export_record(): found export of
<bind_presence> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:324]: search_event(): start
event= [presence/1]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:324]: search_event(): start
event= [presence.winfo/2]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:239]: add_event(): successfully
added event: presence - len= 8<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence_xml [add_events.c:75]: xml_add_events(): added
'presence' event to presence module<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:324]: search_event(): start
event= [presence.winfo/2]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:324]: search_event(): start
event= [presence/1]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:188]: add_event(): Found wipeer
event [presence] for event [presence.winfo]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:239]: add_event(): successfully
added event: presence.winfo - len= 14<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence_xml [add_events.c:94]: xml_add_events(): added
'presence.winfo' event to presence module<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:324]: search_event(): start
event= [xcap-diff/0]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:324]: search_event(): start
event= [xcap-diff.winfo/0]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:239]: add_event(): successfully
added event: xcap-diff - len= 9<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence_xml [add_events.c:132]: xml_add_events(): added
'xcap-diff' event to presence module<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
<core> [core/sr_module.c:873]: init_mod():
presence_mwi<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
<core> [core/sr_module.c:652]:
find_mod_export_record(): found export of
<bind_presence> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:324]: search_event(): start
event= [message-summary/6]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:324]: search_event(): start
event= [message-summary.winfo/0]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:239]: add_event(): successfully
added event: message-summary - len= 15<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
<core> [core/sr_module.c:873]: init_mod():
presence_dialoginfo<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
<core> [core/sr_module.c:652]:
find_mod_export_record(): found export of
<bind_presence> in module presence
[/lib64/kamailio/modules/presence.so]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:324]: search_event(): start
event= [dialog/5]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:324]: search_event(): start
event= [dialog.winfo/0]<br>
May 10 12:44:45 kamailio /sbin/kamailio[23830]: DEBUG:
presence [event_list.c:239]: add_event(): successfully
added event: dialog - len= 6<br>
May 10 12:44:47 kamailio /sbin/kamailio[23830]: ERROR:
presence [presence.c:656]: fixup_presence(): Bad config
- you can not call 'handle_publish' function (db_url not
set)<br>
May 10 12:44:47 kamailio /sbin/kamailio[23830]: DEBUG:
presence_xml [presence_xml.c:295]: destroy(): start<br>
May 10 12:44:47 kamailio /sbin/kamailio[23830]: DEBUG:
presence [subscribe.c:2433]: timer_db_update():
db_update timer<br>
May 10 12:44:47 kamailio /sbin/kamailio[23830]: DEBUG:
presence [subscribe.c:2137]: update_db_subs_timer():
update_db_subs_timer: start</font><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
* <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
May 17-20, 2021 (Europe Timezone) - June 7-10, 2021 (America Timezone)
* <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</div>
</blockquote></div>