Skip to main content

SNMP port configuration in 1.2.1 Alpha 1

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
7 replies [Last post]
jbernatik
Offline
Joined: 2010-09-13

Looking at the SNMP in 1.2.1 Alpha 1 release, I'm interested in understanding the port configuration. For the drexel library, the communication port is hardcoded to 161 in the SNMPv1CommunicationInterface.java. For the platform netSNMP, port is configurable via platform.cfg, RI.Platform.SnmpPort environment variable and is set to 10161 by default. This means that with default configuration the communication between drexel library in the stack and the platform netSNMP master will not work. Also, changing the platform netSNMP master port to 161 will cause problems in the linux, because the RI emulator will need root access rights to open that port.

Did you consider adding environment variable to configure the drexel library communication port ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
smaynard
Offline
Joined: 2009-01-27

The AgentX code should be using port 10705

I'll bring up making the Stack AgentX port configurable in the next bug meeting (tomorrow)

smaynard
Offline
Joined: 2009-01-27

so the agentX.masterPort is already being configured to 10705 and can be set/read from the mpeenv.ini file from within $OCAPROOT/java/src/base/org/cablelabs/impl/snmp/agentx/AgebtXSubAgent.java

jbernatik
Offline
Joined: 2010-09-13

What I had in mind was java/src/base/org/cablelabs/impl/snmp/drexel/SNMPv1CommunicationInterface.java, which defines:

public class SNMPv1CommunicationInterface
{
public static final int SNMP_PORT = 161;
.
.

This should be configurable via mpeenv.

smaynard
Offline
Joined: 2009-01-27

reported as Jira issue: OCORI-3799 and resolved with trunk revision 25243:

initialize the SNMP communications port to a value read from base.properties or default to port used by RI_Platform

smaynard
Offline
Joined: 2009-01-27

Even though you clearly stated this in your first post, I had AgentX on the brain and forgot that the MIBManager used the drexel SNMPClient to access other OIDs.

Looking into correcting this...

krushna
Offline
Joined: 2010-09-21

Hi,

I am using the port 10705 in my SNMPV1CommunicationInterface as part of derexel, still i am unable to query the platform MIBS from MIBManager.queryMIbs(1.3.6.1.2.1.25.2.2 )

I am getting the SocketException : connecton reset.

smaynard
Offline
Joined: 2009-01-27

What is your system configuration? (e.g. WinXP, Fedora-15, Ubuntu 10.4)

Do other MIBs work?