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

Log when listening #350

Merged
merged 2 commits into from
Dec 20, 2021
Merged

Conversation

liclac
Copy link
Contributor

@liclac liclac commented Dec 19, 2021

I got a bit confused when trying to start gotosocial server, because it was failing to bind to :80, when I was asking it to bind to :8080. Turns out that's the let's encrypt port!

Since this will fail when running as non-root (without CAP_NET_ADMIN, at least), or if something like nginx is already hogging that port, we should probably make the error a bit more obvious, and add some logging for good measure.

(Maybe it's just me, but I like it when software tells me when it's opening ports and stuff.)

Running `gotosocial server` with the default configuration will try to
bind to :80 and listen for letsencrypt challenges, which will fail if
running as non-root (w/o capabilities), or if eg. nginx hogs the port.

When that happens, this should make it more obvious what's wrong.
Always nice not to have to guess. Also feels more consistent than just
doing it for the letsencrypt endpoint.
@liclac liclac force-pushed the log-when-listening branch from 42a58fc to 36a6b24 Compare December 19, 2021 17:54
@tsmethurst tsmethurst merged commit 86e8e7f into superseriousbusiness:main Dec 20, 2021
@liclac liclac deleted the log-when-listening branch December 20, 2021 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants