12

I would expect questions about "ports already being in use" to be professional networking questions that would be better asked on Server Fault. However when I search for such questions here, I find a large number of them with extremely high vote score. Clearly the community has historically accepted (and even encouraged) such questions.

Before embarking on a crusade to rid Stack Overflow of this scourge and direct users to Server Fault, I wanted to check my assumptions. What criteria should be used for determining how on-topic such a question is?

  • A few of these questions are asking about code they have written that gives an "port already in use" error. Of all these questions, these are most likely to on-topic, or not?
  • Some of the questions are about encountering this problem when running development servers, maybe those are on-topic because they are about "tools for programmers?"
  • Are they all on-topic because this is a general issue that programmers encounter?

Some top Stack Overflow "port already in use" questions with approximate vote score

On Server Fault

SF has many related questions to which we could refer people, but in general the breadth and quality of such questions on SF pales in comparison to SO.

10
  • 10
    The existence of questions on the site, especially historical ones, is never a good indicator that a question type is on topic. The first question you linked was asked in 2008; long before Server Fault even existed. The second question has been closed and reopened several times and got 4 flags when it went to review; it's now protected to stop deletion but that doesn't make it on topic.
    – Thom A
    Mar 4, 2022 at 10:51
  • 7
    Effectively, if you are asking a question, base the "on-topicness" on the rules of the site at the time you are posting the question, not what they were when a similar question was posted ~10+ years ago. Even then, some questions will slip through the cracks and then gain too much attention (read up votes) later on for them to be closed/deleted.
    – Thom A
    Mar 4, 2022 at 10:57
  • 5
    The fact that visitors have upvoted a question simply means that a lot of drive-by visitors had the same problem. Probably many of these should be closed as duplicates of a decent canonical which explains how to troubleshoot the problem, and ideally what causes these symptoms. I don't think we can avoid having developers bump into this, as several of these scenarios are common among developers and basically nonexistent in other communities; but we definitely should not feel obliged to tolerate new questions about the same old problem.
    – tripleee
    Mar 4, 2022 at 10:58
  • 1
    Should that canonical answer even be on SO or would it be best on SF and have everything on SO link there? Mar 4, 2022 at 11:00
  • 3
    (To slightly expand on how developers run into this, you test your server, and fail to release the port, then try to test again. Several of your examples are obviously purely about running a web server.)
    – tripleee
    Mar 4, 2022 at 11:00
  • 5
    Note that questions regarding tools used for programming are also ontopic, not only programming questions. Some of these tools question could also be asking about ports (debugger for example). Mar 4, 2022 at 11:57
  • 1
    @Trilarion I'm not sure that debuggers frequently have this issue, but web servers meant to be used only in development (like the ones with NodeJS or Django) seem to generate plenty of these questions (and interest in them.) Is there a difference about questions asked about port usage of these servers that are not meant for production use and questions about port usage of Apache, Tomcat, and Nginx which all have production usage, but for which it might be more common to run into this type of problem when using them in a development environment. Mar 4, 2022 at 13:19
  • 3
    If it's a programming problem, it is probably on-topic. It really does not need to be much more difficult than that. There is unfortunately a grey area when it comes to tools that are unique to the programming experience (I.E. IDE's and the like). Are ALL questions about such tools on-topic... or still only programming problems? If you ask two people, you probably get three different answers.
    – Gimby
    Mar 4, 2022 at 14:46
  • Just: why close very-upvoted question that, even if they are closed, will be used by people and never be deleted ?
    – Elikill58
    Mar 5, 2022 at 13:07
  • 3
    @Elikill58 Because they are off-topic. Upvotes don't change that. Mar 5, 2022 at 13:14

2 Answers 2

31

Such questions are definitely on-topic if they are about dealing with the issue programmatically.
For example, Python: Binding Socket: "Address already in use" is about various strategies for a program to automatically deal with the issue.

Such question are not generally on-topic since the problem can be – and often is – encountered outside of programming.
For example, How do I kill the process currently using a port on localhost in Windows? is about manually recovering from the issue and would be the same for a non-programming context.

9
  • Are you saying that questions that don't meet that criteria are off-topic, or are you expecting other answers to further explore that? Mar 4, 2022 at 11:11
  • @StephenOstermiller I was answering the main 'Are "port already in use" questions ever about programming?' and giving a criteria for on-topic'ness – now expanded to one for off-topic'ness. I'm hesitant to say that "questions that don't meet that criteria are off-topic" since that negation is inherently subjective. I'm not expecting anything specific from other answers, but if you do I recommend to add that to the meta question itself. Mar 4, 2022 at 11:32
  • Do you have thoughts about development servers being "tools for programmers" when developers encounter this issue? Mar 4, 2022 at 11:37
  • 2
    @StephenOstermiller I think the answer's second point already covers that: if the problem would be the same in a non-programming context it is not on-topic. If one thinks development servers are "tools for programmers", then whether the issue appears the same when running a production server instead of a development server is relevant; just "development server" does not automatically make a question on- or off-topic. Mar 4, 2022 at 11:51
  • 2
    @StephenOstermiller while a "server" may be used by programmers, the completely fails the last bullet in the on-topic guidance ("a practical, answerable problem that is unique to software development"). So no, just because it is about a development server doesn't make it on-topic. Mar 4, 2022 at 12:20
  • @psubsee2003 Are some questions about dev servers in this area on topic? For example a question about how to configure a specific server that is only a dev server to use a different port. As opposed to a question about how to check what else on the OS is using that port. Mar 4, 2022 at 13:24
  • 3
    it's still not about programming, it's about configuring a server. Just because it is a dev server doesn't change the fact that it is a server admin function. Now if someone is asking how to do it programmatically, that is different. Then it is a programming question, not a sysadmin function Mar 4, 2022 at 14:12
  • For example, How do I kill the process currently using a port on localhost in Windows? is about manually recovering from the error What error?
    – TheMaster
    Mar 4, 2022 at 22:59
  • @TheMaster "port already in use". I have switched it to a more generic wording now. Mar 5, 2022 at 8:51
-25

Opening a port is done by a program using a library, so every question about why a port isn't opening fits the bill for Stack Overflow.

Another thing is, when you ask about the actual hardware wiring or a connector, which are clearly about hardware. Those are clearly off-topic.

To enter my opinion:

People ask on Stack Overflow, because they hope that in that many people someone has encountered the same problem as they have.

That is in principle a good thing.

In most cases, I would guess, when someone tries to communicate with a device over a serial port, it is to use that data and process it, which is programming independent what tool you use.

You surely should ask persons who developed that tool or library.

Another case is TCP/IP and you try to access some service like, say, MySQL. That is analogue to the the serial connection. To use the tool or library for processing, you need to establish a connection.

The definition for what is on-topic is fuzzy for a good cause and surely not every port question may be the best place for it, but you surely find someone who can point you in a comment in the right direction.

18
  • 2
    In other words, you think all of these questions are on-topic, even when the error comes from off-the-shelf software that you are not programming yourself? Mar 4, 2022 at 13:15
  • 12
    Microsoft Word is a program which presumably uses many libraries. Questions about programs are not necessarily questions about programming.
    – kaya3
    Mar 4, 2022 at 13:45
  • 1
    word doesn't open a port serial or other wise, so why should it give the error that the port is open, Also Word is a program so it is software and that is *clearly on topic in SO
    – nbk
    Mar 4, 2022 at 14:35
  • 16
    @nbk Eh no, exactly the opposite. Questions about generic computing and software are a specifically listed off-topic reason.
    – Gimby
    Mar 4, 2022 at 14:40
  • @StephenOstermiller when you open a port lets say in software fischertechnik Interfaces, tjuis is clear a problem with a program where you can add coands to communucate with he device, you could have a problem with Siens S5 and try to connect via libnodavem sthis is still a programm probolem. so as long you can't define where the basic error comes from, it stays in dubio pro reo that you can ask here and if you are not sure
    – nbk
    Mar 4, 2022 at 14:40
  • 1
    no @Gimby it is on topic, so long you don't have a conclusive groud other wise
    – nbk
    Mar 4, 2022 at 14:41
  • 2
    Troubleshooting a random piece of software is off-topic for this site. Looking at what is on-topic shows that it has to be about a programming solution you are working on or software tools related to software development. stackoverflow.com/help/on-topic Topic #6 specifically calls out customer support type questions as being off-topic, which is what an "off-the-shelf app having networking issues" question would be. Mar 4, 2022 at 17:43
  • 3
    I feel like this conflates why people ask on SO with whether people should ask on SO. Yes, asking on SO will to connect you to many people who can help you and someone is likely to actually do so. No, that does not make these questions on-topic. Just because there is a program in my coffee machine and many programmers are adept at debugging coffee machines does not make a coffee machine question suitable for SO. Mar 4, 2022 at 17:44
  • @computercarguy a colsed port can have many cuases and as long as it is even remotely touches programming or tools, it is on topic like when mysql workbench can't access themysql server. there are hundrets of equal valid questions, so at thebginning such questions are not off topic and that was teh question here. There are always bad examples, but you find them for every topic
    – nbk
    Mar 4, 2022 at 18:09
  • 4
    @nbk, if it's related to programming, like MySQL Workbench like you mention, then yes, it can be on-topic, but a problem with banking app not being able to connect to your bank isn't a programming problem. A problem with your gaming app not connecting to a server isn't on-topic. A game you are writing not connecting to a server is, though. So no, not all connectivity issues are on-topic for this stack. Mar 4, 2022 at 20:16
  • 1
    For most people it seems hard to grasp, there are only few topics that are off topic here, most aren'ta nd as i already said we find under all topics off topic questions, there are no exception, still an open port should be in most cases on topic
    – nbk
    Mar 4, 2022 at 20:34
  • 1
    Untangled, 1: "@StephenOstermiller: When you open a port, let’s say in software Fischertechnik interfaces, this is clearly a problem with a program where you can add commands to communicate with the device. You could have a problem with SIMATIC S5 and try to connect via libnodavem. This is still a program problem. So as long you can’t define where the basic error comes from, it stays in dubio pro reo that you can ask here and if you are not sure." Mar 4, 2022 at 22:56
  • 1
    Untangled, 2: "@computercarguy: A closed port can have many causes and as long as it is even remotely touches programming or tools, it is on-topic like when MySQL Workbench can't access the MySQL server. There are hundreds of equal valid questions, so at the beginning such questions are not off-topic and that was the question here. There are always bad examples, but you find them for every topic." Mar 4, 2022 at 22:57
  • 1
    Untangled, 3: "For most people, it seems hard to grasp. There are only few topics that are off-topic here. Most aren’t, and, as I already said, we find under all topics off-topic questions. There aren’t any exception, and still an open port should be in most cases on-topic." Mar 4, 2022 at 22:57
  • 7
    "For most people it seems hard to grasp, there are only few topics that are off topic here" So is cooking on topic now? Physics? Quantum physics? Psicology? Economy? Musicology? Music theory? Do I have to continue? No. Most topics are off topic here, only a slight sliver of one topic is good here: practical questions about software engineering.
    – Braiam
    Mar 6, 2022 at 0:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .