Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port already in use #1259

Open
Zolektric opened this issue Jan 17, 2025 · 1 comment
Open

Port already in use #1259

Zolektric opened this issue Jan 17, 2025 · 1 comment
Labels
🪲 bug Something isn't working

Comments

@Zolektric
Copy link

🐞 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.

@Zolektric Zolektric added the 🪲 bug Something isn't working label Jan 17, 2025
@tilpner
Copy link

tilpner commented Jan 19, 2025

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

ListenHTTP: DefaultListenHTTP,

DefaultListenHTTP = ":80"

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants