[SNMP4J] About IllegalStateException

=??b?wfi9wrn8?= steve at nextdata.co.kr
Fri Dec 15 01:06:57 CET 2006


$)CHi,

I have interested the problems you wrote since I had found the behavior
of the Snmp class something incorrect.
In my case, I wrote a new class send PDUs to target and process the timeout
because I made a conclusion that the JAVA timer itself can produce a problem
on resource handling when we try to make up well organized software architecture.
And finally I use very little time slice of CPU and have succeeded to get timeout result 
under 5msec tolerance.

My aproach is use just another one watch up thread and polling the 
SNMP responses of all PDUs we have send.

the part of source code

while(true)
{
  try
  {
    sleep(0,1);

    for(..) // monitoring results of..
    {
       //some code stuffs that watch up
       ..
       sleep(0,1);
    }
  }
}

I hope my approch can be helpful to you.

Regards,
Steve Jin 

--------------------- Original Messages ---------------------
From: snmp4j-request at agentpp.orgSubject: SNMP4J Digest, Vol 35, Issue 9
Subject: 



Send SNMP4J mailing list submissions to
snmp4j at agentpp.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.agentpp.org/mailman/listinfo/snmp4j
or, via email, send a message with subject or body 'help' to
snmp4j-request at agentpp.org

You can reach the person managing the list at
snmp4j-owner at agentpp.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of SNMP4J digest..."


Today's Topics:

1. IllegalStateException in Snmp.send() (Alberto)
2. Virtual SNMPv3 Server (Keary Parinis)
3. CHANGE OF THE SENDER IP (RC_Insignia)
4. Re: IllegalStateException in Snmp.send() (Frank Fock)
5. Re: CHANGE OF THE SENDER IP (Frank Fock)
6. Re: Virtual SNMPv3 Server (Frank Fock)
7. Re: Virtual SNMPv3 Server (Keary Parinis)
8. R: Re: [SNMP4J] IllegalStateException in Snmp.send() (Alberto)
9. Re: R: Re: [SNMP4J] IllegalStateException in Snmp.send()
(Fabian Nart)


----------------------------------------------------------------------

Message: 1
Date: Wed, 13 Dec 2006 16:38:28 +0100 (CET)
From: Alberto 
Subject: [SNMP4J] IllegalStateException in Snmp.send()
To: snmp4j at agentpp.org
Message-ID:
<32705453.1240591166024308212.JavaMail.defaultUser at defaultHost>
Content-Type: text/plain;charset="UTF-8"

Hello,
I refer to the correction provided in v1.7.1 and described by Frank in email 
below.
Since I got the same problem in my project, I downloaded the SNMP4J version 
1.7.5 and reproduced the error with log4j logs enabled.
Here the result (just reported the PduHandle with the problem, but if you need 
I have the complete logs):

13/12/2006 14:30:30:131 DEBUG [pool-10-thread-22] [Log4jLogAdapter.debug] New 
pending request with handle PduHandle[1826954335]
....
13/12/2006 14:30:45:579 DEBUG [Timer-15] [Log4jLogAdapter.debug] Running 
pending request (3 left) with handle: PduHandle[1826954335]
....
13/12/2006 14:31:00:587 DEBUG [Timer-15] [Log4jLogAdapter.debug] Running 
pending request (2 left) with handle: PduHandle[1826954335]
....
13/12/2006 14:31:00:589 DEBUG [SNMPDriverDispatchPool.2] [Log4jLogAdapter.
debug] Looking up pending request with handle PduHandle[1826954335]
....
13/12/2006 14:31:00:591 ERROR [Timer-15] [Log4jLogAdapter.error] Failed to 
process pending request PduHandle[1826954335] because Task already scheduled or 
cancelled
java.lang.IllegalStateException: Task already scheduled or cancelled
at java.util.Timer.sched(Timer.java:358)
at java.util.Timer.schedule(Timer.java:170)
at org.snmp4j.Snmp$PendingRequest.run(Snmp.java:1426)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
....
13/12/2006 14:31:00:590 DEBUG [pool-10-thread-22] [Log4jLogAdapter.debug] 
Removed pending request with handle: PduHandle[1826954335]
....

It seems there is a relation between the time the Timer-15 is checking the 
handle for the second time (14:31:00:587) and the time the answer comes (14:31:
00:589). They are really very closed one to the other.
Maybe a synchronization problem among threads?

