[GH-ISSUE #1259] Port already in use #889

Closed
opened 2026-05-05 04:21:09 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @Zolektric on GitHub (Jan 17, 2025).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1259

🐞 Describe the bug
I can't serve NTFY. Doesn't matter what port I try, I get the same error:

💻 Components impacted
Debian 12 LXC on Proxmox

💡 Screenshots and/or logs

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      285/master          
tcp6       0      0 ::1:25                  :::*                    LISTEN      285/master          
tcp6       0      0 :::22                   :::*                    LISTEN      1/init              
tcp6       0      0 :::80                   :::*                    LISTEN      126/ntfy

2025/01/17 19:41:33 INFO Listening on :80[http], ntfy 2.11.0, log level is DEBUG (tag=startup)
2025/01/17 19:41:33 DEBUG Waiting until 2025-01-18 00:00:00 +0000 UTC to reset visitor stats (tag=resetter)
2025/01/17 19:41:33 FATAL listen tcp :80: bind: address already in use (exit_code=1)
listen tcp :80: bind: address already in use

ntfy 2.11.0 (d11b100), runtime go1.22.2, built at 2024-05-13T20:16:12Z

🔮 Additional context
I have tried reinstall the LXC and even with a new VM, but to no avail. Same error. I got a notification 24h ago that worked, but it's been a while since I logged in on the server.

Originally created by @Zolektric on GitHub (Jan 17, 2025). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1259 :lady_beetle: **Describe the bug** I can't serve NTFY. Doesn't matter what port I try, I get the same error: :computer: **Components impacted** Debian 12 LXC on Proxmox :bulb: **Screenshots and/or logs** ``` Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 285/master tcp6 0 0 ::1:25 :::* LISTEN 285/master tcp6 0 0 :::22 :::* LISTEN 1/init tcp6 0 0 :::80 :::* LISTEN 126/ntfy 2025/01/17 19:41:33 INFO Listening on :80[http], ntfy 2.11.0, log level is DEBUG (tag=startup) 2025/01/17 19:41:33 DEBUG Waiting until 2025-01-18 00:00:00 +0000 UTC to reset visitor stats (tag=resetter) 2025/01/17 19:41:33 FATAL listen tcp :80: bind: address already in use (exit_code=1) listen tcp :80: bind: address already in use ntfy 2.11.0 (d11b100), runtime go1.22.2, built at 2024-05-13T20:16:12Z ``` :crystal_ball: **Additional context** I have tried reinstall the LXC and even with a new VM, but to no avail. Same error. I got a notification 24h ago that worked, but it's been a while since I logged in on the server.
gitea-mirror 2026-05-05 04:21:09 -06:00
  • closed this issue
  • added the
    🪲 bug
    label
Author
Owner

@tilpner commented on GitHub (Jan 19, 2025):

Just ran into this, I think the fallback to :80 happens here:

630f2957de/server/config.go (L171)
630f2957de/server/config.go (L13)

If you want to use listen-unix, also set listen-http = "", so that it stops trying to bind to port 80.
If you just want a different port, try listen-http = "127.0.0.1:1234".

<!-- gh-comment-id:2601007871 --> @tilpner commented on GitHub (Jan 19, 2025): Just ran into this, I think the fallback to `:80` happens here: https://github.com/binwiederhier/ntfy/blob/630f2957deb670dcacfe0a338091d7561f176b9c/server/config.go#L171 https://github.com/binwiederhier/ntfy/blob/630f2957deb670dcacfe0a338091d7561f176b9c/server/config.go#L13 If you want to use `listen-unix`, also set `listen-http = ""`, so that it stops trying to bind to port 80. If you just want a different port, try `listen-http = "127.0.0.1:1234"`.
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: github-starred/ntfy#889
No description provided.