Skip to content

"nikola serve": Better error message when the port is already in use. #3824

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

Open
1 of 3 tasks
arunpersaud opened this issue Mar 2, 2025 · 1 comment
Open
1 of 3 tasks

Comments

@arunpersaud
Copy link
Contributor

arunpersaud commented Mar 2, 2025

Requested Feature: (short description)

A better error message when the port is already in use, for example, when you start a second nikola serve instance.

Related Area: (eg. tasks, compilers, configuration, templates…)

command line interface

Do you want to contribute this yourself as a pull request? (don’t worry about it if you don’t want to/can’t — someone else can take care of it)

  • Yes, I have already written code for it (link if available and feasible)
  • Yes, I don’t have code ready yet (that’s okay!)
  • No (that’s okay too!)

Does this feature affect backwards compatibility? If yes, in what way?

No

Rationale and full description: (why should it be added to Nikola?)

Tell the user what the problem is and how to solve it (-p option). Alternatively nikola could also just try to find an open port (e.g. try 8001, 8002, etc)

@felixfontein
Copy link
Contributor

Alternatively nikola could also just try to find an open port (e.g. try 8001, 8002, etc)

I would avoid automatically picking something (except when the user explicitly tells Nikola to do that). Opening unexpected ports is often not a good idea.

(But improving the error message is definitely a good idea!)

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