Frank Fock | 2 Jul 00:07 2015

Re: Extracting Trap properties via SMI-PRO

Hi René,

The notification objects retrieval is not supported yet in version 1.6.0 
or earlier.
It will be added in version 1.7.0 which will be available as a free 
upgrade to
all 1.x users on next Monday (July 6th).

Hope this helps.

Best regards,
Frank

Am 01.07.2015 um 19:18 schrieb René Scholl:
> Dear all,
>
>   
>
> I am using SNMP4J - SMI -PRO within my application to compile MIB files and
> gather properties of managed objects specified within these files.
>
>   
>
> Whenever I look up a specific OID and it happens to be of type
> 'OBJECT_TYPE_SCALAR' or 'OBJECT_TYPE_COLUMN' I can cast it to
> 'SmiObjectType' or 'SmiValueType' and access the methods those interfaces
> offer.
>
>   
>
(Continue reading)

René Scholl | 1 Jul 19:18 2015
Picon

Extracting Trap properties via SMI-PRO

Dear all,

I am using SNMP4J - SMI -PRO within my application to compile MIB files and
gather properties of managed objects specified within these files.

Whenever I look up a specific OID and it happens to be of type
'OBJECT_TYPE_SCALAR' or 'OBJECT_TYPE_COLUMN' I can cast it to
'SmiObjectType' or 'SmiValueType' and access the methods those interfaces
offer.

I run into problems when the SmiObject  is of  SMI-Type 'TRAP_TYPE' or
'NOTIFICATION_TYPE'.  If I inspect such a before mentioned SmiObject -
instance in a debugger,  I can see it contains an MIBNotifyType - Object
offering the trap's enterprise attribute and contained varbinds. 

However I cannot figure out how to access these information. I tried to cast
the SmiObject to MibNotifyType without success. More over I did not find out
any other interface or class I can utilize. 

My goal is to extract  the trap's varbinds to gather further information on
their syntax, potential range etc.

How can i do that ?

Thank you in advance and kind regards, 

René

This email has been protected by YAC (Yet Another Cleaner) http://www.yac.mx
_______________________________________________
(Continue reading)

obada.j | 31 May 22:19 2015
obada.j | 29 May 00:06 2015
Thomas L | 26 May 22:13 2015
Picon

BindException: Address already in use, even with reuseAddress=true (with proposed fix)

Hello,

I think I have found a bug in SNMP4J (2.3.3) where we can have a "BindException: Address already in use"
exception when creating a DefaultUdpTransportMapping, whereas reuseAddress=true, if we have
previously created and closed a similar DefaultUdpTransportMapping.
In DefaultUdpTransportMapping.close(), the listener thread (WorkerTask) is not "joined", so it can
still use the UDP port for some time, and creating a new DefaultUdpTransportMapping on the same port, even
if reuseAddress=true, is not possible.
My current dirty workaround is to access the "WorkerTask" field by reflection just before closing the Snmp
object, and then calling "join()" on the object, so I am sure the thread is correctly terminated before any
new attempt to create a new DefaultUdpTransportMapping.

Can this problem be solved in the next version of SNM4J?

Regards,
Thomas
_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j
Asaf Schoen | 26 May 15:17 2015

MangedObjects locking

Hi Frank,
I implemented a SNMP Agent using your library, and wondered how can I lock the agent (block it from answer any
request) during the update period of the managed objects (each round minute).
According to the documentation, I thought that I could use the MOServer's lock function, but it doesn't
seem to work.
What am I missing?
Thanks,
Asaf

_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j
Carl Harris | 6 May 21:58 2015

bug report / patch info

DefaultUdpTransportMapping in Snmp4j 2.3.3 does not exit from ListenerThread.run when the transport
mapping is closed.  I scanned the snmp4j web site looking for a location to report this issue and provide a
suggested patch, but found nothing.

Is there a more appropriate place to report this issue?

_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j
Himalaya Gupta A | 6 May 11:26 2015

DefaultTCPTransportMapping class making 100% cpu utilization

Hi,

The following is the Thread Dump. I am running an application where the CPU is reaching 100% utilization due
to the SNMP4J.
Can you please let me know if you have come across such situation or what might be the issue? Thanks in advance
for your reply

SNMP4J Version : snmp4j - 1.11.3

