snmp_synch_response() hanging - SNMP

This is a discussion on snmp_synch_response() hanging - SNMP ; On a particular RADIUS module, in order to authenticate the user, I have to make a certain check against a CISCO 2950 switch, which involves browsing a certain subtree. The code does, at a point: pdu= snmp_pdu_create(SNMP_MSG_GETNEXT); snmp_add_null_var(pdu, OID, OID_len); ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: snmp_synch_response() hanging

  1. snmp_synch_response() hanging

    On a particular RADIUS module, in order to authenticate the user, I
    have to make a certain check against a CISCO 2950 switch, which
    involves browsing a certain subtree.

    The code does, at a point:

    pdu= snmp_pdu_create(SNMP_MSG_GETNEXT);
    snmp_add_null_var(pdu, OID, OID_len);
    status= snmp_synch_response(s, pdu, &response);

    I start seeing the number of RADIUS threads increasing without bound.
    Attaching a debugger, I get that threads are stuck there for many
    minutes, even hours:

    201 status= snmp_synch_response(s, pdu, &response);
    (gdb) print s
    $1 = (struct snmp_session *) 0x552af72240
    (gdb) print *s
    $2 = {version = 0, retries = 5, timeout = 1000000, flags = 0,
    subsession = 0x0, next = 0x0,
    peername = 0x552af42ee0 "XXXXXXXX", remote_port = 0, localname =
    0x0, local_port = 0,
    authenticator = 0, callback = 0x2a97b25700 ,
    callback_magic = 0x4960be10,
    s_errno = 0, s_snmp_errno = 0, sessid = 136, community =
    0x552af6f590 "XXXXXXXX@12",
    community_len = 14, rcvMsgMaxSize = 65507, sndMsgMaxSize = 0,
    isAuthoritative = 0 '\0',
    contextEngineID = 0x0, contextEngineIDLen = 0, engineBoots = 0,
    engineTime = 0,
    contextName = 0x552af18880 "", contextNameLen = 0, securityEngineID
    = 0x0,
    securityEngineIDLen = 0, securityName = 0x0, securityNameLen = 0,
    securityAuthProto = 0x552af72580, securityAuthProtoLen = 10,
    securityAuthKey = '\0' , securityAuthKeyLen = 0,
    securityAuthLocalKey = 0x0,
    securityAuthLocalKeyLen = 0, securityPrivProto = 0x552af49580,
    securityPrivProtoLen = 10,
    securityPrivKey = '\0' , securityPrivKeyLen = 0,
    securityPrivLocalKey = 0x0,
    securityPrivLocalKeyLen = 0, securityModel = 3, securityLevel = 1,
    securityInfo = 0x0,
    myvoid = 0x0}

    It doesn't happen all the time. Some threads do get stuck, some don't,
    following no evident pattern. My understanding was the timeout should
    handle this. Was I wrong? Should I use separate timers?

    This is Red Hat Enterprise Linux AS release 4 (2.6.9-42.ELsmp) with
    net-snmp-libs-5.1.2-11.EL4.7. Should I upgrade Net-SNMP or the
    problem might be somewhere else?

    Thanks!

    Fernando.

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


  2. is it possible to install agent without root priority?

    Hi, there

    Is there a way to install net-snmp snmpd and run it by a user other than "root"?
    I know that I must specify another listening port, but besides this, what else do I have to do? Thanks!

    ------------------
    ren
    2008-10-03


    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


  3. RE: is it possible to install agent without root priority?

    > From: xiao ren [mailto:reign99@21cn.com]
    > Sent: Friday, October 03, 2008 8:37 AM


    > Is there a way to install net-snmp snmpd and run it by a user
    > other than "root"?
    > I know that I must specify another listening port, but
    > besides this, what else do I have to do? Thanks!


    Make sure that persistentDir points somewhere you have write permissions. That's really all you need to do.


    HTH,

    Mike

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


  4. Re: is it possible to install agent without root priority?

    >>>>> On Fri, 3 Oct 2008 23:36:46 +0800, "xiao ren" said:

    xr> Is there a way to install net-snmp snmpd and run it by a user other
    xr> than "root"? I know that I must specify another listening port, but
    xr> besides this, what else do I have to do? Thanks!

    You can have it run as anyone. The issues with doing so are
    that the persistent directory isn't writable (/var/net-snmp/snmpd.conf)
    but this can be changed with the SNMP_PERSISTENT_FILE and the
    SNMPCONFPATH variable.

    The bigger issue is that most OSes don't let you access much of the data
    you need in order to be able to implement many of the objects that an
    agent reports.

    The other thing you can do is start the agent as root, but set the
    "agentuser" setting in the snmpd.conf file to have it drop down to the
    privileges of a non-root user after it starts.
    --
    Wes Hardaker
    Sparta, Inc.

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


  5. Re: is it possible to install agent without root priority?

    xiao ren wrote:
    > Is there a way to install net-snmp snmpd and run it by a user other than "root"?
    > I know that I must specify another listening port, but besides this, what else do I have to do? Thanks!


    In addition to what Wes and Mike have told you already, you may find the
    following snmpd options useful:

    -r do not exit if files only accessible to root
    cannot be opened
    -u UID change to this uid (numeric or textual) after
    opening transport endpoints


    +Thomas

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


+ Reply to Thread