[SNMP4J] Strange problem with multithreaded SNMPv3-Scan

Frank Fock fock at agentpp.com
Mon Nov 8 22:07:15 CET 2004


Hi,

As Mathias already pointed out, increasing the UDP buffer size on your
system may help. Without knowing more about your request sending
code, it is hard to help more specific.

Please note: The setAsyncMessageProcessingSupported property
must be set to 'true' when using the MultiThreadedMessageDispatcher.

Best regards,
Frank

chk-world at gmx.de wrote:

>Hi again,
>ok, I tried the following to solve the problems described in my last post:
>- Updating the library (now I'm using the latest 1.0.3c).
>
>Using synchronous sending and a thread pool:
>doing something like "response = snmp.sendPDU(request, uTarget);" in the run
>method with a timeout of 1500 or more and retries of 3 or more in a Runnable
>which is called via:
>// -------------------------
>for (int i = 1; i < 30; i++)
>{
>  pooledExecutor.execute(new RunnableSender("10.137.1." +
>Integer.toString(i)));
>  Thread.sleep(slowdown);
>} // -------------------------
>I was setting setAsyncMsgProcessingSupported to false. So every library
>initialisation is done inside my RunnableSender.
>If slowdown is bigger than 1000 everything works fine. If slowdown is less
>than 1000 I get Timeouts from some agents (of course different agents on
>different runs!).
>How come? Is this library realy thread save in this case?
>
>My second approache was to try asynchronouse sending:
>for (int i = 1; i < 30; i++)
>{
> configData.setSnmpBaseNetwork("10.137.27." + i);
> senderList.add(new SNMPv3Query(configData));
> Thread.sleep(slowdown);
>}
>I was setting setAsyncMsgProcessingSupported to true. And in SNMPv3Query
>doing "snmp.sendPDU(request, uTarget, new Object(), this);".
>Still there is the same odd behavior: If slowdown is bigger than 1000
>everything works fine. If slowdown is less than 1000 I get Timeouts from
>some agents (of course different agents on different runs!).
>How come? Is this library realy thread save in this case?
>
>If I say timeouts: In most cases the result is null.
>
>Could someone please give me a hint? Or hase someone doen something like
>this with this library?
>
>Thanks,
>Chris
>
>  
>





More information about the SNMP4J mailing list