ru_44 | 6 Jul 22:58 2016
Picon

SNMP4j dropping response causing timeout in manager


 Hi Frank,
I have an snmpManager application running (IP 192.168.240.30/24) that is polling my snmp4j agent (snmp4j
agent v2.5.0/snmp4j 2.5.0 - IP 192.168.240.20/24). 

In my manager I am using snmp4j 2.5.0 for my snmp requests.
I see, somewhat frequently, timeouts occurring on my manager even though I am getting responses.

The responses are actually returned from my agent to my manager.  I verified it in wireshark and I see the
response received in my log but for some reason the packet is getting dropped I think by snmp4j before it
reaches my application.  
Then 10 seconds later (my timeout value) I see the request timeout in  my log due to the response being dropped.
I have looked into it but getting nowhere so not sure if its a timing thing or something related to my manager application.

I have attached the snmp4j log (snmp4j-timeout_2.log) and the wireshark capture
(nullpreset12-snmp4j-timeout.pcapng) of a request and the response returned from the agent but
getting dropped by my manager.
the snmp message ID  is 62420 and the PDU request ID is 2117843898.

I only have 1 thread running that is polling the agent.

The timestamp in the log for the request being sent is 
2016-07-06 13:34:43,673
The response is received at 
2016-07-06 13:34:43,683
I see the request handle lookup for the response at 
13:34:43,685 
I see a subsequent request handle cancel at 
2016-07-06 13:34:43,688 but its for a different PDU request ID (129664087).

(Continue reading)

Ken Springhetti | 27 Jun 20:26 2016
Picon

Supporting an Enterprise MIB using SNMP4J

Hi,My name is Ken, I am new to SNMP4J.  I have a device runnung Linux which uses an SNMP Agent to service an
Enterprise MIB of our own creation. I am working on the next generation of that product which will be Java
based and use SNMP4J Agent, instead of the NET-SNMP Agent which was extended using C language API's to
support ourenterprise MIB, and also supported the standard MIB-II and other popular MIBS.

What I want to do is implement an agent with SNMP4J, setup our Enterprise MIB, compile it, incorporate it
into the agent, and implement the code that goes and gets that data from the database for each point.
This seems to be to be the most common scenario many would want to do, but I cannot find an example of this. 
1. Could someone point me at an example program that does this (with a custom mub compiled and the back end
implemented)2. Could someone , in plain terms, outline the sections of the Agent architecture that I
would need to implement and point me at the API calls I'd use to do it. (a commentary on the above example)3.
Tell me which products I may need to purchase to get this job done, and which products I dont need to
purchase, but would be very useful in getting the job done faster or better.
My boss has ordered a license for the SNMP4J-SMI-PRO, and other than parsing text MIBS at runtime, I am
having a hard time seeing how this product gets me where I need to go.
I understand the parts and pieces of SNMP Agents as a whole, but I am looking to understand the SNMP4J system
better and get this done.
Thank you in advance for any advice, examples, tips or support. 
Ken Springhetti
 		 	   		  
_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j
nino fattore | 17 Jun 22:31 2016
Picon

Virtual tables

It is not clear to me how a virtual table is implemented. Any example code to implement a virtual table could
be of help.Thanks,Nino Fattore
_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j
ulrich berl | 16 Jun 16:36 2016
Picon
Picon

snmp4j-agent 2.5.0 - TestAgent: coldStartTrap not sent


Hi !
 
I use the snmp4j-agent 2.5.0 - TestAgent
 
I can't see the coldStartTrap anyhow (or some other traps from MyCustomMib)...(tried several vacm
views (as i get a 'Access denied by VACM' - see log), different access groups ecc).
GET requests works fine (on MyCustomMib).
 
May you can help me ?

Thanks

INFO  | NotificationOriginatorImpl       | Notification 1.3.6.1.6.3.1.1.5.1 reported with [] for context
DEBUG | DefaultUdpTransportMapping       | UDP receive buffer size for socket 0.0.0.0/4700 is set to: 106496
DEBUG | VacmMIB                          | VACM access requested for context=, securityName=cpublic, securityModel=2,
securityLevel=3, viewType=0, OID=1.3.6.1.6.3.1.1.5.1
DEBUG | VacmMIB                          | Found group name 'v1v2group' for secName 'cpublic' and secModel 2
DEBUG | VacmMIB                          | Got views
[DefaultMOMutableRow2PC[index=9.118.49.118.50.103.114.111.117.112.6.112.117.98.108.105.99.0.1,values=[1,
fullReadView, fullWriteView, fullNotifyView, 3, 1]] for group name 'v1v2group'
DEBUG | VacmMIB                          | Matching against access entry
DefaultMOMutableRow2PC[index=9.118.49.118.50.103.114.111.117.112.6.112.117.98.108.105.99.0.1,values=[1,
fullReadView, fullWriteView, fullNotifyView, 3, 1] with exactContextMatch=false,
prefixMatch=false, matchSecModel=true and matchSecLevel=true
WARN  | NotificationOriginatorImpl       | Access denied by VACM for 1.3.6.1.6.3.1.1.5.1

    protected void addNotificationTargets(SnmpTargetMIB targetMIB,
                                          SnmpNotificationMIB notificationMIB) {
        targetMIB.addDefaultTDomains();
(Continue reading)

Frank Fock | 8 Jun 23:09 2016

AgenPro 4.1.1 Released

Hi,

AgenPro 4.1.1 has been released to fix a regression in the user code parser which
removed the leading line feed character from parsed user code with the (old but 
widely used) //—AgentGen user code delimiter.

RELEASE NOTES

* Fixed: Regression in the user code parser for --AgentGen delimiters
  which removed the leading newline from the user code.

Frank Fock

_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j
nino fattore | 28 May 00:43 2016
Picon

Please need help with trap filtering

I'd like to know what is wrong with my code!My goal is to learn how to filter notification sent out.With the
following  code i am trying to use the NotifyFilterTable and NotifyFilterProfileTable to send 
all the traps to all the targets. the following step (once the following code is working) is to try to send
different traps to different targets.Thanks,Nino

 protected void addNotificationTargets(SnmpTargetMIB targetMIB,
                                       
SnmpNotificationMIB notificationMIB) {
    targetMIB.addDefaultTDomains();
    
  
    targetMIB.addTargetAddress(new OctetString("notificationV3"),
                               TransportDomains.transportDomainUdpIpv4,
                               new OctetString(new UdpAddress("92.135.77.100/162").getValue()),
                              
                               500, 1,
                               new OctetString("notify"),
                               new OctetString("v3notify"),
                               StorageType.permanent);

    targetMIB.addTargetParams(new OctetString("v3notify"),
                              MessageProcessingModel.MPv3,
                              SecurityModel.SECURITY_MODEL_USM,
                              //new OctetString("v3notify"),
                              //SecurityLevel.NOAUTH_NOPRIV,
                             // new OctetString("SHADES"),
                              new OctetString("NINO"),
                              SecurityLevel.AUTH_PRIV,
                              StorageType.permanent);
   
(Continue reading)

Sudharani S | 26 May 07:28 2016

Network discovery usig snmp4j

Hi  Frank,
Can you please in this.
I am new SNMP protocol ,I have below requirement.Can anyone please help in 
this below requirement.


I need the guidance to start with this,I mean please let me know what all the 
  things I need to include to do this.
   And how to do snmp walk to pim neighbors table?,I have a snmp service enabled 
   in my system apart from this what all the jar files need to be include let me 
   know please.
 
  The requirement follows like this:
  1)To implement multicast network discovery using snmp in java 2)Create 
   CompletedRouterList (initially NULL) to store the routers for which discovery 
  was complete and a PendingRouterList containing the routers for which 
  discover is pending.
  3)At initialization time, statically populate the PendingRouterList with 
  initial set of routers from some config file.
  4)For each router in the PendingRouterList, if multicast is enabled then 
  query the pimInterfaceTable to obtain the list of interfaces on which PIM is 
  enabled. For example if R1 has PIM enabled and has interfaces 1/1 and 1/2/ on 
   which PIM is enabled then we will have:-
            1/2         1/1
      --------- R1 ----------
 5)For each router that has at least 1 interface that has PIM enabled on it, 
 query it's PIM Neighbor table to obtain the list of it's PIM neighbors. PIM 
 neighbor table also gives the interface index with which the router is 
 connected with it's neighbor. This information can be used to build the link 
 between the router and neighbor(s).
(Continue reading)

ru_44 | 18 May 15:19 2016
Picon

Null Pointer Exception - MOSubTreeProxy snmp4jAgent v2.5.0


Hi Frank,I recently upgraded to snmp4j 2.5.0 and snmp4j agent v2.5.0. There’s a bugfix in SNMP4J v2.5.0
which causes a Null Pointer Exception when we use
the MOSubtreeProxy in SNMP4J-Agent v2.5.0

http://www.snmp4j.org/CHANGES.txt

* Fixed [SFJ-121]:
DefaultPDUFactory.createPDU does not set contextName and contextEngineID on
ScopedPDU

  instances.

The MOSubtreeProxy class needs to set (or initialize) the
contextEngineID & contextEngineName in the DefaultPDUFactory inside its
constructor.  Currently when the
DefaultPDUFactory.applyContextInfoToScopedPDU() is called via DefaultPDUFactory.createPDU(),
both fields are NULL.

22767 [DefaultUDPTransportMapping_192.168.1.90/161]
DEBUG org.snmp4j.agent.mo.snmp.VacmMIB  - Access allowed for view
'fullReadView2' by subtree 1.3 for OID 1.3.6.1.2.1.1.1.0

java.lang.NullPointerException: Context engine ID
must not be null

        at
org.snmp4j.ScopedPDU.setContextEngineID(ScopedPDU.java:69)

        at
(Continue reading)

nino fattore | 13 May 20:47 2016
Picon

nedeed help to use the addNotificationtargets() API

I'd like to use the addNotificationTargets() agent API to add a new target for notifications when the agent
is running.How can get to it and providing the SnmpTargetMIB and SnmpNotiicationMIB?Thanks,Nino
_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j
nino fattore | 13 May 20:21 2016
Picon

forget password to the list

how can i retrieve the password?ThanksNino Fattore
_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j
atike.demirbas | 13 May 12:10 2016
Picon

[Fwd: java.lang.IllegalArgumentException error]

---------------------------- Original Message ----------------------------
Subject: java.lang.IllegalArgumentException error
From:    atike.demirbas <at> ogr.deu.edu.tr
Date:    Wed, May 11, 2016 4:02 pm
To:      snmp4j <at> agentpp.org.
--------------------------------------------------------------------------

Hello,
I have developed an software for my school project. I have tried to
collect information on agent machines. When i do it for snmpv1, it is okay
but when i do it for snmpv3 i have an error. I have searched this problem
however i haven't found it. Please, help me.

There is my code;

Snmp client=null;
        try{
            client=new Snmp(new DefaultUdpTransportMapping());
            Address add=new UdpAddress("192.168.2.3/161");
            client.listen();

          //  USM usm=new USM(SecurityProtocols.getInstance(),new
//OctetString("MPv3.createLocalEngineID()"),0);
         //   SecurityModels.getInstance().addSecurityModel(usm);

             UsmUser user = new UsmUser(new OctetString("nagios"),
                                     AuthMD5.ID,
                                     new OctetString("User3Password"),
                                     PrivDES.ID,
                                     new OctetString("User3Encyrption"));
(Continue reading)


Gmane