Giter Club home page Giter Club logo

tnm4j's Issues

SnmpV3

Do you have any examples on using this for snmpv3? A simple snmpv3 get perhaps?
I thought it would be similar to using snmpv2c but I'm getting an Unsupported security model Exception.

SNMP Listener can not read trap from OIDs that are entries in a table

Hi

I have created an SNMP listener and it works for most of the received traps. However when the listener receives traps from a "table" something odd occurs.

The extractIndexes method in MibbleIndexExtractor.java causes an exception.

The oid String and instanceOid String are for some reason identical so it causes an out of bound exception when it tries to create the suboid and does not print out the trap.

I am listening to traps from an Ericsson object and all the other traps that are not inside a table works fine. I am using the ERICSSON-ALARM-MIB and all the required imports for that MIB. The overview of this MIB can be seen at https://mibs.observium.org/mib/ERICSSON-ALARM-MIB/

Any suggestions on how to fix this issue?

I have also asked the question on https://stackoverflow.com/questions/55240710/snmp-listener-can-not-read-trap-from-oids-that-are-entries-in-a-table

Best regards
Michael

Back to Apache License

It looks like this was originally under Apache License. I'd use this project if it would be available under Apache License. Could you make it dual licensed?

Update Depedencies

Carl,

I spoke with Per Cederberg the creator of Mibble and asked if they would consider putting Mibble on Maven. Per set up a Maven repo for Mibble on mibble.org which I believe should have a newer version of the library than tnm4j currently. I also did a fork of tnm4j and experimented with updating both Mibble and SNMP4J. Most everything looked to update without issue.

Would you consider updating dependencies? I can submit a PR from my fork if you like but you might wanna double check and test anything I submit.

Support for SET operations

Hi,

It looks like support for SNMP SET operations is not implemented, but the README mentions

In addition to the get method, the context provides methods to support all of the fundamental SNMP operations: GET, GETNEXT, GETBULK, and SET.

Am I missing something? Thanks!

Unable to set authNoPriv security level

Hello,
I am trying to authenticate against device using SNMPv3 with auth but no encryption (authNoPriv mode).

However, if I create a SimpleSNMPv3Target with setPrivType set to null, I got a NullPointerException.

I went through the source code and I have come to a conclusion, that it cannot be done. If I look at this line

else if (v3Target.getPrivType() == null) {
I understand, that the setPrivType should be set to null in order to get authNoPriv security level as stated on the very next line.

However, if I do that, the code fails because of this line

privType(v3Target), new OctetString(v3Target.getPrivPassphrase())));
as it expects the privType to be non-null in every case.

As a consequence, the desired security level is never reached.

Additional notes: NullPointerException is obviously fired by the switch-case statement in privType function here


As switch-case is known not to accept null`s until Java v18, this will not work.

asyncwalk keeps retrying on TimeoutException

When performing an asyncwalk and the host does not respond and the response.get() throws a timeoutexception, the host is retried indefinitely even if the TimeoutException is handled.

Can't install with Maven

<dependency>
    <groupId>org.soulwing.snmp</groupId>
    <artifactId>tnm4j</artifactId>
    <version>1.0.9</version>
</dependency>

I got this error when I try to build project with Maven:

Failed to execute goal on project Test: Could not resolve dependencies for project com.Test:jar:0.2: Failed to collect dependencies at org.soulwing.snmp:tnm4j:jar:1.0.9 -> org.snmp4j:snmp4j:jar:2.3.3: Failed to read artifact descriptor for org.snmp4j:snmp4j:jar:2.3.3: Could not transfer artifact org.snmp4j:snmp4j:pom:2.3.3 from/to oosnmp (https://oosnmp.net/dist/release): Transfer failed for https://oosnmp.net/dist/release/org/snmp4j/snmp4j/2.3.3/snmp4j-2.3.3.pom: Certificate for <oosnmp.net> doesn't match any of the subject alternative names: [morewap.com, www.morewap.com].

Can you help with this?

Update dependencies

We're back leveled on some dependencies.

Latest snmp4j series 2.5.x made some changes in the (horribly broken) mechanism they were using in 2.3.3 to deal with socket timeout. Those changes break our workaround for their crummy timeout mechanism. Need to investigate.

I opened an issue to get Mibble artifacts into Maven Central, but it's been stalled.

SHA-256 AuthType support for SnmpV3

Hello,
is it possible to add SHA-256 AuthType for SnmpV3 ?
I tried to override SnmpV3Target class in my project but this lead to copy-paste 30% of the lib because a lot of classes in lib are not public.
It seems that small changes in lib are a better solution. Maybe someone else will also need SHA-256 AuthType support.
Am I correct, that changes are needed only in these 2 places?

org.soulwing.snmp.SnmpV3Target.AuthType
org.soulwing.snmp.provider.snmp4j.UserTargetStrategy#authType

Dependencies wont download.

I am unable to build.
mvn compile freezes on
Downloading from mibble: https://nexus.cns.vt.edu/nexus/content/groups/public/net/percederberg/mibble-parser/2.9.3/mible-parser-2.9.3.pom
Any ideas?

java.lang.nosuchmethoderror While using in Apache NiFi

I am using this library in my Apache NiFi project, to perform a walk operation but it shows the following error
java.lang.NoSuchMethodError: 'void net.percederberg.mibble.asn1.Asn1Parser.reset(java.io.Reader, net.percederberg.grammatica.parser.Analyzer)' at net.percederberg.mibble.MibLoader$MibSource.parseMib(MibLoader.java:970) at net.percederberg.mibble.MibLoader.loadQueue(MibLoader.java:724) at net.percederberg.mibble.MibLoader.load(MibLoader.java:550) at net.percederberg.mibble.MibLoader.load(MibLoader.java:451) at org.soulwing.snmp.provider.mibble.CachingMibRepository.load(CachingMibRepository.java:79) at org.soulwing.snmp.provider.mibble.MibbleMib.load(MibbleMib.java:226)
can you help me to resolves it.
Thanks in Advance.

Commercial license for tnm4j lib

Hello, Carl Harris
I did not found any other way to reach you, so I will ask my question here.
Is there is any possibility of licensing this lib for commercial use?
GNU GPL does not fit with my company's third-Party software usage policy.

Utilize the repo to load Custom MIB file

Hello,

Can I use this Code base as dependency in my Organization project. My requirement is to load custom MIB File and Add the MIB to SNMPAgent from snmp4j. @ceharris Please let me know if i can do this action. Do i need any license to use this repo.

Thanks

OID to name resolution should find best match

When resolving a numeric OID to a name, a search of loaded MIBs is performed, in the reverse order in which MIBs have been loaded. This works, but requires the load order to be carefully considered by the tnm4j user.

A nice improvement would be to search all loaded MIBs and return the object name that matches with the smallest suffix of remaining unresolved OID string. If all needed MIBs are loaded, the unresolved part will always be the instance sub-identifier (assuming the OID is an object instance identifier).

For example, if SNMPv2-MIB is loaded and RFC1155-SMI is loaded, in the current implementation an OID-to-name lookup for 1.3.6.1.6.3.1.1.4.1.0 could return two possible values, depending on the order in which the Mib instance is loaded:

  1. snmpTrapOID.0
  2. internet.6.3.1.1.4.1.0

In this case result 1 is better, because the suffix remaining after the name is shorter than in result 2; it is a better match, and less likely to surprise tnm4j users.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.