Fokusas | 1 Dec 2009 07:49
Picon

Re: AgentX problem

I am trying master agent and subagent from agentX library:
http://www.snmp4j.org/snmp4j-agentx-1.2.2.zip. Compiled them with Eclipse.
MasterAgent starting parameters: tcp:127.0.0.1/705 udp:127.0.0.1/705,
subagents starting parameters: 127.0.0.1/705
I am working on Win 7 OS.

**

2009/11/30 Frank Fock <fock@...>

> It means, someone send an incorrect message format.
> If you need more information, please provide more
> (i.e., versions, software you used for master and
> subagent, configuration..)
>
> Fokusas wrote:
>
>> Hi,
>>
>> When i try to register OID with subagent, and master agent shows me this
>> message:
>> *SEVERE: ASN.1 parse error (message is not a sequence)
>> Nov 30, 2009 9:57:32 AM org.snmp4j.log.JavaLogAdapter log
>> SEVERE: java.io.IOException: Unexpected end of input stream at position 2
>> *
>> What does it mean?
>>
>> Fokusas
>> _______________________________________________
>> SNMP4J mailing list
(Continue reading)

Picon
Favicon

(no subject)


DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named
recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions
presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its
affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or
publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you
have 
received this email in error please delete it and notify the sender immediately. Before opening any mail
and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------
Frank Fock | 1 Dec 2009 21:00
Favicon

Re: AgentX problem

This setup cannot work. The parameters for the master
agent define the SNMP listen addresses (not the
AgentX listen address). When you listen for SNMP
packets, you cannot listen for AgentX.

Regards,
Frank

Fokusas wrote:
> I am trying master agent and subagent from agentX library:
> http://www.snmp4j.org/snmp4j-agentx-1.2.2.zip. Compiled them with Eclipse.
> MasterAgent starting parameters: tcp:127.0.0.1/705 udp:127.0.0.1/705,
> subagents starting parameters: 127.0.0.1/705
> I am working on Win 7 OS.
> 
> **
> 
> 2009/11/30 Frank Fock <fock@...>
> 
>> It means, someone send an incorrect message format.
>> If you need more information, please provide more
>> (i.e., versions, software you used for master and
>> subagent, configuration..)
>>
>> Fokusas wrote:
>>
>>> Hi,
>>>
>>> When i try to register OID with subagent, and master agent shows me this
>>> message:
(Continue reading)

Tetsuro Motoyama | 3 Dec 2009 01:37

Basic test run question

I am new to the snmp4j and trying to test if I can run the simple program.

I took sample from SNMP class and created the following program that is
not working.  It compiles and runs with the outputs below.
Can anyone help me?

===================================================================
package Test;
import java.io.IOException;

import org.snmp4j.*;
import org.snmp4j.event.ResponseEvent;
import org.snmp4j.event.ResponseListener;
import org.snmp4j.mp.MPv3;
import org.snmp4j.mp.SnmpConstants;
import org.snmp4j.security.SecurityModels;
import org.snmp4j.security.SecurityProtocols;
import org.snmp4j.security.USM;
import org.snmp4j.smi.Address;
import org.snmp4j.smi.GenericAddress;
import org.snmp4j.smi.OID;
import org.snmp4j.smi.OctetString;
import org.snmp4j.smi.VariableBinding;
import org.snmp4j.transport.DefaultUdpTransportMapping;

public class TestClass {

	/**
	 *  <at> param args
	 */
(Continue reading)

Frank Fock | 3 Dec 2009 08:42
Favicon

Re: Basic test run question

Everything is OK. You just encounter a timeout (no response
from the agent). Check the agent address and community.

Frank

Tetsuro Motoyama wrote:
> I am new to the snmp4j and trying to test if I can run the simple program.
> 
> I took sample from SNMP class and created the following program that is
> not working.  It compiles and runs with the outputs below.
> Can anyone help me?
> 
> ===================================================================
> package Test;
> import java.io.IOException;
> 
> import org.snmp4j.*;
> import org.snmp4j.event.ResponseEvent;
> import org.snmp4j.event.ResponseListener;
> import org.snmp4j.mp.MPv3;
> import org.snmp4j.mp.SnmpConstants;
> import org.snmp4j.security.SecurityModels;
> import org.snmp4j.security.SecurityProtocols;
> import org.snmp4j.security.USM;
> import org.snmp4j.smi.Address;
> import org.snmp4j.smi.GenericAddress;
> import org.snmp4j.smi.OID;
> import org.snmp4j.smi.OctetString;
> import org.snmp4j.smi.VariableBinding;
> import org.snmp4j.transport.DefaultUdpTransportMapping;
(Continue reading)

Gianluca Uberti | 3 Dec 2009 09:58
Favicon

SNMP4J Agent 1.3.2: NullPointer Exception when receiving GET requests with unknown community strings

Hi there,
I am trying to develop an SNMP agent capable of responding to V1 and V2c
requests with the help of SNMP 4J Agent framework version 1.3.2;
my community string is configured as "public"; any time the agent
receives a V2c GET request with a community string different from
"public", it hangs and the following exception is logged:

20091202 173258 CET [ERROR] <DefaultUDPTransportMapping> PTMA0000:
java.lang.NullPointerException
Trace for the exception:
java.lang.NullPointerException
    at java.util.TreeSet.<init>(TreeSet.java:154)
    at
org.snmp4j.agent.mo.snmp.SnmpCommunityMIB.getCoexistenceInfo(SnmpCommunityMIB.java:546)
    at
org.snmp4j.agent.CommandProcessor.processPdu(CommandProcessor.java:116)
    at
org.snmp4j.MessageDispatcherImpl.fireProcessPdu(MessageDispatcherImpl.java:610)
    at
org.snmp4j.MessageDispatcherImpl.dispatchMessage(MessageDispatcherImpl.java:287)
    at
org.snmp4j.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:347)
    at
