George Tsaloukidis | 1 Apr 2009 15:11
Picon
Favicon

NullPointerException while resending a GET request

Dear Frank,

I am using snmp4j version 1.9.3d for executing synchronous snmp GET requests.
My application has many threads, but each thread uses its own org.snmp4j.Snmp instance.
Sometimes I get the following exception:

java.lang.NullPointerException
        at org.snmp4j.Snmp$PendingRequest.pduHandleAssigned(Unknown Source)
        at org.snmp4j.MessageDispatcherImpl.sendPdu(Unknown Source)
        at org.snmp4j.Snmp.sendMessage(Unknown Source)
        at org.snmp4j.Snmp$PendingRequest.run(Unknown Source)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
Exception in thread "Timer-4877612" java.lang.NullPointerException
        at org.snmp4j.Snmp$PendingRequest.pduHandleAssigned(Unknown Source)
        at org.snmp4j.MessageDispatcherImpl.sendPdu(Unknown Source)
        at org.snmp4j.Snmp.sendMessage(Unknown Source)
        at org.snmp4j.Snmp$PendingRequest.run(Unknown Source)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)

After rebuilding SNMP4J.jar with debug information I saw that the problem was at line 1449 of Snmp.java file:

        long delay = timeoutModel.getRetryTimeout(target.getRetries() -
                                                  retryCount,
                                                  target.getRetries(),
                                                  target.getTimeout());

That means the target object was null while trying to retransmit the request.
That can happen only for two reasons: a) PendingRequest of the retry action created
(Continue reading)

Frank Fock | 5 Apr 2009 23:44
Favicon

Re: Mapping JMX notification To SNMP trap

Hi,

Have you studied the JvmManagementMibInst.java example
already?

When using the SNMP4J-AgentJMX framework, you do not
need to call the NotificationOriginator directly.

Without knowing your notification type MIB specification
and not knowing the MBean definition, I cannot help
you defining the JMXNotificationIndexSupport.

As the JavaDoc of JMXNotificationIndexSupport reads,
you need to map a JMX notification data object to
an instance OID suffix for SNMP. That mapping is
performed by such an object.

Best regards,
Frank

wafae alami wrote:
> hi ,
> 
> I want to make a mapping between between JMX notifications received from an
> MbeanServer to SNMP trap to send to snmp manager .
> In my class I have added a listener to those notifications , but when
> received I have the following message :
> 
>  27 mars 2009 16:14:31 org.snmp4j.log.JavaLogAdapter log
> INFO: No PDU handler found for request
(Continue reading)

Frank Fock | 6 Apr 2009 00:08
Favicon

Re: NullPointerException while resending a GET request

Hi George,

Synchronizing the PendingRequest.cancel() method causes deadlock
problems. The source problem is the early object release
in that method. The retry creation phase can be protected by
a simple flag that is true (on) while the next retry is being
prepared and not yet sent.

Please replace the PendingRequest class in Snmp.java with the
code below (or the next nightly build) and let me know if
the NPE goes away:

Best regards,
Frank

   class PendingRequest extends TimerTask implements PduHandleCallback {

     private PduHandle key;
     protected int retryCount;
     protected ResponseListener listener;
     protected Object userObject;

     protected PDU pdu;
     protected Target target;
     protected TransportMapping transport;

     private int requestStatus = 0;
     // Maximum request status - allows to receive up to two reports and 
then
     // send the original request again. A value of 0 is used for discovery.
(Continue reading)

Frank Fock | 6 Apr 2009 01:40
Favicon

Re: SnapshotAgent is causing a java.lang.ClassNotFoundException: com.agentpp.snmp.SerializableMIBInstance

Hi,

Licensed users of MIB Explorer Pro 2 may download and
use the SnapshotConv.jar program from
http://www.mibexplorer.com/SnapshotConv.jar
to run

java -jar SnapshotConv.jar [-h] <mibexplorer-snaphost-file>
<snmp4j-snapshot-file>

It converts MIB Explorer Pro snapshot files to SNMP4J
snapshot files.

Best regards,
Frank

dfm000h-snmp4j@... wrote:
> Hello,
> 
> I want to use the SnapshotAgent and generated a Snapshot with the MibExlorer Pro. When I started the Agent a
ClassNotFoundException is thrown as you can see below:
> 
> 789 [main] ERROR org.snmp4j.agent.test.SnapshotAgent  - Error while
> reading snapshot file
> 'test1.sf':com.agentpp.snmp.SerializableMIBInstance
> java.lang.ClassNotFoundException:
> com.agentpp.snmp.SerializableMIBInstance
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
(Continue reading)

Subanesh | 6 Apr 2009 15:58
Picon

SNMP4J command line tool does not work for AES192/256 snmpv3 users

Hi,
 Am facing the following problem with AES 192 ,AES 256 and 3DES privacy
protocols.
 SNMP queries using users which use AES128/DES privacy protcols work
fine,however the same queries don't work when queried with the SNMPv3 users
which use AES192/256 or 3DES privacy protocols.I have also downloaded the
necessary JCE files from SUN to the javahome.
   For AES192/256 user I recieve a Request Timeout and for DES I recieve the
following error.
  "org.snmp4j.MessageException: Message processing model 3 returned error:
1403"

I tried increasing timeouts but the same results. I searched the mail
archives and came across a similar problem (
http://lists.agentpp.org/pipermail/snmp4j/2007-September/002464.html ) but
without any resolution. Can you please help me out with this ? Am using
snmp4 tool version 1.9.3.

PS:-I also tried writing simple java programs which use SNMP4j APIs and
faced the same problem.
--

-- 
Subanesh
Frank Fock | 6 Apr 2009 18:57
Favicon

Re: SNMP4J command line tool does not work for AES192/256 snmpv3 users

Hi Subanesh,

What device (agent) are you using? Does it support AES256?
The error code 1403 means that you did not setup the
USM configuration properly (security level is not supported
or inconsistent configured).

Best regards,
Frank

Subanesh wrote:
> Hi,
>  Am facing the following problem with AES 192 ,AES 256 and 3DES privacy
> protocols.
>  SNMP queries using users which use AES128/DES privacy protcols work
> fine,however the same queries don't work when queried with the SNMPv3 users
> which use AES192/256 or 3DES privacy protocols.I have also downloaded the
> necessary JCE files from SUN to the javahome.
>    For AES192/256 user I recieve a Request Timeout and for DES I recieve the
> following error.
>   "org.snmp4j.MessageException: Message processing model 3 returned error:
> 1403"
> 
> I tried increasing timeouts but the same results. I searched the mail
> archives and came across a similar problem (
> http://lists.agentpp.org/pipermail/snmp4j/2007-September/002464.html ) but
> without any resolution. Can you please help me out with this ? Am using
> snmp4 tool version 1.9.3.
> 
> PS:-I also tried writing simple java programs which use SNMP4j APIs and
(Continue reading)

Frank Fock | 6 Apr 2009 20:33
Favicon

Released: AgenPro 2.7.2a

Hi,

AgenPro 2.7.2a has been released today to fix
a incompatibility with Java 1.6.0_13_b03 which
causes a NullPointerException when opening the
Project Editor in the GUI.

Frank Fock

--

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
srinivasan veerapandian | 7 Apr 2009 06:40
Picon

Sending traps using TestAgent?

Hi,

1/ Can you please guide me for sending traps using TestAgent class?

2/ Does sending own traps requires any custom MIBs to be written?

Thanks,
Srini
Frank Fock | 8 Apr 2009 00:24
Favicon

Downtime AGENT++ Mailing List & Tools Server


Due to necessary system maintenance, the AGENT++ mailing
lists hosted on agentpp.org as well as the free MIB checker
and the evaluation license generator hosted on oosnmp.com
will be down from

2009-04-09 10:00:00 MET
until
2009-04-13 20:00:00 MET

If the systems are up earlier, I will send a notice on
all AGENT++ mailing lists.

Thank you for your understanding.

Frank Fock

--

-- 
AGENT++
http://www.snmp4j.com
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
Karthik.s | 8 Apr 2009 12:53
Picon

Connecting to a firewall

hi,I am developing an application, where i am writing a java code to get the
information  like no. of active connection,ip and port no of the systems
from a company firewall.For this i need to log into the company firewall.but
i dont know how to impllement it.Please help me in this issue

--

-- 
Regards,
Karthik.s

Gmane