FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.33k stars 1.25k forks source link

Unable to get zebra daemon running with gRPC enabled #12569

Closed spk-hebbar closed 1 year ago

spk-hebbar commented 1 year ago

I'm trying to enable gRPC on zebra daemon but ended up in following result, not sure what is that I'm missing. Please help.

#systemctl status frr
● frr.service - FRRouting
     Loaded: loaded (/etc/systemd/system/frr.service; enabled; vendor preset: disabled)
     Active: active (running) since Mon 2022-12-26 14:35:27 CET; 9min ago
       Docs: https://frrouting.readthedocs.io/en/latest/setup.html
    Process: 1570225 ExecStart=/usr/lib/frr/frrinit.sh start (code=exited, status=0/SUCCESS)
   Main PID: 1570231 (watchfrr)
     Status: "restarting all"
      Tasks: 6 (limit: 13512)
     Memory: 20.0M
        CPU: 736ms
     CGroup: /system.slice/frr.service
             ├─1570231 /usr/lib/frr/watchfrr -d -F traditional zebra bgpd staticd
             ├─1570733 /usr/lib/frr/bgpd -d -F traditional -A 127.0.0.1
             └─1570738 /usr/lib/frr/staticd -d -F traditional -A 127.0.0.1

Dec 26 14:41:38  watchfrr[1570231]: [YFT0P-5Q5YX] Forked background command [pid 1570714]: /usr/lib/frr/watchfrr.sh restart all
Dec 26 14:41:38  staticd[1570446]: [MRN6F-AYZC4] Terminating on signal
Dec 26 14:41:38  watchfrr[1570231]: [HD38Q-0HBRT][EC 268435457] staticd state -> down : read returned EOF
Dec 26 14:41:38  bgpd[1570441]: [ZW1GY-R46JE] Terminating on signal
Dec 26 14:41:38  watchfrr[1570231]: [HD38Q-0HBRT][EC 268435457] bgpd state -> down : read returned EOF
Dec 26 14:41:38  bgpd[1570733]: [VTVCM-Y2NW3] Configuration Read in Took: 00:00:00
Dec 26 14:41:38  watchfrr[1570231]: [VTVCM-Y2NW3] Configuration Read in Took: 00:00:00
Dec 26 14:41:38  staticd[1570738]: [VTVCM-Y2NW3] Configuration Read in Took: 00:00:00
Dec 26 14:41:38  watchfrr[1570231]: [QDG3Y-BY5TN] bgpd state -> up : connect succeeded
Dec 26 14:41:38  watchfrr[1570231]: [QDG3Y-BY5TN] staticd state -> up : connect succeeded

This is my daemon file:

bgpd=yes                                                                         
ospfd=no                                                                         
ospf6d=no                                                                        
ripd=no                                                                          
ripngd=no                                                                        
isisd=no                                                                         
pimd=no                                                                          
pim6d=no                                                                         
ldpd=no                                                                          
nhrpd=no                                                                         
eigrpd=no                                                                        
babeld=no                                                                        
sharpd=no                                                                        
pbrd=no                                                                          
bfdd=no                                                                          
fabricd=no                                                                       
vrrpd=no                                                                         
pathd=no                                                                         

#                                                                                
# If this option is set the /etc/init.d/frr script automatically loads           
# the config via "vtysh -b" when the servers are started.                        
# Check /etc/pam.d/frr if you intend to use "vtysh"!                             
#                                                                                
vtysh_enable=yes                                                                 
zebra_options="  -A 127.0.0.1 -s 90000000 --vrfwnetns -M grpc:50051"             
bgpd_options="   -A 127.0.0.1"                                                                                                                                                                                     
ospfd_options="  -A 127.0.0.1"                                             
...
...

This is my configure command: ./configure --prefix=/usr --localstatedir=/var/run/frr --sbindir=/usr/lib/frr --sysconfdir=/etc/frr --enable-pimd --enable-watchfrr --enable-grpc --enable-fpm --enable-protobuf

Attaching the config.log: config.log

I do have grpc installed:

#which grpc_cpp_plugin
/usr/local/bin/grpc_cpp_plugin
ton31337 commented 1 year ago

Just more information is needed: what if you run -M grpc (without specifying a port explicitly)? Maybe you can also enable debug northbound to see something in logs? From the above systemctl output, it's not using -M grpc:50051 option. What happens if you try running zebra manually, without watchfrr?

spk-hebbar commented 1 year ago

Thanks @ton31337 for responding.

If I try to run zebra manually, this is the error I get

#/usr/lib/frr/zebra -d -F traditional -A 127.0.0.1 -s 90000000 --vrfwnetns -M grpc
frr_init: loader error: dlopen(/usr/lib64/frr/modules/zebra_grpc.so): /usr/lib64/frr/modules/zebra_grpc.so: cannot open shared object file: No such file or directory
frr_init: loader error: dlopen(/usr/lib64/frr/modules/grpc.so): /usr/lib64/frr/modules/grpc.so: undefined symbol: OPENSSL_free
frr_init: loader error: dlopen(grpc): grpc: cannot open shared object file: No such file or directory

Looks like a missing configure option to build zebra_grpc module?

# ls /usr/lib64/frr/modules/
bgpd_bmp.la  dplane_fpm_nl.la  grpc.la  pathd_pcep.la  zebra_cumulus_mlag.la  zebra_fpm.la  zebra_irdp.la
bgpd_bmp.so  dplane_fpm_nl.so  grpc.so  pathd_pcep.so  zebra_cumulus_mlag.so  zebra_fpm.so  zebra_irdp.so
github-actions[bot] commented 1 year ago

This issue is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this issue closed.

frrbot[bot] commented 1 year ago

This issue will be automatically closed in the specified period unless there is further activity.