org.snmp4j.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:309)
    at
org.snmp4j.transport.AbstractTransportMapping.fireProcessMessage(AbstractTransportMapping.java:83)
    at
org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run(DefaultUdpTransportMapping.java:364)
    at java.lang.Thread.run(Thread.java:619)

(Continue reading)

Smith, Gary | 3 Dec 2009 10:14

SNMPv3 Key Localization (repost)

Hi Frank

Sent this a few days back but have seen no response, it may well be that
I just need to read up more on the topic but the sample code is in
error:

I'm a little confused by SNMPv3 Key Localization and your example:

https://server.oosnmp.net/confluence/pages/viewpage.action?pageId=144180
0

snmp.getUSM().addLocalizedUser(engineID, sharedUserName,

    AuthMD5.getID(), new OctetString("md5Passphrase"),

    PrivDES.getID(), new OctetString("desPassphrase"));

In the example you call USM.addLocalizedUser(...) with OctetString
passphrases for auth & priv but as I understand the method these should
be byte[] passkeys.  And, indeed, the sample code will not compile.

These passphrases should be converted to passkeys.  I'm assuming this
should _not_ be by adding a simple getValue() (because how do I get
passkeys if not from passphrases), so should I instead be using

snmp.getUSM().addLocalizedUser(engineID, sharedUserName,

    AuthMD5.ID, 

    SecurityProtocols.getInstance().
(Continue reading)

Frank Fock | 3 Dec 2009 20:46
Favicon

Re: SNMP4J Agent 1.3.2: NullPointer Exception when receiving GET requests with unknown community strings

Hi Gianluca,

This is indeed a bug. Although it has no security
relevance, it has regarding authenticationFailure
trap generation and counter incrementation.

The below patch fixes it:

Index: SnmpCommunityMIB.java
===================================================================
--- SnmpCommunityMIB.java	(revision 1664)
+++ SnmpCommunityMIB.java	(working copy)
 <at>  <at>  -543,8 +543,10  <at>  <at> 
      if (coexistenceInfo == null) {
        return null;
      }
-    SortedSet cinfos = new 
TreeSet((SortedSet)coexistenceInfo.get(community));
+    SortedSet cinfos = (SortedSet)coexistenceInfo.get(community);
      if (cinfos != null) {
+      // make a copy to improve consistency on concurrent access
+      cinfos = new TreeSet(cinfos);
        Iterator it = cinfos.iterator();
        CoexistenceInfo[] infos = new CoexistenceInfo[cinfos.size()];
        for (int i=0; i<infos.length; i++) {

Best regards,
Frank

Gianluca Uberti wrote:
(Continue reading)

Frank Fock | 3 Dec 2009 22:08
Favicon

Re: SNMPv3 Key Localization (repost)

Hi Gary,

The example in the Wiki is indeed misleading. I have updated
it.

Regards,
Frank

Smith, Gary wrote:
> Hi Frank
> 
>  
> 
> Sent this a few days back but have seen no response, it may well be that
> I just need to read up more on the topic but the sample code is in
> error:
> 
>  
> 
> I'm a little confused by SNMPv3 Key Localization and your example:
> 
>  
> 
> https://server.oosnmp.net/confluence/pages/viewpage.action?pageId=144180
> 0
> 
>  
> 
> snmp.getUSM().addLocalizedUser(engineID, sharedUserName,
> 
(Continue reading)

Group | 5 Dec 2009 01:01
Picon

How to setup SNMP4J

Hi,

I have downloaded the SNMP4J snmp4j-1.10.2. How can i build and run the
code?.
I didnot find a way to install through command line. I know that its a silly
question,
but i'm completely to this java environment and i'm not finding any help
manuals
on this. Can any one please help me out in this regard. Thanks in advance.

Gmane