NginxProxyManager / NginxProxyManager/nginx-proxy-manager

Address already in use

Open
#5,852 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
34.2k
Forks
3.9k
Avg merge
21h 12m
Merged PRs (30d)
20

Description

this but is marked as closed but as of 2.15.1 it still exists
ways to reproduce it:
1- edit random host
2- RANDOMLY it starts throwing errors:

nginx  | nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx  | nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx  | nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
nginx  | nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)
nginx  | nginx: [emerg] bind() to 0.0.0.0:81 failed (98: Address already in use)
nginx  | nginx: [emerg] bind() to [::]:81 failed (98: Address already in use)

there is no definite way of checking what triggers it

nginx is installed as docker compose:

cat docker-compose.yaml  | grep -v '#'
services:

   container_name: nginx
   image: 'docker.io/jc21/nginx-proxy-manager:latest'
   restart: unless-stopped
   environment:
     TZ: Europe/London

   ports:
     - target: 443
       mode: host
       protocol: tcp
     - target: 80
       mode: host
       protocol: tcp
     - target: 81
       published: 81
       mode: host
       protocol: tcp

   volumes:
     - ./data:/data
     - ./letsencrypt:/etc/letsencrypt



sudo docker compose down && sudo docker compose up solves the problem until next time it reappears

there is COMPLETELY NOTHING ELSE on this host running - just lxc container on proxmox and docker compose file for nginx

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied docker-compose.yaml and reproduce the failure while checking which process owns ports 80, 443, and 81. Compare a clean docker compose down && docker compose up run with the later failure; done means finding a reliable trigger and confirming the ports remain available across restarts.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, nginx
Domain
infrastructure, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.