net-snmp altera a porta padrão 161 para outra coisa

1

As portas 161/162 estão sendo usadas por um software java, portanto, o requisito é usar 163 para 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]# 

Tentando trazer snmpd

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

em / 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

Se eu remover a linha "agentaddress udp: 127.0.0.1: 163" do /etc/snmp/snmpd.conf e usar o seguinte comando

[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)

O SNMPD aparece, mas eu recebo a mensagem acima no console. Existe alguma maneira de usar os parâmetros de "snmpd -f -Lo udp: 163 -C -c /etc/snmp/snmpd.conf" para /etc/snmp/snmpd.conf?

    
por poscaman 17.09.2015 / 15:03

0 respostas