Page MenuHomePhabricator

SNMP: non verbose error message on wrong listen-address
Closed, DuplicatePublicBUG


This just happened to me, my setup is:

cpo@CR1# show interfaces loopback lo
 description Loopback

And I wanted to bind the SNMP server to the IP address which is not available on my system.


set service snmp community VyOSroxx authorization ro
set service snmp community VyOSroxx network
set service snmp contact 'Admin <>'
set service snmp listen-address port 161
set service snmp location 'Milkyway, Mars, Northpole'
[[service snmp]] failed
Commit failed

When checking the system log I see:

Dec  1 18:14:49 CR1 snmpd[3916]: Error opening specified endpoint "udp:"
Dec  1 18:14:49 CR1 snmpd[3916]: Server Exiting with code 1
Dec  1 18:14:49 CR1 systemd[1]: snmpd.service: control process exited, code=exited status=1
Dec  1 18:14:49 CR1 systemd[1]: Failed to start LSB: SNMP agents.
Dec  1 18:14:49 CR1 systemd[1]: Unit snmpd.service entered failed state.

Which halped me alot.

@dmbaturin shouldn't there be a generic way to support only available IP addresses on the system at all, like any +cough+ Perl script?


Difficulty level
Unknown (require assessment)
VyOS 999.201712011703
Why the issue appeared?
Will be filled on close
c-po created this task.Dec 1 2017, 5:23 PM
syncer triaged this task as Normal priority.Dec 21 2017, 9:11 PM
syncer assigned this task to c-po.Oct 13 2018, 7:15 PM
c-po added a comment.Oct 20 2018, 9:21 PM

I will implement at least a warning message for the user. Enforcing proper IP addresses could break old comfigurations - or they should be deleted by a migration script and then we can print proper error messages.