Skip to content

TCP Dynamic Proxy is not releasing ports from deregistered services #796

@fwkz

Description

@fwkz

Abstract

fabio leaves dangling ports from deregistered services that used TCP Dynamic Proxy

Steps to reproduce

  1. Start fabio:1.5.14-go1.15 docker container with FABIO_PROXY_ADDR=":9999,0.0.0.0:0;proto=tcp-dynamic;refresh=5s" and host networking.
  2. Register 2 consul services that will use TCP Dynamic Proxy
netstat -tulpn | grep fabio                                                                                                                                                          nomad-1: Tue Oct 27 16:37:20 2020

tcp6	   0	  0 :::31130                :::*                    LISTEN	29060/fabio
tcp6	   0	  0 :::24604                :::*                    LISTEN	29060/fabio
tcp6	   0	  0 :::9998                 :::*                    LISTEN	29060/fabio
tcp6	   0	  0 :::9999                 :::*                    LISTEN	29060/fabio
  1. Deregister one of the consul services. Port 31130 is dangling, despite the fact that the underlying service is deregistered and no longer visible on Fabio UI (http://foobar.fabio.ui:9998/routes)
netstat -tulpn | grep fabio                                                                                                                                                          nomad-1: Tue Oct 27 16:37:20 2020

tcp6	   0	  0 :::31130                :::*                    LISTEN	29060/fabio
tcp6	   0	  0 :::24604                :::*                    LISTEN	29060/fabio
tcp6	   0	  0 :::9998                 :::*                    LISTEN	29060/fabio
tcp6	   0	  0 :::9999                 :::*                    LISTEN	29060/fabio
  1. Restart fabio container to see if it will release ports and start properly.
netstat -tulpn | grep fabio                                                                                                                                                          nomad-1: Tue Oct 27 16:37:20 2020

tcp6	   0	  0 :::24604                :::*                    LISTEN	29060/fabio
tcp6	   0	  0 :::9998                 :::*                    LISTEN	29060/fabio
tcp6	   0	  0 :::9999                 :::*                    LISTEN	29060/fabio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions