[Serusers] jabber - please help me

Javier Ramirez jvr_78 at yahoo.com.ar
Fri Jul 28 18:15:13 CEST 2006


friends:
I looking for this error, I add in module/jabber/jabber.c file in mod_init funtion 2 trace to view where is the error.
please look in the trace, I show the error.
please help me

for(i=0; i<nrw; i++)
{
LOG(L_ERR, "XJAB trace 1 to debug error \n");
db_con[i] = jabber_dbf.init(db_url);
LOG(L_ERR, "XJAB trace 2 to debug error \n");
if (!db_con[i])
    {
    LOG(L_ERR, "XJAB:mod_init: Error while connecting database\n");
    return -1;
}
else
{
    if (jabber_dbf.use_table(db_con[i], db_table) < 0) {
    LOG(L_ERR, "XJAB:mod_init: Error in use_table\n");
    return -1;
}
DBG("XJAB:mod_init: Database connection opened successfully\n");
}
}

and run the program with  -f ser.jabber -E -dddddddddddddd options
0(9857) read 3400580695 from /dev/urandom
0(9857) seeding PRNG with 259723670
0(9857) test random number 1984477284
0(9857) WARNING: fix_socket_list: could not rev. resolve 192.168.0.4
0(9857) WARNING: fix_socket_list: could not rev. resolve 192.168.0.4
Listening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: 192.168.0.4 [192.168.0.4]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp: 192.168.0.4 [192.168.0.4]:5060
Aliases:
tcp: localhost:5060
udp: localhost:5060
*: 192.168.0.4:*
WARNING: no fork mode and more than one listen address found(will use only the the first one)
0(9857) init_tcp: using sigio_rt as the io watch method (auto detected)
0(9857) Se inicializo init_tmcb_lists
0(9857) Presence Agent - initializing
0(9857) ... common libraries
0(9857) cds_initialize(): init the content
0(9857) qsa_initialize(): init the content
print - initializing
textops - initializing
0(9857) Maxfwd module- initializing
stateless - initializing
0(9857) XJAB:mod_init: initializing ...
0(9857)XJAB trace 1 to debug error
0(9857) XJAB trace 2 to debug error
0(9857) XJAB:mod_init: Database connection opened successfully
0(9857) XJAB trace 1 to debug error
Segmentation fault (core dumped)


  ----- Original Message ----- 
  From: Andrey Kouprianov 
  To: serusers at iptel.org 
  Sent: Friday, July 28, 2006 12:40 AM
  Subject: Re: [Serusers] jabber


  Hi,

  Not sure if it's gonna work, but if you want to start ser in debugging
  mode, then set fork=no (as opposed to your fork=yes).

    Andrey.

  On 7/28/06, Javier Ramirez <jvr_78 at yahoo.com.ar> wrote:
  >
  > why die the ser ?
  > what is wrong ?
  > I add this:
  > in /etc/host
  > 127.0.0.1 aim.jabber.server.com
  > 127.0.0.1 msn.jabber.server.com
  > 127.0.0.1 icq.jabber.server.com
  > 127.0.0.1 yahoo.jabber.server.com
  > 127.0.0.1 jabber.server.com
  > 127.0.0.1 server.com
  > and run:
  > ser -f jabber2.cfg -E -dddddddddddddddd
  >
  >  0(4710) read 193612823 from /dev/urandom
  >  0(4710) seeding PRNG with 1347370384
  >  0(4710) test random number 149130666
  >  0(4710) WARNING: fix_socket_list: could not rev. resolve 192.168.0.4
  >  0(4710) WARNING: fix_socket_list: could not rev. resolve 192.168.0.4
  > Listening on
  >              udp: 127.0.0.1 [127.0.0.1]:5060
  >              udp: 192.168.0.4 [192.168.0.4]:5060
  >              tcp: 127.0.0.1 [127.0.0.1]:5060
  >              tcp: 192.168.0.4 [192.168.0.4]:5060
  > Aliases:
  >              tcp: localhost:5060
  >              udp: localhost:5060
  >              *: 192.168.0.4:*
  >
  > print - initializing
  > textops - initializing
  > stateless - initializing
  >
  > and ser die.....
  >
  > this is my configuration file:
  >
  > #
  > # configuration for Jabber module testing
  > # (sample config file using the module with presence support)
  > #
  > # $ID: daniel $
  > #
  >
  > debug=2          # debug level (cmd line: -dddddddddd)
  > fork=yes          # (cmd. line: -D)
  > log_stderror=yes  # (cmd line: -E)
  >
  > children=2
  > check_via=no      # (cmd. line: -v)
  > dns=off           # (cmd. line: -r)
  > rev_dns=off       # (cmd. line: -R)
  > port=5060
  > alias="192.168.0.4"
  >
  > # ------------------ module loading
  > ----------------------------------
  >
  > #modules
  > loadmodule "modules/print/print.so"
  > loadmodule "modules/textops/textops.so"
  > loadmodule "modules/tm/tm.so"
  > loadmodule "modules/maxfwd/maxfwd.so"
  > loadmodule "modules/sl/sl.so"
  > loadmodule "modules/mysql/mysql.so"
  > loadmodule "modules/jabber/jabber.so"
  > loadmodule "modules/registrar/registrar.so"
  > loadmodule "modules/usrloc/usrloc.so"
  > loadmodule "modules/pa/pa.so"
  >
  > # ----------------- setting module-specific parameters ---------------
  >
  > # -- registrar params --
  >
  > modparam("registrar", "default_expires", 120)
  > #modparam("registrar", "use_domain", 1)
  >
  > # -- usrloc params --
  > #modparam("usrloc", "use_domain", 1)
  > modparam("usrloc", "db_mode", 0)
  >
  > # -- jabber params --
  >
  > modparam("jabber","db_url","mysql://root@127.0.0.1/sip_jab")
  > modparam("jabber","jaddress","jabber.server.com")
  > modparam("jabber","jport",5222)
  > modparam("jabber","workers",2)
  > modparam("jabber","max_jobs",10)
  > modparam("jabber","cache_time",200)
  > modparam("jabber","delay_time",60)
  > modparam("jabber","jdomain","jabber.server.com=*")
  > modparam("jabber","aliases","4;aim.jabber.server.com;icq.jabber.server.com;msn.jabber.server.com=%;yahoo.jabber.server.com;")
  >
  >
  > route{
  >
  > #if ( !mf_process_maxfwd_header("10") )
  > #{
  > # sl_send_reply("483","To Many Hops");
  > # drop();
  > #};
  >
  > if (uri=~"[@:]sip\.server\.com([;:].*)*")
  > {
  > # for testing purposes, simply okay all REGISTERs
  > if (method=="REGISTER")
  > {
  > if (t_newtran())
  > {
  > save("location");
  > log("REGISTER received -> reply okay\n");
  > };
  > if(search("egistration"))
  > {
  > log("XJAB: Going ONline in Jabber network!!!\n");
  > if(jab_go_online())
  > {
  > sl_send_reply("200", "Accepted");
  > }
  > else
  > {
  > sl_send_reply("404","Not found");
  > };
  > }
  > else
  > {
  > log("XJAB: Going OFFline in Jabber network!!!\n");
  > if(jab_go_offline())
  > {
  > sl_send_reply("200", "Accepted");
  > }
  > else
  > {
  > sl_send_reply("404","Not found");
  > };
  > };
  > break;
  > };
  > if (method=="SUBSCRIBE")
  > {
  > if (t_newtran())
  > {
  > handle_subscription("registrar");
  > };
  > break;
  > };
  > if(!lookup("location"))
  > {
  > sl_send_reply("404","Not found");
  > break;
  > };
  > };
  >
  > if ((search("To:.*@icq\.jabber\.server\.com"))
  >         || (search("To:.*@jabber\.server\.com"))
  >         || (search("To:.*@msn\.jabber\.server\.com"))
  >         || (search("To:.*@yahoo\.jabber\.server\.com")))
  >     {
  >     if (! t_newtran())
  >     {
  > sl_reply_error();
  > break;
  >     };
  > if (method=="MESSAGE")
  > {
  >     log("MESSAGE received -> manage it with 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("200","Accepted");
  >     }else{
  > sl_send_reply("503","Service Unavailable");
  >     };
  > break;
  > };
  > if (method=="SUBSCRIBE") {
  > handle_subscription("jabber");
  > break;
  > };
  >     log("NON_Message request received for JABBER gateway->dropt!\n");
  >     sl_send_reply("202","Accepted");
  > break;
  >     };
  > if (!t_relay())
  > {
  > sl_reply_error();
  > };
  >
  >     #forward(uri:host,uri:port);
  > }
  >
  >
  > ________________________________
  >
  >
  >
  >
  >
  > _______________________________________________
  > Serusers mailing list
  > Serusers at lists.iptel.org
  > http://lists.iptel.org/mailman/listinfo/serusers
  >
  >
  >
  _______________________________________________
  Serusers mailing list
  Serusers at lists.iptel.org
  http://lists.iptel.org/mailman/listinfo/serusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20060728/51c0fe80/attachment.htm>


More information about the sr-users mailing list