"DefaultTCPTransportMapping_0.0.0.0/0" daemon prio=10 tid=0x5c596c00 nid=0x5431 runnable [0x5b06d000..0x5b06e030]
   java.lang.Thread.State: RUNNABLE
        at java.lang.Throwable.fillInStackTrace(Native Method)
        - locked <0xadbd3518> (a java.util.NoSuchElementException)
        at java.lang.Throwable.<init>(Throwable.java:181)
        at java.lang.Exception.<init>(Unknown Source)
        at java.lang.RuntimeException.<init>(Unknown Source)
        at java.util.NoSuchElementException.<init>(Unknown Source)
        at java.util.LinkedList.remove(Unknown Source)
        at java.util.LinkedList.removeFirst(Unknown Source)
        at org.snmp4j.transport.DefaultTcpTransportMapping$ServerThread.run(Unknown Source)
        - locked <0x79744b88> (a java.util.LinkedList)

"DefaultTCPTransportMapping_0.0.0.0/0" daemon prio=10 tid=0x0919c400 nid=0x5235 runnable [0x5b2ff000..0x5b2fffb0]
   java.lang.Thread.State: RUNNABLE
        at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
        at sun.nio.ch.EPollArrayWrapper.poll(Unknown Source)
        at sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
        at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
        - locked <0x798ce4b8> (a sun.nio.ch.Util$1)
        - locked <0x798ce4a8> (a java.util.Collections$UnmodifiableSet)
(Continue reading)

joe.sulewski | 30 Apr 15:28 2015

TcpAddress issue

Hello,

I'm trying to send data over TCP due to some parts of our network that have high unreliability.  I'm using
version 2.2.3 of the SNMP4J library and I'm getting an error trying to send over tcp.

I setup the TransportMapping like so:
TcpAddress address = new TcpAddress(Inet4Address.getByName(NetTools.getLocalIPAddress()),1161);
transport = new DefaultTcpTransportMapping(address);

SNMP4JSettings.setExtensibilityEnabled(false);
snmp = new Snmp(transport);
transport.listen();

To send data I perform the following:
snmpSettings.setSNMPPort(1161);
targetAddress = GenericAddress.parse("TCP:" + snmpSettings.getAddress() + "/" + snmpSettings.getSNMPPort());

target = new CommunityTarget();
target.setCommunity(new OctetString(snmpSettings.getCommunity()));
target.setAddress(targetAddress);
target.setRetries(snmpSettings.getRetries());
target.setTimeout(snmpSettings.getTimeout());
target.setVersion(SnmpConstants.version2c);

snmp.get(pdu, target);

The get throws the following error: Unsupported address class (transport mapping): org.snmp4j.smi.TcpAddress

When I run in the debugger I looked at the snmp variable and the
snmp->messageDispatcher->transportMappings table is:
(Continue reading)

Picon

SNMP v3 - with same user name on different devices is not working

Hi Frank,

I am trying to do SNMP v3  get request to 2 different devices with same
user name , always 1 device get successful, other get time out. I referred
earlier posts and tried all the solutions like localizing keys , nothing
works. Can you pls help me how to fix this.

Here my USM portion of code

private static USM usm;

static{
 		SecurityProtocols securityProtocols = SecurityProtocols.getInstance();
	    securityProtocols.addPrivacyProtocol(new PrivAES128());
	    securityProtocols.addPrivacyProtocol(new
PrivAES192With3DESKeyExtension());
	    securityProtocols.addPrivacyProtocol(new
PrivAES256With3DESKeyExtension());
	    securityProtocols.addPrivacyProtocol(new PrivDES());
	    securityProtocols.addPrivacyProtocol(new Priv3DES());

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

}

 public static String doGet1(String targetAddr,String securityName, OID
authenticationProtocol, String authenticationPassphrase,
		  OID privacyProtocol, String privacyPassphrase, String engineID, String
(Continue reading)

Pradipmaya Maharana | 23 Mar 23:49 2015
Picon

changing the community string at run-time?

I am writing a snmp agent based on the sample from snmp4j code. Everything
is working great as expected but once the agent is running, whats the right
way to change the community string at run time. I tried various things
without any luck.

Could someone please guide me with the correct approach.
_______________________________________________
SNMP4J mailing list
SNMP4J <at> agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j

Gmane