Of course, after Timer-15 thread dies, no Snmp primitive to the agent is 
possible anymore and my application has to be restarted.

Can you help, please?
Regards,
Alberto


Frank wrote:

> Hi Fabian,
> 
> We can catch only a RuntimeException and rethrow it. I have
> changed the code as follows for v1.7.1:
> 
> /**
> * run
> */
> public synchronized void run() {
> try {
> if ((!finished) && (retryCount > 0)) {
> ...
> }
> }
> catch (RuntimeException ex) {
> logger.error("Failed to process pending request "+key+
> " because"+ex.getMessage(), ex);
> throw ex;
> }
> 
> Best regards,
> Frank
> 


--------------------
Alberto Mascheroni
Mob. +39-333-6314222


------------------------------

Message: 2
Date: Wed, 13 Dec 2006 08:13:54 -0800 (PST)
From: Keary Parinis 
Subject: [SNMP4J] Virtual SNMPv3 Server
To: snmp4j at agentpp.org
Message-ID: <20061213161354.5639.qmail at web60715.mail.yahoo.com>
Content-Type: text/plain; charset=ascii

Hi,

I use a java app at work that collects router information using SNMP4J and we are currently using SNMP version 2. We will upgrade to version 3 shortly. I see the code example for version 3 in the Java docs. I would like to re-code my java app and test before the upgrade. Does anyone know how to create a virtual SNMPv3 server with SNMP4J? I just need something that will accept USM authentication and reply to a get request. I think I can create something simple with a ServerSocket running on port 162. Is there something out there that does this. I had no luck with google for the past few hours. Thanks in advance.


K E

------------------------------

Message: 3
Date: Wed, 13 Dec 2006 11:55:45 -0400
From: "RC_Insignia" 
Subject: [SNMP4J] CHANGE OF THE SENDER IP
To: 
Message-ID:

Content-Type: text/plain; charset="iso-8859-1"

In my computer I have 4 differents IP4s because VPN requisites I need to
change the sender IP different from the localhost.
How I can do that and send the trps trough a specific IP in my machine ?

Thanks in advance,

Ricardo Carrillo



------------------------------

Message: 4
Date: Thu, 14 Dec 2006 00:55:52 +0100
From: Frank Fock 
Subject: Re: [SNMP4J] IllegalStateException in Snmp.send()
To: Alberto 
Cc: snmp4j at agentpp.org
Message-ID: <45809308.105 at agentpp.com>
Content-Type: text/plain; charset=UTF-8; format=flowed

Hello Alberto,

You wrote that you had to restart your application
in order to use your Snmp instance again after
having caught the error below. This indicates,
that the timer referred to in the exception,
had been canceled. That means that your code
somewhere called Snmp.close() while requests
where pending.

That is how it is supposed to work: If you close
the Snmp instance, then it is shutdown and
cannot be used again. You will need to instantiate
a new Snmp instance.

So please do not call Snmp.close() between two
queries!

Hope this helps.

Best regards,
Frank

Alberto wrote:
> Hello,
> I refer to the correction provided in v1.7.1 and described by Frank in email 
> below.
> Since I got the same problem in my project, I downloaded the SNMP4J version 
> 1.7.5 and reproduced the error with log4j logs enabled.
> Here the result (just reported the PduHandle with the problem, but if you need 
> I have the complete logs):
> 
> 13/12/2006 14:30:30:131 DEBUG [pool-10-thread-22] [Log4jLogAdapter.debug] New 
> pending request with handle PduHandle[1826954335]
> ...
> 13/12/2006 14:30:45:579 DEBUG [Timer-15] [Log4jLogAdapter.debug] Running 
> pending request (3 left) with handle: PduHandle[1826954335]
> ...
> 13/12/2006 14:31:00:587 DEBUG [Timer-15] [Log4jLogAdapter.debug] Running 
> pending request (2 left) with handle: PduHandle[1826954335]
> ...
> 13/12/2006 14:31:00:589 DEBUG [SNMPDriverDispatchPool.2] [Log4jLogAdapter.
> debug] Looking up pending request with handle PduHandle[1826954335]
> ...
> 13/12/2006 14:31:00:591 ERROR [Timer-15] [Log4jLogAdapter.error] Failed to 
> process pending request PduHandle[1826954335] because Task already scheduled or 
> cancelled
> java.lang.IllegalStateException: Task already scheduled or cancelled
> at java.util.Timer.sched(Timer.java:358)
> at java.util.Timer.schedule(Timer.java:170)
> at org.snmp4j.Snmp$PendingRequest.run(Snmp.java:1426)
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
> ...
> 13/12/2006 14:31:00:590 DEBUG [pool-10-thread-22] [Log4jLogAdapter.debug] 
> Removed pending request with handle: PduHandle[1826954335]
> ...
> 
> It seems there is a relation between the time the Timer-15 is checking the 
> handle for the second time (14:31:00:587) and the time the answer comes (14:31:
> 00:589). They are really very closed one to the other.
> Maybe a synchronization problem among threads?
> 
> Of course, after Timer-15 thread dies, no Snmp primitive to the agent is 
> possible anymore and my application has to be restarted.
> 
> Can you help, please?
> Regards,
> Alberto
> 
> 
> Frank wrote:
> 
>> Hi Fabian,
>>
>> We can catch only a RuntimeException and rethrow it. I have
>> changed the code as follows for v1.7.1:
>>
>> /**
>> * run
>> */
>> public synchronized void run() {
>> try {
>> if ((!finished) && (retryCount > 0)) {
>> ...
>> }
>> }
>> catch (RuntimeException ex) {
>> logger.error("Failed to process pending request "+key+
>> " because"+ex.getMessage(), ex);
>> throw ex;
>> }
>>
>> Best regards,
>> Frank
>>
> 
> 
> --------------------
> Alberto Mascheroni
> Mob. +39-333-6314222
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com



------------------------------

Message: 5
Date: Thu, 14 Dec 2006 00:56:49 +0100
From: Frank Fock 
Subject: Re: [SNMP4J] CHANGE OF THE SENDER IP
To: RC_Insignia 
Cc: snmp4j at agentpp.org
Message-ID: <45809341.5070400 at agentpp.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Use a TransportMapping with the address you want to use.

Best regards,
Frank


RC_Insignia wrote:
> In my computer I have 4 differents IP4s because VPN requisites I need to
> change the sender IP different from the localhost.
> How I can do that and send the trps trough a specific IP in my machine ?
> 
> Thanks in advance,
> 
> Ricardo Carrillo
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com



------------------------------

Message: 6
Date: Thu, 14 Dec 2006 00:58:14 +0100
From: Frank Fock 
Subject: Re: [SNMP4J] Virtual SNMPv3 Server
To: Keary Parinis 
Cc: snmp4j at agentpp.org
Message-ID: <45809396.8010307 at agentpp.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi,

You can use SNMP4J-Agent's TestAgent to run a SNMPv3 agent.
Please note that port 162 is the standard port for notification
listeners whereas port 161 is the standard port for agents.

Best regards,
Frank

Keary Parinis wrote:
> Hi,
> 
> I use a java app at work that collects router information using SNMP4J and we are currently using SNMP version 2. We will upgrade to version 3 shortly. I see the code example for version 3 in the Java docs. I would like to re-code my java app and test before the upgrade. Does anyone know how to create a virtual SNMPv3 server with SNMP4J? I just need something that will accept USM authentication and reply to a get request. I think I can create something simple with a ServerSocket running on port 162. Is there something out there that does this. I had no luck with google for the past few hours. Thanks in advance.
> 
> 
> K E
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com



------------------------------

Message: 7
Date: Wed, 13 Dec 2006 16:40:47 -0800 (PST)
From: Keary Parinis 
Subject: Re: [SNMP4J] Virtual SNMPv3 Server
To: SNMP4J at agentpp.org
Message-ID: <20061214004047.58488.qmail at web60714.mail.yahoo.com>
Content-Type: text/plain; charset=ascii

Thanks Frank. You're right I meant port 161. I see the Test Agent is set up for version 2c. Is it compatible with version 3? I saw the client SNMPv3 app example. Is there an example for a server app?

K E 



----- Original Message ----
From: Frank Fock 
To: Keary Parinis 
Cc: snmp4j at agentpp.org
Sent: Thursday, December 14, 2006 8:58:14 AM
Subject: Re: [SNMP4J] Virtual SNMPv3 Server


Hi,

You can use SNMP4J-Agent's TestAgent to run a SNMPv3 agent.
Please note that port 162 is the standard port for notification
listeners whereas port 161 is the standard port for agents.

Best regards,
Frank

Keary Parinis wrote:
> Hi,
> 
> I use a java app at work that collects router information using SNMP4J and we are currently using SNMP version 2. We will upgrade to version 3 shortly. I see the code example for version 3 in the Java docs. I would like to re-code my java app and test before the upgrade. Does anyone know how to create a virtual SNMPv3 server with SNMP4J? I just need something that will accept USM authentication and reply to a get request. I think I can create something simple with a ServerSocket running on port 162. Is there something out there that does this. I had no luck with google for the past few hours. Thanks in advance.
> 
> 
> K E
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com

------------------------------

Message: 8
Date: Thu, 14 Dec 2006 10:30:02 +0100 (CET)
From: Alberto 
Subject: R: Re: [SNMP4J] IllegalStateException in Snmp.send()
To: 
Cc: snmp4j at agentpp.org
Message-ID:
<27188152.1261391166088602765.JavaMail.defaultUser at defaultHost>
Content-Type: text/plain;charset="UTF-8"

Thanks a lot Frank for being so quick.
Before posting my message, I read all contributions in the mailing list about 
the topic, checked my code and I am reasonably sure no Snmp.close() is called.
I have a single static instance of Snmp used for all requests sent (from 
different threads) to the agents. Snmp session is allocated the first time and 
never closed (it dies together with the application). After allocating Snmp 
session the first time, Snmp.listen() is called.
There is another Snmp session allocated for trap receival. Again here Snmp.
listen() is called and it is closed at application shutdown.
So ... still dark from my side.
Question: is the Snmp.close() traced in snmp4j logs? Because I cannot see 
anything about that.
Moreover: is there any other possibility leading to the problem I described 
and related to a misuse of snmp4j lib from my side?

PS If you need complete snmp4j logs with debug level, tell me.

Ciao,
Alberto


>----Messaggio originale----
>Dal: fock at agentpp.com
>Data: 14/12/2006 0.55
>A: "Alberto"
>Cc: 
>Ogg: Re: [SNMP4J] IllegalStateException in Snmp.send()
>
>Hello Alberto,
>
>You wrote that you had to restart your application
>in order to use your Snmp instance again after
>having caught the error below. This indicates,
>that the timer referred to in the exception,
>had been canceled. That means that your code
>somewhere called Snmp.close() while requests
>where pending.
>
>That is how it is supposed to work: If you close
>the Snmp instance, then it is shutdown and
>cannot be used again. You will need to instantiate
>a new Snmp instance.
>
>So please do not call Snmp.close() between two
>queries!
>
>Hope this helps.
>
>Best regards,
>Frank
>
>Alberto wrote:
>> Hello,
>> I refer to the correction provided in v1.7.1 and described by Frank in 
email 
>> below.
>> Since I got the same problem in my project, I downloaded the SNMP4J 
version 
>> 1.7.5 and reproduced the error with log4j logs enabled.
>> Here the result (just reported the PduHandle with the problem, but if you 
need 
>> I have the complete logs):
>> 
>> 13/12/2006 14:30:30:131 DEBUG [pool-10-thread-22] [Log4jLogAdapter.debug] 
New 
>> pending request with handle PduHandle[1826954335]
>> ...
>> 13/12/2006 14:30:45:579 DEBUG [Timer-15] [Log4jLogAdapter.debug] Running 
>> pending request (3 left) with handle: PduHandle[1826954335]
>> ...
>> 13/12/2006 14:31:00:587 DEBUG [Timer-15] [Log4jLogAdapter.debug] Running 
>> pending request (2 left) with handle: PduHandle[1826954335]
>> ...
>> 13/12/2006 14:31:00:589 DEBUG [SNMPDriverDispatchPool.2] [Log4jLogAdapter.
>> debug] Looking up pending request with handle PduHandle[1826954335]
>> ...
>> 13/12/2006 14:31:00:591 ERROR [Timer-15] [Log4jLogAdapter.error] Failed to 
>> process pending request PduHandle[1826954335] because Task already 
scheduled or 
>> cancelled
>> java.lang.IllegalStateException: Task already scheduled or cancelled
>> at java.util.Timer.sched(Timer.java:358)
>> at java.util.Timer.schedule(Timer.java:170)
>> at org.snmp4j.Snmp$PendingRequest.run(Snmp.java:1426)
>> at java.util.TimerThread.mainLoop(Timer.java:512)
>> at java.util.TimerThread.run(Timer.java:462)
>> ...
>> 13/12/2006 14:31:00:590 DEBUG [pool-10-thread-22] [Log4jLogAdapter.debug] 
>> Removed pending request with handle: PduHandle[1826954335]
>> ...
>> 
>> It seems there is a relation between the time the Timer-15 is checking the 
>> handle for the second time (14:31:00:587) and the time the answer comes (14:
31:
>> 00:589). They are really very closed one to the other.
>> Maybe a synchronization problem among threads?
>> 
>> Of course, after Timer-15 thread dies, no Snmp primitive to the agent is 
>> possible anymore and my application has to be restarted.
>> 
>> Can you help, please?
>> Regards,
>> Alberto
>> 
>> 
>> Frank wrote:
>> 
>>> Hi Fabian,
>>>
>>> We can catch only a RuntimeException and rethrow it. I have
>>> changed the code as follows for v1.7.1:
>>>
>>> /**
>>> * run
>>> */
>>> public synchronized void run() {
>>> try {
>>> if ((!finished) && (retryCount > 0)) {
>>> ...
>>> }
>>> }
>>> catch (RuntimeException ex) {
>>> logger.error("Failed to process pending request "+key+
>>> " because"+ex.getMessage(), ex);
>>> throw ex;
>>> }
>>>
>>> Best regards,
>>> Frank
>>>
>> 
>> 
>> --------------------
>> Alberto Mascheroni
>> Mob. +39-333-6314222
>> _______________________________________________
>> SNMP4J mailing list
>> SNMP4J at agentpp.org
>> http://lists.agentpp.org/mailman/listinfo/snmp4j
>
>-- 
>AGENT++
>http://www.agentpp.com
>http://www.mibexplorer.com
>http://www.mibdesigner.com
>
>



--------------------
Alberto Mascheroni
Mob. +39-333-6314222


------------------------------

Message: 9
Date: Thu, 14 Dec 2006 11:43:14 +0100
From: Fabian Nart 
Subject: Re: R: Re: [SNMP4J] IllegalStateException in Snmp.send()
Cc: snmp4j at agentpp.org
Message-ID: <45812AC2.40705 at ergon.ch>
Content-Type: text/plain; charset=UTF-8; format=flowed

Hello

We are still experiencing that problem, too. To work around it, we 
catch the IllegalStateException and create a new Snmp object. But this 
is still not very satisfying.

We are running a 24/7 application that uses the TableUtils to gather 
data from the network periodically. From time to time (maybe once a 
week) we have the problem described by Alberto.

Our setup is quite the same, but we are not listening for traps. I 
also re-checked our code an we don't do any call to Snmp.close() before 
the exception occurs.

Cheers, Fabian


Alberto wrote:
> Thanks a lot Frank for being so quick.
> Before posting my message, I read all contributions in the mailing list about 
> the topic, checked my code and I am reasonably sure no Snmp.close() is called.
> I have a single static instance of Snmp used for all requests sent (from 
> different threads) to the agents. Snmp session is allocated the first time and 
> never closed (it dies together with the application). After allocating Snmp 
> session the first time, Snmp.listen() is called.
> There is another Snmp session allocated for trap receival. Again here Snmp.
> listen() is called and it is closed at application shutdown.
> So ... still dark from my side.
> Question: is the Snmp.close() traced in snmp4j logs? Because I cannot see 
> anything about that.
> Moreover: is there any other possibility leading to the problem I described 
> and related to a misuse of snmp4j lib from my side?
> 
> PS If you need complete snmp4j logs with debug level, tell me.
> 
> Ciao,
> Alberto
> 
> 
>> ----Messaggio originale----
>> Dal: fock at agentpp.com
>> Data: 14/12/2006 0.55
>> A: "Alberto"
>> Cc: 
>> Ogg: Re: [SNMP4J] IllegalStateException in Snmp.send()
>>
>> Hello Alberto,
>>
>> You wrote that you had to restart your application
>> in order to use your Snmp instance again after
>> having caught the error below. This indicates,
>> that the timer referred to in the exception,
>> had been canceled. That means that your code
>> somewhere called Snmp.close() while requests
>> where pending.
>>
>> That is how it is supposed to work: If you close
>> the Snmp instance, then it is shutdown and
>> cannot be used again. You will need to instantiate
>> a new Snmp instance.
>>
>> So please do not call Snmp.close() between two
>> queries!
>>
>> Hope this helps.
>>
>> Best regards,
>> Frank
>>
>> Alberto wrote:
>>> Hello,
>>> I refer to the correction provided in v1.7.1 and described by Frank in 
> email 
>>> below.
>>> Since I got the same problem in my project, I downloaded the SNMP4J 
> version 
>>> 1.7.5 and reproduced the error with log4j logs enabled.
>>> Here the result (just reported the PduHandle with the problem, but if you 
> need 
>>> I have the complete logs):
>>>
>>> 13/12/2006 14:30:30:131 DEBUG [pool-10-thread-22] [Log4jLogAdapter.debug] 
> New 
>>> pending request with handle PduHandle[1826954335]
>>> ...
>>> 13/12/2006 14:30:45:579 DEBUG [Timer-15] [Log4jLogAdapter.debug] Running 
>>> pending request (3 left) with handle: PduHandle[1826954335]
>>> ...
>>> 13/12/2006 14:31:00:587 DEBUG [Timer-15] [Log4jLogAdapter.debug] Running 
>>> pending request (2 left) with handle: PduHandle[1826954335]
>>> ...
>>> 13/12/2006 14:31:00:589 DEBUG [SNMPDriverDispatchPool.2] [Log4jLogAdapter.
>>> debug] Looking up pending request with handle PduHandle[1826954335]
>>> ...
>>> 13/12/2006 14:31:00:591 ERROR [Timer-15] [Log4jLogAdapter.error] Failed to 
>>> process pending request PduHandle[1826954335] because Task already 
> scheduled or 
>>> cancelled
>>> java.lang.IllegalStateException: Task already scheduled or cancelled
>>> at java.util.Timer.sched(Timer.java:358)
>>> at java.util.Timer.schedule(Timer.java:170)
>>> at org.snmp4j.Snmp$PendingRequest.run(Snmp.java:1426)
>>> at java.util.TimerThread.mainLoop(Timer.java:512)
>>> at java.util.TimerThread.run(Timer.java:462)
>>> ...
>>> 13/12/2006 14:31:00:590 DEBUG [pool-10-thread-22] [Log4jLogAdapter.debug] 
>>> Removed pending request with handle: PduHandle[1826954335]
>>> ...
>>>
>>> It seems there is a relation between the time the Timer-15 is checking the 
>>> handle for the second time (14:31:00:587) and the time the answer comes (14:
> 31:
>>> 00:589). They are really very closed one to the other.
>>> Maybe a synchronization problem among threads?
>>>
>>> Of course, after Timer-15 thread dies, no Snmp primitive to the agent is 
>>> possible anymore and my application has to be restarted.
>>>
>>> Can you help, please?
>>> Regards,
>>> Alberto
>>>
>>>
>>> Frank wrote:
>>>
>>>> Hi Fabian,
>>>>
>>>> We can catch only a RuntimeException and rethrow it. I have
>>>> changed the code as follows for v1.7.1:
>>>>
>>>> /**
>>>> * run
>>>> */
>>>> public synchronized void run() {
>>>> try {
>>>> if ((!finished) && (retryCount > 0)) {
>>>> ...
>>>> }
>>>> }
>>>> catch (RuntimeException ex) {
>>>> logger.error("Failed to process pending request "+key+
>>>> " because"+ex.getMessage(), ex);
>>>> throw ex;
>>>> }
>>>>
>>>> Best regards,
>>>> Frank
>>>>
>>>
>>> --------------------
>>> Alberto Mascheroni
>>> Mob. +39-333-6314222
>>> _______________________________________________
>>> SNMP4J mailing list
>>> SNMP4J at agentpp.org
>>> http://lists.agentpp.org/mailman/listinfo/snmp4j
>> -- 
>> AGENT++
>> http://www.agentpp.com
>> http://www.mibexplorer.com
>> http://www.mibdesigner.com


------------------------------

_______________________________________________
SNMP4J mailing list
SNMP4J at agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j


End of SNMP4J Digest, Vol 35, Issue 9
*************************************






More information about the SNMP4J mailing list