[Serusers] XJAB problem: infinite forking
Daniel-Constantin Mierla
mierla at fokus.fraunhofer.de
Fri May 30 10:47:05 CEST 2003
Hello,
please set first three lines to:
debug=9 # debug level (cmd line: -dddddddddd)
fork=no
log_stderror=yes # (cmd line: -E)
and start SER from a console (ser -f /path/to/ser.cfg) and send us the
debug messages.
Best regards,
Daniel
On 5/29/2003 4:53 PM, Peter Kostik wrote:
>Hello everyone,
>
>I am playing around with the new CVS ser 0.8.11pre28
>downloaded couple days ago. I am attaching my config
>script and also the output of syslog with errors. Afer
>I start ser it starts forking new processes until it
>crashes the box (fills up the memory).
>The script is little advanced, uses jabber,pa,msilo...
>
>Thanks for your help. You are doing great job. Can't
>wait till next release.
>
>Peter.
>
>ser.cfg:
>--------
>#
># $Id: ser.cfg,v 1.19 2003/05/07 11:56:44 janakj Exp $
>#
># simple quick-start config script
>#
>
># ----------- global configuration parameters
>------------------------
>
>debug=3 # debug level (cmd line: -dddddddddd)
>fork=yes
>log_stderror=no # (cmd line: -E)
>
>/* Uncomment these lines to enter debugging mode
>debug=7
>fork=no
>log_stderror=yes
>*/
>
>check_via=yes # (cmd. line: -v)
>dns=no # (cmd. line: -r)
>rev_dns=no # (cmd. line: -R)
>port=5060
>children=4
>fifo="/tmp/ser_fifo"
>
># ------------------ module loading
>----------------------------------
>
># Uncomment this if you want to use SQL database
>loadmodule "/usr/local/lib/ser/modules/mysql.so"
>
>loadmodule "/usr/local/lib/ser/modules/print.so"
>loadmodule "/usr/local/lib/ser/modules/textops.so"
>loadmodule "/usr/local/lib/ser/modules/sl.so"
>loadmodule "/usr/local/lib/ser/modules/tm.so"
>loadmodule "/usr/local/lib/ser/modules/rr.so"
>loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
>loadmodule "/usr/local/lib/ser/modules/msilo.so"
>loadmodule "/usr/local/lib/ser/modules/usrloc.so"
>loadmodule "/usr/local/lib/ser/modules/registrar.so"
>loadmodule "/usr/local/lib/ser/modules/jabber.so"
>loadmodule "/usr/local/lib/ser/modules/pa.so"
>
># Uncomment this if you want digest authentication
># mysql.so must be loaded !
>#loadmodule "/usr/local/lib/ser/modules/auth.so"
>#loadmodule "/usr/local/lib/ser/modules/auth_db.so"
>
># ----------------- setting module-specific parameters
>---------------
>
># -- usrloc params --
>
>#modparam("usrloc", "db_mode", 0)
>
># Uncomment this if you want to use SQL database
># for persistent storage and comment the previous line
>modparam("usrloc", "db_mode", 2)
>modparam("usrloc", "db_url",
>"sql://nser:heslo@localhost/nser")
>
>modparam("msilo", "db_url",
>"sql://nser:heslo@localhost/nser")
>#modparam("msilo", "registrar",
>"sip:registrar at deimos")
>
># -- auth params --
># Uncomment if you are using auth module
>#
>#modparam("auth_db", "calculate_ha1", yes)
>#
># If you set "calculate_ha1" parameter to yes (which
>true in this config),
># uncomment also the following parameter)
>#
>#modparam("auth_db", "password_column", "password")
>
>modparam("jabber", "db_url",
>"sql://sip_jab:heslo@localhost/sip_jab")
>modparam("jabber", "jaddress", "test")
>modparam("jabber", "jport", 5222)
>modparam("jabber", "workers", 2)
>modparam("jabber", "max_jobs", 10)
>modparam("jabber", "aliases",
>"5;aim.test;icq.test;msn.test;yahoo.test;jabber.test;")
>modparam("jabber", "jdomain", "jabber.test")
>
># ------------------------- request routing logic
>-------------------
>
># main routing logic
>
>route{
>
> # initial sanity checks -- messages with
> # max_forwards==0, or excessively long requests
> if (!mf_process_maxfwd_header("10")) {
> sl_send_reply("483","Too Many Hops");
> break;
> };
> if (len_gt( max_len )) {
> sl_send_reply("513", "Message too big");
> break;
> };
>
> # we record-route all messages -- to make sure that
> # subsequent messages will go through our proxy;
>that's
> # particularly good if upstream and downstream
>entities
> # use different transport protocol
> record_route();
> # loose-route processing
> loose_route();
>
> # if the request is for other domain use UsrLoc
> # (in case, it does not work, use the following
>command
> # with proper names and addresses in it)
> if (uri==myself) {
>
> if (method=="REGISTER") {
>
># Uncomment this if you want to use digest
>authentication
># if (!www_authorize("iptel.org", "subscriber")) {
># www_challenge("iptel.org", "0");
># break;
># };
>
> save("location");
>
> if (search("egistration")) {
> log("XJAB: going online in Jabber net\n");
> if (jab_go_online()) {
> sl_send_reply("200", "Accepted");
> } else {
> sl_send_reply("404", "Not Found");
> };
> } else {
> log("XJAB: going offline in Jabber net\n");
> if (jab_go_offline()) {
> sl_send_reply("200", "Accepted");
> } else {
> sl_send_reply("404", "Not Found");
> };
> }; # egistrarion
>
> if (m_dump()) {
> log("MSILO: offline msgs dumped\n");
> } else {
> log("MSILO: no offline msgs dumped\n");
> };
> break;
> }; # register
>
> if (method=="SUBSCRIBE") {
> if (t_newtran()) {
> handle_subscription("registrar");
> };
> break;
> }; # subsribe
>
> # native SIP destinations are handled using our
>USRLOC DB
> if (!lookup("location")) {
> if (method=="MESSAGE") {
> log("MESSAGE received -> storing\n");
> if (!t_newtran()) {
> sl_reply_error();
> break;
> };
> if (m_store("0")) {
> log("MSILO: offline msg stored\n");
> if (!t_reply("202","Accepted")) {
> sl_reply_error();
> };
> } else {
> log("MSILO: offline msg not stored\n");
> if (!t_reply("503","Service Unavailable")) {
> sl_reply_error();
> };
> };
> break;
> }; # message
> sl_send_reply("404", "Not Found");
> break;
> }; # lookup
> }; # myself
>
> if ( search("To:.*@aim\.test") ||
> search("To:.*@icq\.test") ||
> search("To:.*@msn\.test") ||
> search("To:.*@yahoo\.test") ||
> search("To:.*@jabber\.test") ) {
>
> if (!t_newtran()) {
> sl_reply_error();
> break;
> };
> if (method=="MESSAGE") {
> log("MESSAGE received -> manage it w/ XJAB\n");
> if (search("\n:on")) {
> if (jab_go_online()) {
> sl_send_reply("200", "Accepted");
> } else {
> sl_send_reply("404", "Not Found");
> };
> break;
> };
> if (search("\n:off")) {
> if (jab_go_offline()) {
> sl_send_reply("200", "Accepted");
> } else {
> sl_send_reply("404", "Not Found");
> };
> break;
> };
> if (search("\n:join")) {
> if (jab_join_jconf()) {
> sl_send_reply("200", "Accepted");
> } else {
> sl_send_reply("404", "Not Found");
> };
> break;
> };
> if (search("\n:exit")) {
> if (jab_exit_jconf()) {
> sl_send_reply("200", "Accepted");
> } else {
> sl_send_reply("404", "Not Found");
> };
> break;
> };
> if (jab_send_message()) {
> sl_send_reply("202", "Accepted");
> } else {
> sl_send_reply("503", "Service Unavailable");
> };
> break;
> };
> if (method=="SUBSCRIBE") {
> handle_subscription("jabber");
> break;
> };
> log("NON_MESSAGE request received for Jabber GW ->
>dropt\n");
> sl_send_reply("202", "Accepted");
> break;
> };
>
> # forward to current uri now; use stateful
>forwarding; that
> # works reliably even if we forward from TCP to UDP
> if (!t_relay()) {
> sl_reply_error();
> };
>
>}
>
>
>error log from /var/log/messages:
>---------------------------------
>
>May 29 10:58:11 hat /usr/local/sbin/ser[2180]: ERROR:
>parse_to: invalid To - unexpected end of header in
>state -1073745156
>May 29 10:58:11 hat /usr/local/sbin/ser[2180]:
>send_xpidf_notify(): Error while
>parsing
>May 29 10:58:11 hat /usr/local/sbin/ser[2180]:
>handle_subscription(): Error while sending notify
>May 29 10:58:11 hat /usr/local/sbin/ser[2180]: ERROR:
>t_reply: can't generate 200 reply when a final 200 was
>sent out
>May 29 10:58:11 hat /usr/local/sbin/ser[2180]:
>send_reply(): Error while sending 200 OK
>May 29 10:58:23 hat /usr/local/sbin/ser[2178]: ERROR:
>parse_to: invalid To - unexpected end of header in
>state -1073745156
>May 29 10:58:23 hat /usr/local/sbin/ser[2178]:
>send_xpidf_notify(): Error while
>parsing
>May 29 10:58:23 hat /usr/local/sbin/ser[2178]:
>handle_subscription(): Error while sending notify
>May 29 10:58:23 hat /usr/local/sbin/ser[2178]: ERROR:
>t_reply: can't generate 200 reply when a final 200 was
>sent out
>May 29 10:58:23 hat /usr/local/sbin/ser[2178]:
>send_reply(): Error while sending 200 OK
>May 29 10:58:29 hat /usr/local/sbin/ser[2210]:
>XJAB:xjab_check_workers: worker[0][pid=2217] has
>exited - status=0 err=-1 errno=10
>May 29 10:58:11 hat /usr/local/sbin/ser[2180]: ERROR:
>parse_to: invalid To - unexpected end of header in
>state -1073745156
>May 29 10:58:11 hat /usr/local/sbin/ser[2180]:
>send_xpidf_notify(): Error while
>parsing
>May 29 10:58:11 hat /usr/local/sbin/ser[2180]:
>handle_subscription(): Error while sending notify
>May 29 10:58:11 hat /usr/local/sbin/ser[2180]: ERROR:
>t_reply: can't generate 200 reply when a final 200 was
>sent out
>May 29 10:58:11 hat /usr/local/sbin/ser[2180]:
>send_reply(): Error while sending 200 OK
>May 29 10:58:23 hat /usr/local/sbin/ser[2178]: ERROR:
>parse_to: invalid To - unexpected end of header in
>state -1073745156
>May 29 10:58:23 hat /usr/local/sbin/ser[2178]:
>send_xpidf_notify(): Error while
>parsing
>May 29 10:58:23 hat /usr/local/sbin/ser[2178]:
>handle_subscription(): Error while sending notify
>May 29 10:58:23 hat /usr/local/sbin/ser[2178]: ERROR:
>t_reply: can't generate 200 reply when a final 200 was
>sent out
>May 29 10:58:23 hat /usr/local/sbin/ser[2178]:
>send_reply(): Error while sending 200 OK
>May 29 10:58:29 hat /usr/local/sbin/ser[2210]:
>XJAB:xjab_check_workers: worker[0][pid=2217] has
>exited - status=0 err=-1 errno=10
>May 29 10:58:29 hat /usr/local/sbin/ser[2210]:
>XJAB:xjab_check_workers: worker[1][pid=2218] has
>exited - status=0 err=-1 errno=10
>May 29 10:58:29 hat /usr/local/sbin/ser[2216]:
>XJAB:xjab_check_workers: worker[0][pid=2243] has
>exited - status=0 err=-1 errno=10
>May 29 10:58:29 hat /usr/local/sbin/ser[2216]:
>XJAB:xjab_check_workers: worker[1][pid=2244] has
>exited - status=0 err=-1 errno=10
>May 29 10:58:29 hat /usr/local/sbin/ser[2213]:
>XJAB:xjab_check_workers: worker[0][pid=2245] has
>exited - status=0 err=-1 errno=10
>May 29 10:58:29 hat /usr/local/sbin/ser[2213]:
>XJAB:xjab_check_workers: worker[1][pid=2246] has
>exited - status=0 err=-1 errno=10
>May 29 10:58:40 hat dhcpd: DHCPDISCOVER from
>00:90:b1:59:0e:00 via eth0: network 200.200.52.0/24:
>no free leases
>May 29 10:58:49 hat /usr/local/sbin/ser[2210]:
>XJAB:xjab_check_workers: worker[0][pid=2247] has
>exited - status=0 err=-1 errno=10
>May 29 10:58:49 hat /usr/local/sbin/ser[2210]:
>XJAB:xjab_check_workers: worker[1][pid=2248] has
>exited - status=0 err=-1 errno=10
>May 29 10:58:49 hat /usr/local/sbin/ser[2216]:
>XJAB:xjab_check_workers: worker[0][pid=2249] has
>exited - status=0 err=-1 errno=10
>May 29 10:58:49 hat /usr/local/sbin/ser[2216]:
>XJAB:xjab_check_workers: worker[1][pid=2250] has
>exited - status=0 err=-1 errno=10
>May 29 10:58:49 hat /usr/local/sbin/ser[2213]:
>XJAB:xjab_check_workers: worker[0][pid=2251] has
>exited - status=0 err=-1 errno=10
>May 29 10:58:49 hat /usr/local/sbin/ser[2213]:
>XJAB:xjab_check_workers: worker[1][pid=2252] has
>exited - status=0 err=-1 errno=10
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
>http://calendar.yahoo.com
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
>
>
More information about the sr-users
mailing list