1

Ports 161/162 are in use by a java software, so the requirement is to use 163 for net-snmp

[root@testSRV snmp]# netstat -apn | grep 162
udp        0      0 ::ffff:10.145.1.10:162    :::*                                    2827/java           
[root@testSRV snmp]# netstat -apn | grep 161
udp        0      0 ::ffff:10.145.1.10:161    :::*                                    2827/java 



[root@testSRV snmp]# cat /etc/snmp/snmpd.conf
com2sec notConfigUser  default       public
group   notConfigGroup v1           notConfigUser
group   notConfigGroup v2c           notConfigUser
view    systemview    included   .1.3.6.1.2.1.1
view    systemview    included   .1.3.6.1.2.1.25.1.1
access  notConfigGroup ""      any       noauth    exact  systemview none none
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
dontLogTCPWrappersConnects yes
sysContact Test, Inc.
sysName TestSystem
sysDescr TestSystem Test, Inc
rocommunity  public
rwcommunity  private
trapsink   localhost   public
trap2sink  localhost   public
agentaddress udp:127.0.0.1:163

cat /etc/sysconfig/snmpd

# snmpd command line options
[root@testSRV snmp]#
[root@testSRV snmp]# 

Trying to bring snmpd up

[root@testSRV snmp]# /etc/init.d/snmpd restart
Stopping snmpd:                                            [FAILED]
Starting snmpd:                                            [FAILED]

on /var/log/messages

Sep 17 15:55:12 testSRV snmpd[18911]: Error opening specified endpoint "udp:127.0.0.1:163"
Sep 17 15:55:12 testSRV snmpd[18911]: Server Exiting with code 1

If I remove the line "agentaddress udp:127.0.0.1:163" from /etc/snmp/snmpd.conf and use the following command

[root@testSRV snmp]# snmpd -f -Lo udp:163 -C -c /etc/snmp/snmpd.conf
error on subcontainer 'ia_addr' insert (-1)
NET-SNMP version 5.5
error on subcontainer 'ia_addr' insert (-1)
error on subcontainer 'ia_addr' insert (-1)
error on subcontainer 'ia_addr' insert (-1)

SNMPD comes up but I get the message above on the console. Is there any way to use the parameters of "snmpd -f -Lo udp:163 -C -c /etc/snmp/snmpd.conf" to /etc/snmp/snmpd.conf?

DimitrisD
  • 231
  • 2
  • 11

0 Answers0