0

需要你的帮助。我被一个问题困扰了两天多,即使在谷歌中也找不到解决方案!

无论如何,我将在下面发布我的问题。请尽早帮助我

问题

我一直在尝试使用名为 Friendly SNMP(它是 Snmp4j 的包装器)的 API 开发一个 SNMP 代理,最初一切都很好,因为一切都很顺利。现在,当我尝试向系统网络中的远程计算机发送陷阱/通知时,我收到了一个非常令人沮丧的绑定异常,并显示一条消息“无法分配请求的地址”。这是堆栈跟踪。

2011-06-08 14:25:30,180 - org.friendlysnmp.FException - 错误 - 无法初始化 SNMP 代理 [1] java.net.BindException:无法在 java.net.PlainDatagramSocketImpl.bind0(本机方法)处分配请求的地址java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:85) 在 java.net.DatagramSocket.bind(DatagramSocket.java:373) 在 java.net.DatagramSocket.(DatagramSocket.java:229) 在 java.net.DatagramSocket。 (DatagramSocket.java:282)

但是,如果我使用 localhost/127.0.0.1 作为发送陷阱的 IP 地址,一切正常。令人毛骨悚然!

解决的尝试

1)我已经做了一个 netstat 来查看端口是否已经绑定并且显然端口是空闲的。所以,这是毫无疑问的。

2)我已经ping通了远程主机,完成了telnet,一切正常。

3)有很多讨论提到我们需要在JVM中设置一些选项以默认使用IPv4地址。我已经这样做了,但没有运气

4)我已经在 Windows 机器上测试过,但没有成功。

所以,请帮助我,我被困在这里。让我知道是否需要对 /etc/hosts 文件或其他内容进行一些更改。

我附上了我的属性文件(我在其中指定了 IP 地址)和日志文件以供参考。

PS:哦,请忽略我在属性文件中指定 IP 和端口的方式,这就是 API 所期望的方式。

PS2:不幸的是,我无法附加任何文件。所以,请在下面找到日志。

2011-06-08 13:59:20,252 - org.friendlysnmp.FriendlyAgent - DEBUG - Loaded prop: {snmp.plugin.log4j=org.friendlysnmp.plugin.log4j.PluginLog4j, snmp.v3.password.priv=/M3o0zp3Q+0g/BgRRoetGQ==, snmp.v3.protocol.priv=DES, snmp.storage.vacm.viewtree=readOnly, snmp.plugin.jvm=org.friendlysnmp.plugin.jvm.PluginJVM, snmp.v2.community=public, snmp.address.send-notification=10.155.10.228/1162, snmp.persist.filename=DemoFriendly.bin, snmp.plugin.heartbeat=org.friendlysnmp.plugin.heartbeat.PluginHeartbeat, snmp.storage.vacm.group=readOnly, snmp.v3.password.auth=TumNjJ34uUA8XapXe3SYOQ==, snmp.v3.protocol.auth=SHA, snmp.storage.notify=readOnly, snmp.ignore-update-ms=1000, snmp.storage.vacm.access=readOnly, snmp.address.get-set=10.155.10.228/1161}
2011-06-08 13:59:20,253 - org.friendlysnmp.FriendlyAgent - INFO - === STARTED FriendlyAgent ===
2011-06-08 13:59:20,306 - org.friendlysnmp.AgentWorker - INFO - Created agent at 10.155.10.228/1161; Notify to 10.155.10.228/1162; EngineID=80:00:71:a3:01:ac:10:01:76
2011-06-08 13:59:20,308 - org.friendlysnmp.FConfig - INFO - IgnoreUpdate: 1000 ms
2011-06-08 13:59:20,309 - org.friendlysnmp.persist.PersistStorageImpl - DEBUG - Storage filename 'DemoFriendly.bin'
2011-06-08 13:59:20,323 - org.friendlysnmp.persist.PersistStorageImpl - INFO - Loaded persist file: /home/vishwas/NetBeansProjects/SocketProgramming/DemoFriendly.bin
2011-06-08 13:59:20,324 - org.friendlysnmp.persist.PersistStorage - DEBUG - Persistency policy: ON_CHANGE
2011-06-08 13:59:20,324 - org.friendlysnmp.FConfig - INFO - Transport: UDP
2011-06-08 13:59:20,325 - org.friendlysnmp.FConfig - INFO - TransportDomain: IPV4
2011-06-08 13:59:20,329 - org.friendlysnmp.target.TargetBase - DEBUG - Created target 'public' SecModel=0 MsgProcModel=0 SecLevel=0
2011-06-08 13:59:20,331 - org.friendlysnmp.target.TargetBase - DEBUG - Loaded target 'public': storageVacmGroup=readOnly storageVacmAccess=readOnly storageVacmViewTree=readOnly storageNotify=readOnly notifyTimeout=1000 notifyRetryCount=1
2011-06-08 13:59:20,331 - org.friendlysnmp.AgentWorker - INFO - Added Target: TargetV2 TARGET=public
2011-06-08 13:59:20,344 - org.friendlysnmp.plugin.log4j.PluginLog4j - DEBUG - Found log4j props: /home/vishwas/NetBeansProjects/SocketProgramming/src/log4j.properties
2011-06-08 13:59:20,401 - org.friendlysnmp.FTable - DEBUG - Created table: appConfigEntry
2011-06-08 13:59:20,401 - org.friendlysnmp.FTable - DEBUG - Created table: appDependenciesEntry
2011-06-08 13:59:20,401 - org.friendlysnmp.FTable - DEBUG - Created table: appInfoEntry
2011-06-08 13:59:20,401 - org.friendlysnmp.FTable - DEBUG - Created table: appPropEntry
2011-06-08 13:59:20,401 - org.friendlysnmp.FTable - DEBUG - Created table: deadlockViewEntry
2011-06-08 13:59:20,401 - org.friendlysnmp.FTable - DEBUG - Created table: deadlocksListEntry
2011-06-08 13:59:20,401 - org.friendlysnmp.FTable - DEBUG - Created table: exceptionViewEntry
2011-06-08 13:59:20,402 - org.friendlysnmp.FTable - DEBUG - Created table: exceptionsListEntry
2011-06-08 13:59:20,402 - org.friendlysnmp.FTable - DEBUG - Created table: persistCellEntry
2011-06-08 13:59:20,402 - org.friendlysnmp.FTable - DEBUG - Created table: persistScalarEntry
2011-06-08 13:59:20,402 - org.friendlysnmp.FTable - DEBUG - Created table: persistTableEntry
2011-06-08 13:59:20,402 - org.friendlysnmp.FTable - DEBUG - Created table: sysPropEntry
2011-06-08 13:59:20,404 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.3.0 'shutdownApp' Volatile=true
2011-06-08 13:59:20,405 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.3.3.1 'persistScalarEntry' Volatile=true
2011-06-08 13:59:20,406 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.3.4.1 'persistTableEntry' Volatile=true
2011-06-08 13:59:20,411 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.30.0 'deadlockCheckInterval' Volatile=false
2011-06-08 13:59:20,411 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.29091.1.1.1.2.30.0 'deadlockCheckInterval': 1
2011-06-08 13:59:20,412 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.32.0 'deadlockViewPolicy' Volatile=false
2011-06-08 13:59:20,412 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.29091.1.1.1.2.32.0 'deadlockViewPolicy': 1
2011-06-08 13:59:20,413 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.33.0 'deadlockViewFixedIndex' Volatile=true
2011-06-08 13:59:20,415 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.20.0 'exceptionViewPolicy' Volatile=false
2011-06-08 13:59:20,415 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.29091.1.1.1.2.20.0 'exceptionViewPolicy': 1
2011-06-08 13:59:20,416 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.21.0 'exceptionViewFixedIndex' Volatile=true
2011-06-08 13:59:20,417 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.10.1 'exceptionsListEntry' Volatile=true
2011-06-08 13:59:20,423 - org.friendlysnmp.FTable - DEBUG - Created table: log4jLoggerEntry
2011-06-08 13:59:20,423 - org.friendlysnmp.FTable - DEBUG - Created table: log4jPropEntry
2011-06-08 13:59:20,424 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.29091.1.1.1.10.1.0 'log4jPropFile': /home/vishwas/NetBeansProjects/SocketProgramming/src/log4j.properties
2011-06-08 13:59:20,451 - org.friendlysnmp.FTable - DEBUG - Created table: jvmMemGCEntry
2011-06-08 13:59:20,451 - org.friendlysnmp.FTable - DEBUG - Created table: jvmMemManagerEntry
2011-06-08 13:59:20,451 - org.friendlysnmp.FTable - DEBUG - Created table: jvmMemMgrPoolRelEntry
2011-06-08 13:59:20,451 - org.friendlysnmp.FTable - DEBUG - Created table: jvmMemPoolEntry
2011-06-08 13:59:20,451 - org.friendlysnmp.FTable - DEBUG - Created table: jvmRTBootClassPathEntry
2011-06-08 13:59:20,451 - org.friendlysnmp.FTable - DEBUG - Created table: jvmRTClassPathEntry
2011-06-08 13:59:20,451 - org.friendlysnmp.FTable - DEBUG - Created table: jvmRTInputArgsEntry
2011-06-08 13:59:20,452 - org.friendlysnmp.FTable - DEBUG - Created table: jvmRTLibraryPathEntry
2011-06-08 13:59:20,452 - org.friendlysnmp.FTable - DEBUG - Created table: jvmThreadInstanceEntry
2011-06-08 13:59:20,453 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.42.2.145.3.163.1.1.1.4.0 'jvmClassesVerboseLevel': 1
2011-06-08 13:59:20,457 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.42.2.145.3.163.1.1.2.2.0 'jvmMemoryGCVerboseLevel': 1
2011-06-08 13:59:20,458 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.42.2.145.3.163.1.1.2.3.0 'jvmMemoryGCCall' Volatile=true
2011-06-08 13:59:20,465 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.42.2.145.3.163.1.1.3.5.0 'jvmThreadContentionMonitoring': 4
2011-06-08 13:59:20,467 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.42.2.145.3.163.1.1.3.6.0 'jvmThreadCpuTimeMonitoring': 4
2011-06-08 13:59:20,468 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.42.2.145.3.163.1.1.3.7.0 'jvmThreadPeakCountReset' Volatile=true
2011-06-08 13:59:20,478 - org.friendlysnmp.AgentWorker - DEBUG - Transport=UDP
2011-06-08 13:59:20,486 - org.friendlysnmp.FException - ERROR - Failure to init SNMP agent
[1] java.net.BindException: Cannot assign requested address
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:85)
at java.net.DatagramSocket.bind(DatagramSocket.java:373)
at java.net.DatagramSocket.<init>(DatagramSocket.java:229)
at java.net.DatagramSocket.<init>(DatagramSocket.java:282)
2011-06-08 14:25:29,901 - org.friendlysnmp.FriendlyAgent - DEBUG - Loaded prop: {snmp.plugin.log4j=org.friendlysnmp.plugin.log4j.PluginLog4j, snmp.v3.password.priv=/M3o0zp3Q+0g/BgRRoetGQ==, snmp.v3.protocol.priv=DES, snmp.storage.vacm.viewtree=readOnly, snmp.plugin.jvm=org.friendlysnmp.plugin.jvm.PluginJVM, snmp.v2.community=public, snmp.address.send-notification=10.155.10.228/162, snmp.persist.filename=DemoFriendly.bin, snmp.plugin.heartbeat=org.friendlysnmp.plugin.heartbeat.PluginHeartbeat, snmp.storage.vacm.group=readOnly, snmp.v3.password.auth=TumNjJ34uUA8XapXe3SYOQ==, snmp.v3.protocol.auth=SHA, snmp.storage.notify=readOnly, snmp.ignore-update-ms=1000, snmp.storage.vacm.access=readOnly, snmp.address.get-set=10.155.10.228/161}
2011-06-08 14:25:29,902 - org.friendlysnmp.FriendlyAgent - INFO - === STARTED FriendlyAgent ===
2011-06-08 14:25:29,968 - org.friendlysnmp.AgentWorker - INFO - Created agent at 10.155.10.228/161; Notify to 10.155.10.228/162; EngineID=80:00:71:a3:01:ac:10:01:76
2011-06-08 14:25:29,972 - org.friendlysnmp.FConfig - INFO - IgnoreUpdate: 1000 ms
2011-06-08 14:25:29,973 - org.friendlysnmp.persist.PersistStorageImpl - DEBUG - Storage filename 'DemoFriendly.bin'
2011-06-08 14:25:29,991 - org.friendlysnmp.persist.PersistStorageImpl - INFO - Loaded persist file: /home/vishwas/NetBeansProjects/SocketProgramming/DemoFriendly.bin
2011-06-08 14:25:29,991 - org.friendlysnmp.persist.PersistStorage - DEBUG - Persistency policy: ON_CHANGE
2011-06-08 14:25:29,992 - org.friendlysnmp.FConfig - INFO - Transport: UDP
2011-06-08 14:25:29,992 - org.friendlysnmp.FConfig - INFO - TransportDomain: IPV4
2011-06-08 14:25:29,997 - org.friendlysnmp.target.TargetBase - DEBUG - Created target 'public' SecModel=0 MsgProcModel=0 SecLevel=0
2011-06-08 14:25:29,999 - org.friendlysnmp.target.TargetBase - DEBUG - Loaded target 'public': storageVacmGroup=readOnly storageVacmAccess=readOnly storageVacmViewTree=readOnly storageNotify=readOnly notifyTimeout=1000 notifyRetryCount=1
2011-06-08 14:25:29,999 - org.friendlysnmp.AgentWorker - INFO - Added Target: TargetV2 TARGET=public
2011-06-08 14:25:30,012 - org.friendlysnmp.plugin.log4j.PluginLog4j - DEBUG - Found log4j props: /home/vishwas/NetBeansProjects/SocketProgramming/build/classes/log4j.properties
2011-06-08 14:25:30,079 - org.friendlysnmp.FTable - DEBUG - Created table: appConfigEntry
2011-06-08 14:25:30,080 - org.friendlysnmp.FTable - DEBUG - Created table: appDependenciesEntry
2011-06-08 14:25:30,080 - org.friendlysnmp.FTable - DEBUG - Created table: appInfoEntry
2011-06-08 14:25:30,080 - org.friendlysnmp.FTable - DEBUG - Created table: appPropEntry
2011-06-08 14:25:30,080 - org.friendlysnmp.FTable - DEBUG - Created table: deadlockViewEntry
2011-06-08 14:25:30,080 - org.friendlysnmp.FTable - DEBUG - Created table: deadlocksListEntry
2011-06-08 14:25:30,080 - org.friendlysnmp.FTable - DEBUG - Created table: exceptionViewEntry
2011-06-08 14:25:30,080 - org.friendlysnmp.FTable - DEBUG - Created table: exceptionsListEntry
2011-06-08 14:25:30,080 - org.friendlysnmp.FTable - DEBUG - Created table: persistCellEntry
2011-06-08 14:25:30,080 - org.friendlysnmp.FTable - DEBUG - Created table: persistScalarEntry
2011-06-08 14:25:30,081 - org.friendlysnmp.FTable - DEBUG - Created table: persistTableEntry
2011-06-08 14:25:30,081 - org.friendlysnmp.FTable - DEBUG - Created table: sysPropEntry
2011-06-08 14:25:30,083 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.3.0 'shutdownApp' Volatile=true
2011-06-08 14:25:30,084 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.3.3.1 'persistScalarEntry' Volatile=true
2011-06-08 14:25:30,086 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.3.4.1 'persistTableEntry' Volatile=true
2011-06-08 14:25:30,091 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.30.0 'deadlockCheckInterval' Volatile=false
2011-06-08 14:25:30,091 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.29091.1.1.1.2.30.0 'deadlockCheckInterval': 1
2011-06-08 14:25:30,092 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.32.0 'deadlockViewPolicy' Volatile=false
2011-06-08 14:25:30,092 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.29091.1.1.1.2.32.0 'deadlockViewPolicy': 1
2011-06-08 14:25:30,093 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.33.0 'deadlockViewFixedIndex' Volatile=true
2011-06-08 14:25:30,096 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.20.0 'exceptionViewPolicy' Volatile=false
2011-06-08 14:25:30,096 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.29091.1.1.1.2.20.0 'exceptionViewPolicy': 1
2011-06-08 14:25:30,096 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.21.0 'exceptionViewFixedIndex' Volatile=true
2011-06-08 14:25:30,098 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.29091.1.1.1.2.10.1 'exceptionsListEntry' Volatile=true
2011-06-08 14:25:30,106 - org.friendlysnmp.FTable - DEBUG - Created table: log4jLoggerEntry
2011-06-08 14:25:30,106 - org.friendlysnmp.FTable - DEBUG - Created table: log4jPropEntry
2011-06-08 14:25:30,106 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.29091.1.1.1.10.1.0 'log4jPropFile': /home/vishwas/NetBeansProjects/SocketProgramming/build/classes/log4j.properties
2011-06-08 14:25:30,138 - org.friendlysnmp.FTable - DEBUG - Created table: jvmMemGCEntry
2011-06-08 14:25:30,138 - org.friendlysnmp.FTable - DEBUG - Created table: jvmMemManagerEntry
2011-06-08 14:25:30,138 - org.friendlysnmp.FTable - DEBUG - Created table: jvmMemMgrPoolRelEntry
2011-06-08 14:25:30,138 - org.friendlysnmp.FTable - DEBUG - Created table: jvmMemPoolEntry
2011-06-08 14:25:30,139 - org.friendlysnmp.FTable - DEBUG - Created table: jvmRTBootClassPathEntry
2011-06-08 14:25:30,139 - org.friendlysnmp.FTable - DEBUG - Created table: jvmRTClassPathEntry
2011-06-08 14:25:30,139 - org.friendlysnmp.FTable - DEBUG - Created table: jvmRTInputArgsEntry
2011-06-08 14:25:30,139 - org.friendlysnmp.FTable - DEBUG - Created table: jvmRTLibraryPathEntry
2011-06-08 14:25:30,139 - org.friendlysnmp.FTable - DEBUG - Created table: jvmThreadInstanceEntry
2011-06-08 14:25:30,141 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.42.2.145.3.163.1.1.1.4.0 'jvmClassesVerboseLevel': 1
2011-06-08 14:25:30,145 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.42.2.145.3.163.1.1.2.2.0 'jvmMemoryGCVerboseLevel': 1
2011-06-08 14:25:30,147 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.42.2.145.3.163.1.1.2.3.0 'jvmMemoryGCCall' Volatile=true
2011-06-08 14:25:30,156 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.42.2.145.3.163.1.1.3.5.0 'jvmThreadContentionMonitoring': 4
2011-06-08 14:25:30,157 - org.friendlysnmp.FScalar - DEBUG - Updated 1.3.6.1.4.1.42.2.145.3.163.1.1.3.6.0 'jvmThreadCpuTimeMonitoring': 4
2011-06-08 14:25:30,158 - org.friendlysnmp.FValueNode - DEBUG - 1.3.6.1.4.1.42.2.145.3.163.1.1.3.7.0 'jvmThreadPeakCountReset' Volatile=true
2011-06-08 14:25:30,171 - org.friendlysnmp.AgentWorker - DEBUG - Transport=UDP
2011-06-08 14:25:30,180 - org.friendlysnmp.FException - ERROR - Failure to init SNMP agent
[1] java.net.BindException: Cannot assign requested address
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:85)
at java.net.DatagramSocket.bind(DatagramSocket.java:373)
at java.net.DatagramSocket.<init>(DatagramSocket.java:229)
at java.net.DatagramSocket.<init>(DatagramSocket.java:282)

属性文件如下

# NOTE: Some of the values below are defined as SET nodes and
# might be overwritten by MIB manager and persist between sessions.
#
# See FConstant class for full list of valid entries in the properties.

# Address of THIS application to respond on SET and GET requests
# The address 161 might be already used by Windows SNMP service.
snmp.address.get-set=10.155.10.228/161

# Address to send notifications
snmp.address.send-notification=10.155.10.228/162

# Plugins
snmp.plugin.jvm=org.friendlysnmp.plugin.jvm.PluginJVM
snmp.plugin.log4j=org.friendlysnmp.plugin.log4j.PluginLog4j
snmp.plugin.heartbeat=org.friendlysnmp.plugin.heartbeat.PluginHeartbeat

# Disallow application boots count reset.
# The entry is optional. Default value is true.
#snmp.allow-boots-count-reset=false

# Local engine ID.
# The entry is optional. This value overrides default generated value.
# NOTE: This value for SNMPv3 must match target EngineID in MIB browser
# (if it is set not empty)
#snmp.engine-id=00:00:00:00:00:00:00:00:08

# Heartbeat interval (seconds).
# This is interval in seconds how often heartbeat notifications are sent.
# The entry is optional. Default value is 0 sec.
# This value is ignored if it is set explicitly from MIB browser.
#snmp.heartbeat-interval-sec=60

