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

The default port (5000) of lektor server conflicts with the macOS AirPlay Receiver feature #1160

Open
hatarist opened this issue Aug 27, 2023 · 1 comment

Comments

@hatarist
Copy link

I'm using macOS Ventura 13.5.1.

Apparently, if the System Preferences --> Sharing --> AirPlay Receiver option is enabled, macOS binds to *:5000 and *:7000 ports which makes lektor server not usable (it didn't even throw any errors, tried that on both the latest stable version and the latest one from the repository). It may also confuse the user since when you open http://127.0.0.1:5000, you may just get either HTTP 404 or HTTP 403 returned by the macOS' service.

$ lsof -i -n -P | grep 5000
ControlCe 27563 igor    7u  IPv4 0xf25f46a15c01b495      0t0  TCP *:5000 (LISTEN)
ControlCe 27563 igor    8u  IPv6 0xf25f46a629cb3ecd      0t0  TCP *:5000 (LISTEN)

Of course, this could be solved several ways - by either disabling AirPlay Receiver or running Lektor with a custom port argument like lektor server --port 5525 --browse, but maybe consider changing the default port to something less common? I recall Flask's default port is also 5000.

@dairiki
Copy link
Contributor

dairiki commented Aug 27, 2023

I recall Flask's default port is also 5000.

Yes. I think Lektor just inherited Flask's default.

Really, though, it's a local port. Any choice, especially if it's not "pseudo-random" (and therefore hard to remember) is going to conflict with something, somewhere.

It would probably be worth adding a note to the documentation — I'm not sure where, but maybe under Quickstart — about the possibility/likelihood of port conflicts and how to cope with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants