[SNMP4J] Syntax-type 3 (BITS) not supported by default. Needs tocall setExtensibilityEnabled(true)

fock at agentpp.com fock at agentpp.com
Fri Aug 7 23:39:10 CEST 2009


Hi Iker,

The current behavior is intentional. An obsolete
syntax type is not supported by default.
By enabling extensibility, you might get slightly
lower startup performance and you need certain
access rights (Java security) which might not be
available in all environments.

Best regards,
Frank

Iker Almandoz schrieb:
> Hi Frank, 
>
>  
>
> Today I have run into an interesting problem with one of the equipments our
> system manages.
>
> We have encountered an equipment that returns certain OIDs as type BITS (or
> syntax type 3).
>
>  
>
> When we collect using snmp4j, I am getting "Unsupported variable syntax: 3".
> I have looked at the code and realized I can get this syntax type supported
> by calling: 
>
>         SNMP4JSettings.setExtensibilityEnabled(true);
>
> Because the snmisyntaxes.properties does contain the definition for that
> type:
>
> # The BIT STRING type is obsolete since RFC 1902 but provided here for
>
> # backward compatibility:
>
> 3=org.snmp4j.smi.BitString
>
>  
>
> However, the AbstractVariable.createVariable() does not seem to support the
> bits type. Is this intentional ?  Do you envision putting a default handling
> for this data type even though it's an obsolete type ?
>
> If I enable 'setExtensibilityEnabled(true)', is there any other differences
> I should expect ?. 
>
>  
>
> The log I get from snmp4j is:
>
>  
>
> 2009-08-06 17:44:17,355 [pool-Snmp4j-SnmpProxy-Timer-thread-4] DEBUG
> snmp4j.Snmp  - Running pending sync request with handle
> PduHandle[1039715258] and retry count left 0
>
> 2009-08-06 17:44:17,355 [pool-Snmp4j-SnmpProxy-Timer-thread-4] DEBUG
> transport.DefaultUdpTransportMapping  - Sending message to 172.16.0.3/161
> with length 97:
> 30:5f:02:01:00:04:04:72:65:61:64:a0:54:02:04:3d:f8:cb:ba:02:01:00:02:01:00:3
> 0:46:30:0e:06:0a:2b:06:01:02:01:02:02:01:08:19:05:00:30:0e:06:0a:2b:06:01:02
> :01:02:02:01:07:19:05:00:30:11:06:0d:2b:06:01:02:01:0a:5e:01:01:02:01:06:19:
> 05:00:30:11:06:0d:2b:06:01:02:01:0a:5e:01:01:03:01:06:19:05:00
>
> 2009-08-06 17:44:17,355 [DefaultUDPTransportMapping_172.17.1.125/0] DEBUG
> transport.DefaultUdpTransportMapping  - Received message from
> /172.16.0.3/161 with length 101:
> 30:63:02:01:00:04:04:72:65:61:64:a2:58:02:04:3d:f8:cb:ba:02:01:00:02:01:00:3
> 0:4a:30:0f:06:0a:2b:06:01:02:01:02:02:01:08:19:02:01:01:30:0f:06:0a:2b:06:01
> :02:01:02:02:01:07:19:02:01:01:30:12:06:0d:2b:06:01:02:01:0a:5e:01:01:02:01:
> 06:19:03:01:80:30:12:06:0d:2b:06:01:02:01:0a:5e:01:01:03:01:06:19:03:01:80
>
> 2009-08-06 17:44:17,355 [pool-SNMP4j-MessageDispatcher-thread-5] ERROR
> snmp4j.MessageDispatcherImpl  - java.lang.IllegalArgumentException:
> Unsupported variable syntax: 3
>
>  
>
> Thanks for your help, 
>
> Iker
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
>



More information about the SNMP4J mailing list