[OpenSIPS-Users] strange behaviour of SNMPstats and usrloc with and without mysql backend

Marc Leurent marc.leurent at vtx-telecom.ch
Tue May 5 11:18:26 CEST 2009


Good morning Bogdan, hello everybody!
About the problem I had with the snmpstats module, I think that I understand the bug: with usrloc db_mode 1 or 2, when I restart OpenSIPs,
usrloc has kept the user data, but snmpstats not. To summurize: snmpstats won't show data about users that was registered before an OpenSIPs restart even if the user register again after!

So if I'm registered on OpenSIPs and I restart it => snmpstats won't be able to show data about my user event if I register/unregister
but if I'm not registered on OpenSIPs and I restart it and only afer I register on it => snmpstats will show data about my new user

I think you can reproduce this easily!

Secondly, yesterday during these tests, I had several OpenSIPs crash running some snmpwalk on OpenSIPs, and I was able to reproduce it!

To reproduce the crash, I was running this command to get data from OpenSIPs through SNMP and I was registering/unregistering my account in the same time!

	while echo 1; do
	snmpwalk -c public -v 2c 127.0.0.1 .1.3.6.1.4.1.27483
	done

Here is the openips log file I had: http://www.pastebin.ca/1412212
I think line 42 isn't really good => CRITICAL:core:receive_fd: EOF on 24


I'm using:
version: opensips 1.5.1-notls (x86_64/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
svnrevision: unknown
@(#) $Id: main.c 5469 2009-03-18 12:43:10Z bogdan_iancu $
main.c compiled on 19:03:00 Apr 30 2009 with gcc 4.1.2

Thank you for your help and time!
Have a nice day!


-- --
Marc LEURENT
Ingénieur VoIP

DECKPOINT SA
Une société du groupe VTX Telecom
================================================================
Rue Eugène-Marziano 15 - 1227 Les Acacias
http://www.vtx.ch - marc.leurent at vtx-telecom.ch
----------------------------------------------------------------
VTX, votre partenaire telecom proche de vous !
================================================================

Le Monday 04 May 2009 18.23:52 Bogdan-Andrei Iancu, vous avez écrit :
> Hi Marc,
> 
> what opensips version are you using?
> 
> also, for db_mode 2, when pushing the snmp query, do you get any errors 
> in opensips?
> 
> Regards,
> Bogdan
> 
> Marc Leurent wrote:
> > Hello all, I have noticed something strange about snmpstats and usrloc...
> > Have you got any explanation for me?
> > Thanks!
> >
> > When I set the usrloc | db_mode parameter to 0 or 1 (0 - This disables database completely. 1 - Write-Through scheme.)
> > I can get Contact data through the snmpstats module!
> > snmpwalk -c public -v 2c 127.0.0.1 .1.3.6.1.4.1.27483
> > ...
> > OPENSER-SIP-SERVER-MIB::openserSIPContactDisplayName.2.1 = STRING: sip:02131150 at 14.38.160.13:5070
> > OPENSER-SIP-SERVER-MIB::openserSIPContactURI.1.1 = STRING: DefaultUser
> > OPENSER-SIP-SERVER-MIB::openserSIPContactURI.2.1 = STRING: sip:02131150 at 14.38.160.13:5070
> > ...
> >
> >
> > but when I set  usrloc | db_mode parameter to 2 (2 - Write-Back scheme) I don't get anything from the snmpstats module
> > snmpwalk -c public -v 2c 127.0.0.1 .1.3.6.1.4.1.27483
> > OPENSER-SIP-SERVER-MIB::openserSIPContactDisplayName.1.1 = STRING: DefaultUser
> > OPENSER-SIP-SERVER-MIB::openserSIPContactURI.1.1 = STRING: DefaultUser
> > ...
> >
> > Have a nice day!
> > ++
> >
> >
> > the part of my opensips.cfg file about usrloc params
> >
> > # ----- usrloc params -----
> > /* modparam("usrloc", "db_mode",   X)
> >    for location entries
> >         0 - This disables database completely.
> >         1 - Write-Through scheme. All changes to usrloc are immediately reflected in database too.
> >         2 - Write-Back scheme. This is a combination of previous two schemes. All changes are made to memory and database synchronization is done in the timer.
> >         3 - DB-Only scheme. No memory cache is kept, all operations being directly performed with the database.
> > */
> > modparam("usrloc", "db_mode", 1)
> > modparam("usrloc", "db_url", "mysql://opensips:UqwdwfuJ@localhost/opensips")
> > modparam("usrloc", "nat_bflag", 6)              # The index of the branch flag to be used as NAT marker (if the contact is or not natted).
> > modparam("usrloc", "use_domain", 0)             # If the domain part of the user should be also saved and used for identifing the user
> > modparam("usrloc", "desc_time_order", 0)        # If the user's contacts should be kept timestamp ordered; otherwise the contact will be ordered based on q value.
> > modparam("usrloc", "timer_interval", 30)        # The module uses timer to delete expired contacts, synchronize with database and other tasks, that need to be run periodically.
> > modparam("usrloc", "matching_mode", 0)          # What contact matching algorithm to be used. 0 - CONTACT ONLY based matching algorithm
> > modparam("usrloc", "cseq_delay", 20)            # Delay (in seconds) for accepting as retransmissions register requests with same Call-ID and Cseq.
> > modparam("usrloc", "fetch_rows", 2000)          # number of the rows to be fetched at once from database when loading the location records.
> > modparam("usrloc", "hash_size", 9)              # Number of entries of the hash table used by usrloc to store the location records is 2^hash_size.
> >
> >
> >
> >
> >
> > -- --
> > Marc LEURENT
> > Ingénieur VoIP
> >
> > DECKPOINT SA
> > Une société du groupe VTX Telecom
> > ================================================================
> > Rue Eugène-Marziano 15 - 1227 Les Acacias
> > http://www.vtx.ch - marc.leurent at vtx-telecom.ch
> > ----------------------------------------------------------------
> > VTX, votre partenaire telecom proche de vous !
> > ================================================================
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >   
> 
> 





More information about the Users mailing list