# FriendlySNMP might receive multiple GET NEXT with subrequests
# for the same SNMP object in a short period of time. Each
# of these requests would fire update event. The application
# might want to coalesce duplicate update events into a single
# one. If identical update events are received in the
# following time frame only a single update event will be fired.
# Allowed values are 0 .. 10,000 ms.
# The entry is optional. Default value is 1000 ms.
snmp.ignore-update-ms=1000

# Root OID for views.
# These entries are optional. Default values are "1.3".
#snmp.oidroot.notify-view=1.3
#snmp.oidroot.read-view=1.3
#snmp.oidroot.write-view=1.3

# Thread pool size.
# The entry is optional. Default value is 4.
#snmp.thread-pool-size=4

# Filename to store serialized default persistence storage.
# The entry is optional. Default filename is generated from main app classname.
snmp.persist.filename=DemoFriendly.bin

# Transport. Valid values are: UDP or TCP.
# The entry is optional. Default value is UDP.
#snmp.transport=UDP

# Transport domain. Valid values are: IPV4, IPV4Z, IPV6, IPV6Z.
# The entry is optional. Default value is IPV4
#snmp.transport.domain=IPV4

# Storage type.
# MIB StorageType TC: Describes the memory realization of a conceptual row.
# A row which is volatile(2) is lost upon reboot. A row which either
# nonVolatile(3), permanent(4) or readOnly(5), is backed up by stable storage.
# A row which is permanent(4) can be changed but not deleted. A row which is
# readOnly(5) cannot be changed nor deleted.
# If the value of an object with this syntax is either permanent(4) or
# readOnly(5), it cannot be written. Conversely, if the value is either
# other(1), volatile(2) or nonVolatile(3), it cannot be modified to be
# permanent(4) or readOnly(5).
# Upper or lower case is ignored.
# These entries are optional. All defaults are "readOnly"
snmp.storage.vacm.group=readOnly
snmp.storage.vacm.access=readOnly
snmp.storage.vacm.viewtree=readOnly
snmp.storage.notify=readOnly

