osrg / gobgp

BGP implemented in the Go Programming Language
https://osrg.github.io/gobgp/
Apache License 2.0
3.6k stars 685 forks source link

reload: 50051: bind: address already in use #2829

Open qin-nz opened 1 month ago

qin-nz commented 1 month ago

OS: "Ubuntu 22.04.4 LTS" installed by apt install gobgpd version: gobgpd/jammy,now 2.25.0-3build1 amd64

Step to reproduce:

  1. system restart gobgpd
  2. system reload gobgpd ( ExecReload=/usr/bin/gobgpd -r )
    systemd[1]: Reloading GoBGP Routing Daemon...
    gobgpd[1146209]: {"level":"info","msg":"gobgpd started","time":"2024-08-09T16:31:04+08:00"}
    gobgpd[1146209]: {"Error":"listen tcp :50051: bind: address already in use","Key":":50051","Topic":"grpc","level":"warning","msg":"listen failed","time":"2024-08-09T16:31:04+08:00"}
    gobgpd[1146209]: {"level":"fatal","msg":"failed to listen grpc port: listen tcp :50051: bind: address already in use","time":"2024-08-09T16:31:04+08:00"}
    systemd[1]: gobgpd.service: Control process exited, code=exited, status=1/FAILURE
    systemd[1]: Reload failed for GoBGP Routing Daemon.

/etc/gobgpd.conf

[global.config]
  as = 1
  router-id = "10.0.3.11"

[[neighbors]]
  [neighbors.config]
    neighbor-address = "10.0.8.1"
    peer-as = 2

[[neighbors]]
  [neighbors.config]
    neighbor-address = "10.0.9.1"
    peer-as = 3
keithcroxford commented 1 month ago

If you run sudo lsof -i :50051 does it show any application already bound to the port?

fujita commented 1 month ago

system reload gobgpd ( ExecReload=/usr/bin/gobgpd -r )

Humm, the '-r' option isn't reload. It's graceful restart?