So, I could go to the services pane in the control panel, and just click the stop link, but sometimes it's a little bit more mysterious than that, and so here's how you can close down the process from within the task manager. Now again, if you already know which service it is, and how to shut it down, you really should do it that way. Now going back to my command window, I was looking for process ID 9072, so I've sorted by the process ID, and I'll scroll all the way down, and I'll look for that process, and sure enough, it's httpd.exe, and that's the Apache HTTP server. The location of the PID column may differ, it may not be in this position on your computer, so if you don't see it, just expand the window until you see everything. Then up here, click on the details tab, and you'll see a table that shows all of your processes, and there will be a PID column. When the task manager first opens up on Windows 10, it might look like this, but you'll want to click the more details link, to open up the entire screen. To find this issue, I'll right click on the taskbar, and choose the task manager. So, on my system, this is on process ID 9072, it will be different on yours. After this string I'll add another pipe character, and then once again a find command, and this time I'll look for :80, and now I only see the service that's listening on that one port. To stop the netstat command, press Control + C, and I'll show you one other trick to filter this a little more because on some computers you'll get dozens of services. Notice the numeric value in the last column, that's called the process ID, and you can use that value to find the application that you're looking for, and you can use that value to find and shut down the process, if you need to do it that way. The row at the top is listening on port 80. I'll type netstat -a -o | find "LISTENING", and I see a list of all applications that are listening on all ports. Now, you can do this either in a command window, or in PowerShell. To do this, I'll go into a command window, I'll press Command + R, and type CMD, and then click okay or press enter. Now, if you already know where the conflict is, you can fix it just by closing down the other service, but sometimes it's a mystery, and I'm going to show you a trick that lets you find out what's listening on a particular port. And that's because the instance of Apache that's bundled with WampServer wasn't able to start up. I'll wait a few moments, but then I'll find that only two of the three services are running. I've also installed WampServer, and I'll go to the WampServer administration menu and try to start all services. I've installed Apache as a service, and you can see here that it's running because you see the stop and restart links appear. I'll show you how to recognize and then how to resolve a port conflict on Microsoft Windows, and I'll do this with Apache. If more than one tries to run at the same time, you get a port conflict. You can run multiple HTTP servers, but each needs to listen on a unique port. As I've previously described, you can only have one server application listening on a particular port at a time.
0 Comments
Leave a Reply. |