[GH-ISSUE #371] Address already in use after update #315

Closed
opened 2026-02-26 06:32:13 +03:00 by kerem · 9 comments
Owner

Originally created by @Thijmen on GitHub (Apr 15, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/371

Hi all,

I am running this fantastic tool for a while. I want to update to the latest image, because of #356 (which got merged recently 🥳 ).

This is the error I get:

app_1 | [4/15/2020] [12:58:05 PM] [SSL ] › ℹ info Let's Encrypt Renewal Timer initialized
app_1 | [4/15/2020] [12:58:05 PM] [SSL ] › ℹ info Renewing SSL certs close to expiry...
app_1 | [4/15/2020] [12:58:05 PM] [IP Ranges] › ℹ info IP Ranges Renewal Timer initialized
app_1 | Uncaught Error: listen EADDRINUSE: address already in use :::3000

I used docker-compose pull and I was under the impression that it would be an easy upgrade. I tried jc21/nginx-proxy-manager:2 and jc21/nginx-proxy-manager:latest

Is there any way I can help debug this?

Originally created by @Thijmen on GitHub (Apr 15, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/371 Hi all, I am running this fantastic tool for a while. I want to update to the latest image, because of #356 (which got merged recently 🥳 ). This is the error I get: > app_1 | [4/15/2020] [12:58:05 PM] [SSL ] › ℹ info Let's Encrypt Renewal Timer initialized > app_1 | [4/15/2020] [12:58:05 PM] [SSL ] › ℹ info Renewing SSL certs close to expiry... > app_1 | [4/15/2020] [12:58:05 PM] [IP Ranges] › ℹ info IP Ranges Renewal Timer initialized > app_1 | Uncaught Error: listen EADDRINUSE: address already in use :::3000 I used `docker-compose pull` and I was under the impression that it would be an easy upgrade. I tried ` jc21/nginx-proxy-manager:2` and ` jc21/nginx-proxy-manager:latest` Is there any way I can help debug this?
kerem 2026-02-26 06:32:13 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Thijmen commented on GitHub (Apr 15, 2020):

Nevermind, I found it. Apparently the newer version binds to port 3000, and I am also proxy'ing a port 3000. Solved!

<!-- gh-comment-id:614026332 --> @Thijmen commented on GitHub (Apr 15, 2020): Nevermind, I found it. Apparently the newer version binds to port `3000`, and I am also proxy'ing a port 3000. Solved!
Author
Owner

@Thijmen commented on GitHub (Apr 15, 2020):

In hindsight, it would be nice if github.com/jc21/nginx-proxy-manager@bb0f4bfa62/backend/index.js (L24) was an env-variable. Maybe I'll contribute that in the future!

<!-- gh-comment-id:614031087 --> @Thijmen commented on GitHub (Apr 15, 2020): In hindsight, it would be nice if https://github.com/jc21/nginx-proxy-manager/blob/bb0f4bfa626bfa30e3ad2fa31b5d759c9de98559/backend/index.js#L24 was an env-variable. Maybe I'll contribute that in the future!
Author
Owner

@jc21 commented on GitHub (Apr 15, 2020):

Well no it doesn't matter what port the backend binds to inside of it's own network. It matters to you, what port you expose to your host that maps to the container ports.

If you are seeing a port already in use problem, I can only assume you're running this container in a shared docker network with another service. 3000 is not even exposed in the Dockerfile so my previous statement wouldn't even be a problem either :/

<!-- gh-comment-id:614276073 --> @jc21 commented on GitHub (Apr 15, 2020): Well no it doesn't matter what port the backend binds to **inside** of it's own network. It matters to you, what port you expose to your host that maps to the container ports. If you are seeing a port already in use problem, I can only assume you're running this container in a shared docker network with another service. 3000 is not even exposed in the Dockerfile so my previous statement wouldn't even be a problem either :/
Author
Owner

@Thijmen commented on GitHub (Apr 16, 2020):

No, but if I already use port 3000 for nginx (streaming ports), it makes sense :) The message came from the container, not the host.

<!-- gh-comment-id:614500444 --> @Thijmen commented on GitHub (Apr 16, 2020): No, but if I already use port 3000 for nginx (streaming ports), it makes sense :) The message came from the container, not the host.
Author
Owner

@jc21 commented on GitHub (Apr 16, 2020):

Ah yes of course

<!-- gh-comment-id:614540243 --> @jc21 commented on GitHub (Apr 16, 2020): Ah yes of course
Author
Owner

@Thijmen commented on GitHub (Apr 16, 2020):

How do you feel about making it an ENV-var, @jc21 ?

<!-- gh-comment-id:614592340 --> @Thijmen commented on GitHub (Apr 16, 2020): How do you feel about making it an ENV-var, @jc21 ?
Author
Owner

@jc21 commented on GitHub (Apr 16, 2020):

I feel uneasy about it. The backend api can listen on any port easy enough with a env var deciding what that port is. But, the Nginx configuration forwards requests from the Admin UI to the API with 127.0.0.1:3000 and that would need to be dynamic as well.

<!-- gh-comment-id:614940039 --> @jc21 commented on GitHub (Apr 16, 2020): I feel uneasy about it. The backend api can listen on any port easy enough with a env var deciding what that port is. But, the Nginx configuration forwards requests from the Admin UI to the API with `127.0.0.1:3000` and that would need to be dynamic as well.
Author
Owner

@jc21 commented on GitHub (Apr 16, 2020):

As a workaround for yourself, you can map ports in your docker-compose file 3000:3001 and then set up a stream for 3001 to forward wherever you like.

<!-- gh-comment-id:614940428 --> @jc21 commented on GitHub (Apr 16, 2020): As a workaround for yourself, you can map ports in your docker-compose file `3000:3001` and then set up a stream for `3001` to forward wherever you like.
Author
Owner

@Thijmen commented on GitHub (Apr 17, 2020):

Hmm yes, did not think of that, good point @jc21. I changed my infrastructure to adapt with the change anyway.

<!-- gh-comment-id:615123117 --> @Thijmen commented on GitHub (Apr 17, 2020): Hmm yes, did not think of that, good point @jc21. I changed my infrastructure to adapt with the change anyway.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#315
No description provided.