# Notification timeout.
# The entry is optional. Default value is 1000 ms.
#snmp.notify.timeout-ms=1000

# Notification retry count.
# The entry is optional. Default value is 1 time.
#snmp.notify.retry-count=1

# List of v1/v2 communities separated by spaces, e.g. "public snmp"
#snmp.v1.community=public
#snmp.v2.community=public snmp
snmp.v2.community=public

# List of v3 users separated by spaces, e.g. "john craig"
#snmp.v3.user=friend

# Security section for v3.
# These values are not used until "snmp.v3.user=.." entry is specified.
# Authentication and privilege passwords (passphrases) should be encoded
# using the FriendlyPro tool with the specified or default key.
# Valid auth protocols: none, MD5, SHA
# Valid priv protocols: none, DES, AES128, AES192, AES256
# Default protocols are "none" or define empty value for "none".
# Decrypted passwords: "SHAAuthPassword" and "DESPrivPassword"
snmp.v3.protocol.auth=SHA
snmp.v3.protocol.priv=DES
#snmp.v3.password.key=friendly
snmp.v3.password.auth=TumNjJ34uUA8XapXe3SYOQ==
snmp.v3.password.priv=/M3o0zp3Q+0g/BgRRoetGQ==

# Uncaught exceptions are handled by agent and their stack traces are not
# shown by JVM in a console. Set this value to "true" in development
# environment to see stack traces and to "false" in production to keep
# console clean.
# The entry is optional. Default value is "true".
#snmp.console-uncaught=false

# Persistency policy. The entry is optional.
# Valid values are "on_change" and "on_exit". Default value is "on_change"
#snmp.persist.policy=on_change

提前致谢。

问候, 维什瓦斯


@all --> 感谢您的帮助...我解决了问题...有一些配置错误。我纠正了同样的问题。现在一切都很好。再次感谢大家

4

1 回答 1

1

从您的描述看来,您正在尝试绑定到非本地 IP 地址。你不应该像那样使用绑定。您的目的是绑定到运行程序的机器上的 IP 地址。当您使用本地主机地址时,您的观察“令人毛骨悚然”不应该让人感到惊讶,因为这就是工作的意义所在。

于 2011-06-09T00:57:57.420 回答