{"id":16858978,"url":"https://github.com/ross/haproxy-binding","last_synced_at":"2026-07-14T15:44:38.234Z","repository":{"id":66454356,"uuid":"308682950","full_name":"ross/haproxy-binding","owner":"ross","description":"Demo of haproxy binding issue","archived":false,"fork":false,"pushed_at":"2020-10-30T21:35:18.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T19:37:56.945Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ross.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-30T16:17:35.000Z","updated_at":"2020-10-30T21:35:20.000Z","dependencies_parsed_at":"2023-02-20T20:00:19.596Z","dependency_job_id":null,"html_url":"https://github.com/ross/haproxy-binding","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ross%2Fhaproxy-binding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ross%2Fhaproxy-binding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ross%2Fhaproxy-binding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ross%2Fhaproxy-binding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ross","download_url":"https://codeload.github.com/ross/haproxy-binding/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244236079,"owners_count":20420759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T14:15:47.521Z","updated_at":"2025-10-24T21:03:13.387Z","avatar_url":"https://github.com/ross.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"### haproxy-binding\n\nOn a system with docker:\n\n```\n# ./run.sh\n```\n\nBy default this is using HAProxy 1.8.26, but I get the same behavior with\n`latest` which is 2.2.x atm.\n\n### Example run:\n\nNot the *** 44 failed *** towards the end. That IP exists on dummy0 and should\nwork. It was 43 that was removed. 45 and the stats bind are fine. What does and\ndoesn't work seems to be consistent here, but we've seen it be fairly random,\ndifferent on different boxes during the same process/rollout so it may not be\ncompletely deterministic.\n\n```\nbox:haproxy-reload ross$ ./run.sh\nSending build context to Docker daemon  10.75kB\nStep 1/6 : FROM haproxy:1.8.26\n ---\u003e 91f093348f56\nStep 2/6 : RUN apt-get update   \u0026\u0026 apt-get install -y --no-install-recommends curl iproute2 net-tools   \u0026\u0026 rm -rf /var/lib/apt/lists/*\n ---\u003e Using cache\n ---\u003e 081f602b8d32\nStep 3/6 : RUN mkdir /app\n ---\u003e Using cache\n ---\u003e 81ff78015a78\nStep 4/6 : WORKDIR /app\n ---\u003e Using cache\n ---\u003e 085e666c55a9\nStep 5/6 : COPY . .\n ---\u003e Using cache\n ---\u003e d0b335475a80\nStep 6/6 : CMD /app/test.sh\n ---\u003e Using cache\n ---\u003e a535798c5ea8\nSuccessfully built a535798c5ea8\nSuccessfully tagged haproxy-reloads:latest\nCreating dummy0\nBinding extra ips\nwith all\nOK - with\n43 worked\nOK - with\n44 worked\nOK - with\n45 worked\nstats worked\nRemoving 43, switching to without\n[WARNING] 303/161811 (12) : Reexecuting Master process\n[WARNING] 303/161813 (12) : Former worker 14 exited with code 0\nOK - without\n44 worked\nOK - without\n45 worked\nstats worked\nSwitching back to with, .43 doesn't exist\n[WARNING] 303/161813 (12) : Reexecuting Master process\n[WARNING] 303/161815 (12) : [/usr/local/sbin/haproxy.main()] Cannot raise FD limit to 4017, limit is 4016.\n[ALERT] 303/161815 (12) : Starting frontend main: cannot bind socket [192.168.42.43:80]\n[WARNING] 303/161815 (12) : Reexecuting Master process in waitpid mode\n[WARNING] 303/161815 (12) : Reexecuting Master process\ncurl: (56) Recv failure: Connection reset by peer\n*** 44 failed ***\nOK - without\n45 worked\nstats worked\n[WARNING] 303/161817 (12) : Exiting Master process...\n```\n### sysctl work-around\n\nSetting sysctl `net.ipv4.ip_nonlocal_bind=1` (and `net.ipv6.ip_nonlocal_bind=1`\nif you're using IPv6 binds too) works around the issue.\n\n```\nbox:haproxy-reload ross$ ./run.sh --sysctl net.ipv4.ip_nonlocal_bind=1\nSending build context to Docker daemon  10.75kB\nStep 1/6 : FROM haproxy:latest\n ---\u003e 9e2effcbbd93\nStep 2/6 : RUN apt-get update   \u0026\u0026 apt-get install -y --no-install-recommends curl iproute2 net-tools   \u0026\u0026 rm -rf /var/lib/apt/lists/*\n ---\u003e Using cache\n ---\u003e 032bcdc8b376\nStep 3/6 : RUN mkdir /app\n ---\u003e Using cache\n ---\u003e da519cc4d41f\nStep 4/6 : WORKDIR /app\n ---\u003e Using cache\n ---\u003e 3efcb173d3d0\nStep 5/6 : COPY . .\n ---\u003e Using cache\n ---\u003e fe4f1a62f4d9\nStep 6/6 : CMD /app/test.sh\n ---\u003e Using cache\n ---\u003e 9df62880070a\nSuccessfully built 9df62880070a\nSuccessfully tagged haproxy-reloads:latest\nCreating dummy0\nBinding extra ips\nwith all\n[NOTICE] 303/213037 (13) : New worker #1 (16) forked\nOK - with\n43 worked\nOK - with\n44 worked\nOK - with\n45 worked\nstats worked\nRemoving 43, switching to without\n[WARNING] 303/213039 (13) : Reexecuting Master process\n[WARNING] 303/213039 (16) : Stopping frontend main in 0 ms.\n[WARNING] 303/213039 (16) : Stopping backend 200_ok in 0 ms.\n[WARNING] 303/213039 (16) : Stopping proxy statsctl in 0 ms.\n[WARNING] 303/213039 (16) : Stopping frontend GLOBAL in 0 ms.\n[WARNING] 303/213039 (16) : Proxy main stopped (cumulated conns: FE: 3, BE: 0).\n[WARNING] 303/213039 (16) : Proxy 200_ok stopped (cumulated conns: FE: 0, BE: 3).\n[WARNING] 303/213039 (16) : Proxy statsctl stopped (cumulated conns: FE: 1, BE: 0).\n[WARNING] 303/213039 (16) : Proxy GLOBAL stopped (cumulated conns: FE: 0, BE: 0).\n[NOTICE] 303/213039 (13) : New worker #1 (30) forked\n[WARNING] 303/213039 (13) : Former worker #1 (16) exited with code 0 (Exit)\nOK - without\n44 worked\nOK - without\n45 worked\nstats worked\nSwitching back to with, .43 doesn't exist\n[WARNING] 303/213041 (13) : Reexecuting Master process\n[WARNING] 303/213041 (30) : Stopping frontend main in 0 ms.\n[WARNING] 303/213041 (30) : Stopping backend 200_ok in 0 ms.\n[WARNING] 303/213041 (30) : Stopping proxy statsctl in 0 ms.\n[WARNING] 303/213041 (30) : Stopping frontend GLOBAL in 0 ms.\n[WARNING] 303/213041 (30) : Proxy main stopped (cumulated conns: FE: 2, BE: 0).\n[WARNING] 303/213041 (30) : Proxy 200_ok stopped (cumulated conns: FE: 0, BE: 2).\n[WARNING] 303/213041 (30) : Proxy statsctl stopped (cumulated conns: FE: 1, BE: 0).\n[WARNING] 303/213041 (30) : Proxy GLOBAL stopped (cumulated conns: FE: 0, BE: 0).\n[NOTICE] 303/213041 (13) : New worker #1 (42) forked\n[WARNING] 303/213041 (13) : Former worker #1 (30) exited with code 0 (Exit)\nOK - with\n44 worked\nOK - with\n45 worked\nstats worked\n[WARNING] 303/213043 (13) : Exiting Master process...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fross%2Fhaproxy-binding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fross%2Fhaproxy-binding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fross%2Fhaproxy-binding/lists"}