ports icon indicating copy to clipboard operation
ports copied to clipboard

FRRouting doesn't start after enabling SNMP AgentX

Open debdolph opened this issue 1 year ago • 10 comments

Important notices Before you add a new report, we ask you kindly to acknowledge the following:

  • [x] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
  • [ ] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
  • [x] The title contains the plugin to which this issue belongs

Describe the bug A clear and concise description of what the bug is, including last known working version (if any).

Tip: to validate your setup was working with the previous version, use opnsense-revert (https://docs.opnsense.org/manual/opnsense_tools.html#opnsense-revert)

To Reproduce Steps to reproduce the behavior:

  1. Install 'os-net-snmp' package
  2. Go to 'Services/Net-SNMP'
  3. Enable 'Add AgentX Support' and save
  4. Go to 'Routing/General'
  5. Enable 'SNMP AgentX Support' and save
  6. It will not start again, Logs will show the errors below

Expected behavior FRR should start and its information exposed over SNMP.

Relevant log files

[root@firewall01 /usr/local/etc/frr]# service frr start Checking zebra.conf 2022/10/20 01:56:39 ZEBRA: [EC 100663303] if_ioctl(SIOCGIFMEDIA) failed: Inappropriate ioctl for device 2022/10/20 01:56:39 ZEBRA: [EC 100663303] if_ioctl(SIOCGIFMEDIA) failed: Inappropriate ioctl for device 2022/10/20 01:56:39 ZEBRA: [EC 100663303] if_ioctl(SIOCGIFMEDIA) failed: Inappropriate ioctl for device 2022/10/20 01:56:39 ZEBRA: [EC 100663303] if_ioctl(SIOCGIFMEDIA) failed: Inappropriate ioctl for device 2022/10/20 01:56:39 ZEBRA: [EC 100663303] if_ioctl(SIOCGIFMEDIA) failed: Inappropriate ioctl for device 2022/10/20 01:56:39 ZEBRA: [EC 100663303] if_ioctl(SIOCGIFMEDIA) failed: Inappropriate ioctl for device 2022/10/20 01:56:39 ZEBRA: [EC 100663303] if_ioctl(SIOCGIFMEDIA) failed: Inappropriate ioctl for device 2022/10/20 01:56:39 ZEBRA: [EC 100663303] if_ioctl(SIOCGIFMEDIA) failed: Inappropriate ioctl for device 2022/10/20 01:56:39 ZEBRA: [EC 100663303] if_ioctl(SIOCGIFMEDIA) failed: Inappropriate ioctl for device 2022/10/20 01:56:39 ZEBRA: [EC 100663303] if_ioctl(SIOCGIFMEDIA) failed: Inappropriate ioctl for device 2022/10/20 01:56:39 ZEBRA: [EC 4043309111] Disabling MPLS support (no kernel support) 2022/10/20 01:56:39 ZEBRA: [EC 100663304] ERROR: No such command on config line 12: agentx OK Starting zebra. loading module "snmp" failed: Shared object "snmp" not found, required by "zebra" /usr/local/etc/rc.d/frr: WARNING: failed to start zebra Checking bgpd.conf 2022/10/20 01:56:39 BGP: [EC 33554499] sendmsg_nexthop: zclient_send_message() failed 2022/10/20 01:56:39 BGP: [EC 33554499] sendmsg_nexthop: zclient_send_message() failed 2022/10/20 01:56:39 BGP: [EC 33554499] sendmsg_nexthop: zclient_send_message() failed 2022/10/20 01:56:39 BGP: [EC 33554499] sendmsg_nexthop: zclient_send_message() failed OK Starting bgpd. loading module "snmp" failed: Shared object "snmp" not found, required by "bgpd" /usr/local/etc/rc.d/frr: WARNING: failed to start bgpd

Additional context For some more information, see https://github.com/opnsense/plugins/issues/3166.

I also copied the log files from there…

Environment Software version used and hardware type if relevant. e.g.:

opnSense 23.7.4 amd64 / os-frr 1.36 / os-net-snmp 1.5_2

debdolph avatar Oct 08 '23 20:10 debdolph

Since you reported on 23.7.4… same for 23.7.5?

fichtner avatar Oct 09 '23 04:10 fichtner

Since you reported on 23.7.4… same for 23.7.5?

I suppose so, yes. I am currently unable to test and will test this tomorrow.

debdolph avatar Oct 09 '23 07:10 debdolph

I'm not so sure because:

https://github.com/opnsense/tools/commit/a5415d46139 https://github.com/opnsense/ports/commit/2d2e0b1c4c

I saw your report earlier but I started working on it after not having found the original report so I could not follow up that things have changed for 23.7.5.

fichtner avatar Oct 09 '23 07:10 fichtner

root@gw:~ # /usr/local/etc/rc.d/frr start
Checking zebra.conf
2023/10/09 11:42:25 ZEBRA: [NNACN-54BDA][EC 4043309110] Disabling MPLS support (no kernel support)
2023/10/09 11:42:25 ZEBRA: [SHWNK-NWT5S][EC 100663304] No such command on config line 12: agentx
OK
Starting zebra.
frr_init: loader error: dlopen(/usr/local/lib/frr/modules/zebra_snmp.so): /usr/local/lib/libfrrsnmp.so.0: Undefined symbol "netsnmp_enable_subagent"
frr_init: loader error: dlopen(/usr/local/lib/frr/modules/snmp.so): Cannot open "/usr/local/lib/frr/modules/snmp.so"
frr_init: loader error: dlopen(snmp): Shared object "snmp" not found, required by "zebra"
/usr/local/etc/rc.d/frr: WARNING: failed to start zebra
Checking bgpd.conf
OK
Starting bgpd.
frr_init: loader error: dlopen(/usr/local/lib/frr/modules/bgpd_snmp.so): /usr/local/lib/libfrrsnmp.so.0: Undefined symbol "netsnmp_enable_subagent"
frr_init: loader error: dlopen(/usr/local/lib/frr/modules/snmp.so): Cannot open "/usr/local/lib/frr/modules/snmp.so"
frr_init: loader error: dlopen(snmp): Shared object "snmp" not found, required by "bgpd"
/usr/local/etc/rc.d/frr: WARNING: failed to start bgpd

debdolph avatar Oct 09 '23 09:10 debdolph

Yeah ok this is still broken in FreeBSD ports then. I'll try to fix it in time for 23.7.6 this week.

fichtner avatar Oct 09 '23 09:10 fichtner

Just to double check what is said for:

# pkg info frr8 | grep SNMP

fichtner avatar Oct 09 '23 09:10 fichtner

root@gw:~ # pkg info frr8 | grep SNMP
	SNMP           : on

debdolph avatar Oct 09 '23 11:10 debdolph

Still broken in 23.7.6…

debdolph avatar Oct 15 '23 15:10 debdolph

I know 😉

fichtner avatar Oct 15 '23 15:10 fichtner

Tested https://github.com/opnsense/ports/commit/334eb5c2fbff today but the relevant build bits were already in place. Same result: it builds, it's broken on start. I can't spend more community time on this on the premise that nobody who can fix this uses it (apparently) or nobody really uses it at all. I am not a fan in general when it comes to adding activex support anyway. Might be confirmation bias here, but could also be a very fringe use case. Moving this to ports marking upstream.

fichtner avatar Oct 19 '23 18:10 fichtner