opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
845 stars 639 forks source link

FRRouting doesn't start after enabling SNMP AgentX #3166

Closed trunet closed 1 year ago

trunet commented 2 years ago

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

Describe the bug FRR will not start after enabling SNMP agentx.

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 This issue follows https://github.com/opnsense/plugins/issues/2541 that was closed due to inactivity.

Zebra is compiled with --enable-snmp:

zebra version 7.5.1
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
        '--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--disable-doc-html' '--sysconfdir=/usr/local/etc/frr' '--localstatedir=/var/run/frr' '--disable-backtrace' '--disable-nhrpd' '--disable-pimd' '--disable-vrrpd' '--with-vtysh-pager=cat' '--disable-config-rollbacks' '--disable-datacenter' '--enable-fpm' '--disable-ldpd' '--enable-multipath=64' '--without-libpam' '--enable-rpki' '--disable-shell-access' '--enable-snmp' '--disable-tcmalloc' '--enable-vtysh' '--prefix=/usr/local' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd13.1' 'build_alias=amd64-portbld-freebsd13.1' 'PKG_CONFIG=pkgconf' 'PKG_CONFIG_LIBDIR=/usr/obj/usr/ports/net/frr7/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig' 'CC=cc' 'CFLAGS=-O2 -pipe -std=gnu99 -fstack-protector-strong -fno-strict-aliasing ' 'LDFLAGS= -L/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib -fstack-protector-strong ' 'LIBS=' 'CPPFLAGS=-I/usr/local/include -Wno-error -I/usr/local/include' 'CPP=cpp' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -std=gnu99 -fstack-protector-strong -fno-strict-aliasing ' 'PYTHON=/usr/local/bin/python3.9'

Environment OPNsense 22.7.6 (amd64/OpenSSL)

raymonvdm commented 1 year ago

I`m seem to be having the same issue on 23.1.1 with os-frr 1.32_1

OPNsense-bot commented 1 year ago

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository, please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue, just let us know, so we can reopen the issue and assign an owner to it.

si458 commented 1 year ago

im having the same issue with the latest of opnsense

OPNsense 23.1.7_3-amd64
FreeBSD 13.1-RELEASE-p7
OpenSSL 1.1.1t 7 Feb 2023
ciroiriarte commented 1 year ago

issue still present in 23.7.3

Highview-Lucas commented 1 year ago

I have run into this issue on several machines: opnSense 23.1.10_1 amd64 / os-frr 1.33 / os-net-snmp 1.5_2 opnSense 23.1.10_1 amd64 / os-frr 1.33 / os-net-snmp 1.5_2 opnSense 23.7.4 amd64 / os-frr 1.36 / os-net-snmp 1.5_2

ticking "AgentX" in the FRR config causes the FRR Daemon to not start.

Diafwl commented 10 months ago

Tried to run on my machine and the problem still exist.

OPNsense 23.7.10_1-amd64 / os-frr 1.37 / os-net-snmp 1.5_3

also i found this error in FRR logs. [SHWNK-NWT5S][EC 100663304] No such command on config line 12: agentx

mimugmail commented 10 months ago

Maybe a permission problem with frr and agentx?

https://redmine.pfsense.org/issues/11610