i just build master and got hundreds of these kind of error messages:
Sep 30 12:22:55 sip /usr/sbin/sip-proxy[27351]: ERROR: <core> [sr_module.c:882]: init_mod_child(): Error while initializing module mi_rpc (/usr/lib/sip-proxy/modules/mi_rpc.so) Sep 30 12:22:55 sip /usr/sbin/sip-proxy[27351]: CRITICAL: mi_rpc [mi_rpc_mod.c:84]: Failed to init the mi commands Sep 30 12:22:55 sip /usr/sbin/sip-proxy[27353]: CRITICAL: mi_rpc [mi_rpc_mod.c:84]: Failed to init the mi commands
-- juha
If you run in debug mode, do you get any other relevant debug message before? Are you using xmlrpc module?
Cheers, Daniel
On 9/30/11 11:31 AM, Juha Heinanen wrote:
i just build master and got hundreds of these kind of error messages:
Sep 30 12:22:55 sip /usr/sbin/sip-proxy[27351]: ERROR:<core> [sr_module.c:882]: init_mod_child(): Error while initializing module mi_rpc (/usr/lib/sip-proxy/modules/mi_rpc.so) Sep 30 12:22:55 sip /usr/sbin/sip-proxy[27351]: CRITICAL: mi_rpc [mi_rpc_mod.c:84]: Failed to init the mi commands Sep 30 12:22:55 sip /usr/sbin/sip-proxy[27353]: CRITICAL: mi_rpc [mi_rpc_mod.c:84]: Failed to init the mi commands
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Daniel-Constantin Mierla writes:
If you run in debug mode, do you get any other relevant debug message before? Are you using xmlrpc module?
i needed to switch to earlier working version, but can try to reinstall later this non-working version later today. i'm using xmlrpc module. size of my syslog is > 12 MB due to these error messages.
first error message is this:
Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR: <core> [db_id.c:247]: error while parsing database URL: 'mysql://user:pass@localhost/ser'
perhaps it has something to do with later mi related error messages?
has someone changed something is parsing of db URLs? if so, please revert and i'll try again.
-- juha
On 9/30/11 12:47 PM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
If you run in debug mode, do you get any other relevant debug message before? Are you using xmlrpc module?
i needed to switch to earlier working version, but can try to reinstall later this non-working version later today. i'm using xmlrpc module. size of my syslog is> 12 MB due to these error messages.
first error message is this:
Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR:<core> [db_id.c:247]: error while parsing database URL: 'mysql://user:pass@localhost/ser'
perhaps it has something to do with later mi related error messages?
has someone changed something is parsing of db URLs? if so, please revert and i'll try again.
the mi error is very likely to be related to my latest change to fix usage of sip-related function in mi process and vice-versa (e.g., with xmlrpc, mi commands can be executed by sip workers, and with event_route[tm:local-request] sip functions can be executed in mi worker).
I don't think this touched db url parsing in any way, may be a side effect log message or some other change affected it.
The error related to mi should stop the starting process.
Cheers, Daniel
daniel,
can't you make a change somewhere that stops execution of sr, when this error occurs? now it keeps on running endlessly and produces huge syslog. it would then be earier to debug the problem?
-- juha
Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR: <core> [db_id.c:247]: error while parsing database URL: 'mysql://user:pass@localhost/ser' Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR: <core> [db.c:291]: cannot parse URL 'mysql://user:pass@localhost/ser' Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR: permissions [address.c:293]: unable to connect database Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR: <core> [mi.c:112]: failed to init <address_reload> Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: CRITICAL: mi_rpc [mi_rpc_mod.c:84]: Failed to init the mi commands Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR: <core> [sr_module.c:882]: init_mod_child(): Error while initializing module mi_rpc (/usr/lib/sip-proxy/modules/mi_rpc.so) Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: CRITICAL: mi_rpc [mi_rpc_mod.c:84]: Failed to init the mi commands Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR: <core> [sr_module.c:882]: init_mod_child(): Error while initializing module mi_rpc (/usr/lib/sip-proxy/modules/mi_rpc.so) ...... forever
It should stop, indeed, I will look at it.
Cheers, Daniel
On 9/30/11 1:12 PM, Juha Heinanen wrote:
daniel,
can't you make a change somewhere that stops execution of sr, when this error occurs? now it keeps on running endlessly and produces huge syslog. it would then be earier to debug the problem?
-- juha
Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR:<core> [db_id.c:247]: error while parsing database URL: 'mysql://user:pass@localhost/ser' Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR:<core> [db.c:291]: cannot parse URL 'mysql://user:pass@localhost/ser' Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR: permissions [address.c:293]: unable to connect database Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR:<core> [mi.c:112]: failed to init<address_reload> Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: CRITICAL: mi_rpc [mi_rpc_mod.c:84]: Failed to init the mi commands Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR:<core> [sr_module.c:882]: init_mod_child(): Error while initializing module mi_rpc (/usr/lib/sip-proxy/modules/mi_rpc.so) Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: CRITICAL: mi_rpc [mi_rpc_mod.c:84]: Failed to init the mi commands Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR:<core> [sr_module.c:882]: init_mod_child(): Error while initializing module mi_rpc (/usr/lib/sip-proxy/modules/mi_rpc.so) ...... forever
ok, the mi child init loop should be fixed with latest commit. Let me know if it is.
Do you still get the error with db url parsing?
Cheers, Daniel
On 9/30/11 1:24 PM, Daniel-Constantin Mierla wrote:
It should stop, indeed, I will look at it.
Cheers, Daniel
On 9/30/11 1:12 PM, Juha Heinanen wrote:
daniel,
can't you make a change somewhere that stops execution of sr, when this error occurs? now it keeps on running endlessly and produces huge syslog. it would then be earier to debug the problem?
-- juha
Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR:<core> [db_id.c:247]: error while parsing database URL: 'mysql://user:pass@localhost/ser' Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR:<core> [db.c:291]: cannot parse URL 'mysql://user:pass@localhost/ser' Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR: permissions [address.c:293]: unable to connect database Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR:<core> [mi.c:112]: failed to init<address_reload> Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: CRITICAL: mi_rpc [mi_rpc_mod.c:84]: Failed to init the mi commands Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR:<core> [sr_module.c:882]: init_mod_child(): Error while initializing module mi_rpc (/usr/lib/sip-proxy/modules/mi_rpc.so) Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: CRITICAL: mi_rpc [mi_rpc_mod.c:84]: Failed to init the mi commands Sep 30 12:21:42 sip /usr/sbin/sip-proxy[27211]: ERROR:<core> [sr_module.c:882]: init_mod_child(): Error while initializing module mi_rpc (/usr/lib/sip-proxy/modules/mi_rpc.so) ...... forever
Daniel-Constantin Mierla writes:
ok, the mi child init loop should be fixed with latest commit. Let me know if it is.
just compiling latest sr and got these:
CC (cc) [M xmlrpc.so] xmlrpc.o
xmlrpc.c: In function ‘set_fault’: xmlrpc.c:861: warning: implicit declaration of function ‘vsnprintf’ xmlrpc.c: In function ‘print_value’: xmlrpc.c:980: warning: implicit declaration of function ‘snprintf’ xmlrpc.c:980: warning: incompatible implicit declaration of built-in function ‘snprintf’
-- juha
Did a fix for the warnings and refactored the previous one. Try again and let me know the results.
Thanks, Daniel
On 9/30/11 1:40 PM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
ok, the mi child init loop should be fixed with latest commit. Let me know if it is.
just compiling latest sr and got these:
CC (cc) [M xmlrpc.so] xmlrpc.o
xmlrpc.c: In function ‘set_fault’: xmlrpc.c:861: warning: implicit declaration of function ‘vsnprintf’ xmlrpc.c: In function ‘print_value’: xmlrpc.c:980: warning: implicit declaration of function ‘snprintf’ xmlrpc.c:980: warning: incompatible implicit declaration of built-in function ‘snprintf’
-- juha
Daniel-Constantin Mierla writes:
Did a fix for the warnings and refactored the previous one. Try again and let me know the results.
now i didn't get any compilation errors and also sr started without problems.
what were the big mi related changes? what kind of bugs did they fixed?
-- juha
On 9/30/11 2:26 PM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
Did a fix for the warnings and refactored the previous one. Try again and let me know the results.
now i didn't get any compilation errors and also sr started without problems.
what were the big mi related changes? what kind of bugs did they fixed?
the changes were not big by themselves, it was about when to call child_init and mi_child_init functions.
By design, and some time ago all was ok, there were created different processes handling SIP and handling MI (RPC), each calling an init function (if needed) after the process was forked, namely child_init from module exports structure by SIP workers and mi_child_init from MI commands export structure by MI workers.
But with the time, it got to the state when MI/RPC workers call route blocks (where are functions exported by modules to handle sip) and SIP workers have to handle RPC commands. Therfore in some cases, a process is both SIP and RPC/MI worker. The changes tried to detect when is such a case and initialize properly the children processes.
So, initially was added local_route introduced during openser/kamailio stand alone times, right now it is event_route[tm:local-request]. This route block is executed for local generated requests via tm. But such requests can be triggered by MI commands, thus handled by a MI worker (e.g., end dlg from dialog, pua_mi, t_uac* MI commands). An event route can have all functions available for REQUEST_ROUTE, but some of them do not work if module child_init was not called for that process. A good example is acc_db_request() -- it requires child_init to connect to database, on the other hand, acc has no mi command in order to have a mi_child_init function. If one sends a dlg end MI command and then want to account the generated BYEs to acc table, it failed in the past.
To work properly, each MI/RPC worker has to execute the child_init functions exported by modules
The other case is when SIP workers have to execute MI/RPC commands. It is the case when xmlrpc module is used, because this module works on the same transport layer as for SIP, the XMLRPC requests being handled by the same workers as SIP requests. For this, each SIP worker has to execute the mi_child_init exported by MI commands. This was partially fixed, by having mi_rpc module search to see if xmlrpc module was loaded and call mi_child_init functions in child_init.
The changes were: - core keeps some flags about the type of the process, if it is going to handle SIP functions and/or RPC commands - when tm is initialized, if event_route[tm:local-request] is defined, tells to core that RPC workers may execute SIP functions - when xmlrpc is loaded, tells to the core that SIP workers may handle RPC commands - based on this flags, mi_rpc module calls the mi_child_init() function in child_init() and the MI core API calls child_init() functions when initalizing MI workers
I haven't gotten to ctl module to see if it needs to do any fix for its extra workers, in the case event_route is going to be used from them.
Cheers, Daniel
Daniel-Constantin Mierla writes:
ok, the mi child init loop should be fixed with latest commit. Let me know if it is.
now the syslog loop goes like this:
Sep 30 14:45:29 sip /usr/sbin/sip-proxy[17413]: INFO: ctl [io_listener.c:224]: io_listen_loop: using epoll_lt io watch method (config)
Sep 30 14:45:29 sip /usr/sbin/sip-proxy[17413]: ERROR: ctl [../../io_wait.h:1067]: ERROR:io_wait_loop_epoll: epoll_wait(15, 0xb7527898, 0, 10000): Invalid argument [22] Sep 30 14:45:29 sip /usr/sbin/sip-proxy[17413]: ERROR: ctl [../../io_wait.h:1067]: ERROR:io_wait_loop_epoll: epoll_wait(15, 0xb7527898, 0, 10000): Invalid argument [22] Sep 30 14:45:29 sip /usr/sbin/sip-proxy[17413]: ERROR: ctl [../../io_wait.h:1067]: ERROR:io_wait_loop_epoll: epoll_wait(15, 0xb7527898, 0, 10000): Invalid argument [22] Sep 30 14:45:29 sip /usr/sbin/sip-proxy[17413]: ERROR: ctl [../../io_wait.h:1067]: ERROR:io_wait_loop_epoll: epoll_wait(15, 0xb7527898, 0, 10000): Invalid argument [22] ...
Do you still get the error with db url parsing?
i didn't see it anymore, but perhaps it didn't go far enough.
-- juha