<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>afaik, janssonrpcc module is supposed to be a better alternative
to jsonrpcc, just in case you want to try it.</p>
<p>Back to jsonrpcc and the logs, it appears that there is a crash:<br>
</p>
0(921) ALERT: <core> [main.c:740]: handle_sigs(): child
process 929 exited by a signal 11<br>
0(921) ALERT: <core> [main.c:743]: handle_sigs(): core was
generated<br>
<br>
Can you locate the coredumo file and get the bactrace ('bt full')
out of it with gdb?<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 14.09.17 19:53, Adam Kuśmirek wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMJTtGW35pHEf4EWp=m56QzjYwAO3+mKPwfMdg0XSxO4yzRG=Q@mail.gmail.com">
<div dir="ltr">Hello,
<div><br>
</div>
<div>I have a problem with jsonrpcc module.</div>
<div><br>
</div>
<div>OS is Debian Jessie. I tried with packeged kamailio 4.4 and
compiled kamailio 5.0. </div>
<div><br>
</div>
<div>Kamailio starts properly. Routing block is very simple:</div>
<div><br>
</div>
<div>
<pre style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:"Courier New"">route {
jsonrpc_request("get_source", "{'ipv4': '$si', 'port': $sp}", "RESPONSE", "ERROR", "$var(result)");
exit;
}
route[RESPONSE] {
xlog("Result received: $var(result)");
}
route[ERROR] {
xlog("Error received: $var(result)");
}</pre>
</div>
<div><br>
</div>
<div>If any message arrives, kamailio sends it to my rpc_server
(netstring encoded):</div>
<div><br>
</div>
<div><br>
</div>
<div>106:{'id': 2, 'jsonrpc': '2.0', 'method': 'get_source',
'params': {'ipv4': '10.20.121.231', 'port': 5060}},<br>
</div>
<div><br>
</div>
<div>My server decodes the message and immediately answers with
netstring encoded response:</div>
<div><br>
</div>
<div>47:{"jsonrpc": "2.0", "result": "200 OK", "id": 2},<br>
</div>
<div><br>
</div>
<div>At this moment kamailio logs errors and disconnects from
rpc server:</div>
<div><br>
</div>
<div>
<div>root@kamailio-test:/etc/kamailio# 4(925) DEBUG:
<core> [parser/msg_parser.c:595]: parse_msg(): SIP
Request:</div>
<div> 4(925) DEBUG: <core> [parser/msg_parser.c:597]:
parse_msg(): method: <REGISTER></div>
<div> 4(925) DEBUG: <core> [parser/msg_parser.c:599]:
parse_msg(): uri: <sip:<a
href="http://kamailio.conpeek.com" moz-do-not-send="true">kamailio.conpeek.com</a>></div>
<div> 4(925) DEBUG: <core> [parser/msg_parser.c:601]:
parse_msg(): version: <SIP/2.0></div>
<div> 4(925) DEBUG: <core> [parser/parse_via.c:1303]:
parse_via_param(): Found param type 232, <branch> =
<z9hG4bK1033201528>; state=16</div>
<div> 4(925) DEBUG: <core> [parser/parse_via.c:2639]:
parse_via(): end of header reached, state=5</div>
<div> 4(925) DEBUG: <core> [parser/msg_parser.c:486]:
parse_headers(): Via found, flags=2</div>
<div> 4(925) DEBUG: <core> [parser/msg_parser.c:488]:
parse_headers(): this is the first via</div>
<div> 4(925) DEBUG: <core> [receive.c:178]:
receive_msg(): After parse_msg...</div>
<div> 4(925) DEBUG: <core> [receive.c:221]:
receive_msg(): preparing to run routing scripts...</div>
<div> 4(925) DEBUG: tm [t_lookup.c:1312]: t_newtran(): DEBUG:
t_newtran: msg id=1 , global msg id=0 , T on
entrance=0xffffffffffffffff</div>
<div> 4(925) DEBUG: <core>
[parser/parse_addr_spec.c:864]: parse_addr_spec(): end of
header reached, state=10</div>
<div> 4(925) DEBUG: <core> [parser/msg_parser.c:171]:
get_hdr_field(): <To> [40]; uri=[<a
href="mailto:sip%3A1000@kamailio.conpeek.com"
moz-do-not-send="true">sip:1000@kamailio.conpeek.com</a>]</div>
<div> 4(925) DEBUG: <core> [parser/msg_parser.c:172]:
get_hdr_field(): to body ["1000" <<a
href="mailto:sip%3A1000@kamailio.conpeek.com"
moz-do-not-send="true">sip:1000@kamailio.conpeek.com</a>></div>
<div>]</div>
<div> 4(925) DEBUG: <core> [parser/msg_parser.c:152]:
get_hdr_field(): cseq <CSeq>: <1>
<REGISTER></div>
<div> 4(925) DEBUG: <core> [parser/msg_parser.c:183]:
get_hdr_field(): content_length=0</div>
<div> 4(925) DEBUG: <core> [parser/msg_parser.c:89]:
get_hdr_field(): found end of header</div>
<div> 4(925) DEBUG: tm [t_lookup.c:466]: t_lookup_request():
t_lookup_request: start searching: hash=43020, isACK=0</div>
<div> 4(925) DEBUG: tm [t_lookup.c:424]: matching_3261():
DEBUG: RFC3261 transaction matching failed</div>
<div> 4(925) DEBUG: tm [t_lookup.c:648]: t_lookup_request():
DEBUG: t_lookup_request: no transaction found</div>
<div> 4(925) DEBUG: <core> [md5utils.c:67]:
MD5StringArray(): MD5 calculated:
920bfe28c581e1bf18554e3a9b234ceb</div>
<div> 4(925) DEBUG: <core> [usr_avp.c:631]:
destroy_avp_list(): destroying list (nil)</div>
<div> 4(925) DEBUG: <core> [usr_avp.c:631]:
destroy_avp_list(): destroying list (nil)</div>
<div> 4(925) DEBUG: <core> [usr_avp.c:631]:
destroy_avp_list(): destroying list (nil)</div>
<div> 4(925) DEBUG: <core> [usr_avp.c:631]:
destroy_avp_list(): destroying list (nil)</div>
<div> 4(925) DEBUG: <core> [usr_avp.c:631]:
destroy_avp_list(): destroying list (nil)</div>
<div> 4(925) DEBUG: <core> [usr_avp.c:631]:
destroy_avp_list(): destroying list (nil)</div>
<div> 4(925) DEBUG: <core> [xavp.c:446]:
xavp_destroy_list(): destroying xavp list (nil)</div>
<div> 4(925) DEBUG: <core> [receive.c:318]:
receive_msg(): cleaning up</div>
<div> <b>0(921) ALERT: <core> [main.c:740]:
handle_sigs(): child process 929 exited by a signal 11</b></div>
<div><b> 0(921) ALERT: <core> [main.c:743]:
handle_sigs(): core was generated</b></div>
<div> 0(921) INFO: <core> [main.c:755]: handle_sigs():
terminating due to SIGCHLD</div>
<div> 0(921) DEBUG: <core> [main.c:757]: handle_sigs():
terminating due to SIGCHLD</div>
<div> 7(928) INFO: <core> [main.c:810]: sig_usr():
signal 15 received</div>
<div> 6(927) INFO: <core> [main.c:810]: sig_usr():
signal 15 received</div>
<div> 5(926) INFO: <core> [main.c:810]: sig_usr():
signal 15 received</div>
<div> 4(925) INFO: <core> [main.c:810]: sig_usr():
signal 15 received</div>
<div> 3(924) INFO: <core> [main.c:810]: sig_usr():
signal 15 received</div>
<div> 2(923) INFO: <core> [main.c:810]: sig_usr():
signal 15 received</div>
<div> 1(922) INFO: <core> [main.c:810]: sig_usr():
signal 15 received</div>
<div> 0(921) DEBUG: tm [t_funcs.c:86]: tm_shutdown(): DEBUG:
tm_shutdown : start</div>
<div> 0(921) DEBUG: tm [t_funcs.c:89]: tm_shutdown(): DEBUG:
tm_shutdown : emptying hash table</div>
<div> 0(921) DEBUG: tm [h_table.c:127]: free_cell_helper():
freeing transaction 0x7fb99a822350 from h_table.c:449</div>
<div> 0(921) DEBUG: tm [t_funcs.c:91]: tm_shutdown(): DEBUG:
tm_shutdown : removing semaphores</div>
<div> 0(921) DEBUG: tm [t_funcs.c:93]: tm_shutdown(): DEBUG:
tm_shutdown : destroying tmcb lists</div>
<div> 0(921) DEBUG: tm [t_funcs.c:96]: tm_shutdown(): DEBUG:
tm_shutdown : done</div>
<div> 0(921) INFO: <core> [sctp_core.c:53]:
sctp_core_destroy(): SCTP API not initialized</div>
<div> 0(921) DEBUG: <core> [mem/shm.c:174]:
shm_core_lock_destroy(): destroying the shared memory lock</div>
<div> 0(921) DEBUG: <core> [mem/shm.c:266]:
shm_destroy_manager(): destroying memory manager: f_malloc</div>
<div> 0(921) DEBUG: <core> [mem/pkg.c:89]:
pkg_destroy_manager(): destroying memory manager: f_malloc</div>
</div>
<div><br>
</div>
<div>The problem occures also if rpc server does not reply, i
think when trying to start ERROR route.</div>
<div><br>
</div>
<div>If I try with <span
style="background-color:rgb(252,255,252);color:rgb(0,0,0);font-size:15px">jsonrpc_notification, </span>everything
is OK.</div>
<div><br>
</div>
<div><br>
</div>
<div>Any help ?</div>
<div><br>
</div>
<div>Regards Adam</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>