Открытый порт позволяет принимать подключения на свой компьютер через IP-адрес нашего VPN. Например, чтобы запустить на компьютере игровой или веб-сервер, а другие смогли к нему подключиться через интернет.
Подготовительный этап:
- Для начала вам необходимо подключиться к нашему VPN. Для этого воспользуйтесь платной подпиской или получите тестовый код на один день.
- Скачайте и установите приложения для подключения. Например, для Windows или macOS.
- Подключитесь к желаемому серверу VPN и проверьте, изменился ли ваш IP-адрес. Если подключение прошло успешно и IP-адрес изменился, переходим к основному этапу.
Основной этап:
- Откройте панель http://10.117.0.1 и авторизуйтесь в ней своим кодом, который вы вводили в приложении для подключения к VPN.
- Перейдите во вкладку Port forwarding.
- Впишите необходимый порт в поле port и нажмите кнопку Add/replace.
- Порты добавляются по одному. Если порт не занят другим пользователем, он успешно откроется для вас, и правило добавится в таблицу ниже. Открытость порта следует проверять с другого компьютера, не подключенного к нашему VPN.
Если порт уже занят другим пользователем, вы увидите ошибку This port is already used by another user. В этом случае выберите другой порт либо другой сервер. Возможно, требуемый вам порт будет еще свободен там.
В случае проблем с открытием порта перепроверьте себя по этой инструкции в картинках.
Обратите внимание. На общих с другими пользователями IP-адресах, которые доступны всем по умолчанию на VPN-серверах, можно открыть порты только номером выше 1000.
На выделенных личных IP-адресах можно открыть любой порт, включая порты номером ниже 1000. Услуга аренды таких адресов доступна всем нашим клиентам с подписками сроком от полугода. Для запроса стоимости и подключения напишите нам.
Написать в службу поддержки
Полезные ссылки
- Приложение для Windows
- Приложение для macOS
- Приложение для Android
- Приложение для iOS
- Приложение для Linux
- Настройка на роутере
Открытый порт позволяет принимать подключения на свой компьютер через IP-адрес нашего VPN. Например, чтобы запустить на компьютере игровой или веб-сервер, а другие смогли к нему подключиться через интернет.
Подготовительный этап:
- Для начала вам необходимо подключиться к нашему VPN. Для этого воспользуйтесь платной подпиской или получите тестовый код на один день.
- Скачайте и установите приложения для подключения. Например, для Windows или macOS.
- Подключитесь к желаемому серверу VPN и проверьте, изменился ли ваш IP-адрес. Если подключение прошло успешно и IP-адрес изменился, переходим к основному этапу.
Основной этап:
- Откройте панель http://10.117.0.1 и авторизуйтесь в ней своим кодом, который вы вводили в приложении для подключения к VPN.
- Перейдите во вкладку Port forwarding.
- Впишите необходимый порт в поле port и нажмите кнопку Add/replace.
- Порты добавляются по одному. Если порт не занят другим пользователем, он успешно откроется для вас, и правило добавится в таблицу ниже. Открытость порта следует проверять с другого компьютера, не подключенного к нашему VPN.
Если порт уже занят другим пользователем, вы увидите ошибку This port is already used by another user. В этом случае выберите другой порт либо другой сервер. Возможно, требуемый вам порт будет еще свободен там.
В случае проблем с открытием порта перепроверьте себя по этой инструкции в картинках.
Обратите внимание. На общих с другими пользователями IP-адресах, которые доступны всем по умолчанию на VPN-серверах, можно открыть порты только номером выше 1000.
На выделенных личных IP-адресах можно открыть любой порт, включая порты номером ниже 1000. Услуга аренды таких адресов доступна всем нашим клиентам с подписками сроком от полугода. Для запроса стоимости и подключения напишите нам.
Написать в службу поддержки
Полезные ссылки
- Приложение для Windows
- Приложение для macOS
- Приложение для Android
- Приложение для iOS
- Приложение для Linux
- Настройка на роутере
We know a random port number is assigned to a web application in Visual Studio. It works fine in my office desktop. But when I pull the code onto my laptop (from VisualStudio.com) and run the web app. I got a message, saying,
The specified port is in use
Port 10360 is already being used by another application.
Recommendations
- Try switching to port other than 10360 and higher than 1024.
- Stop the application that is using port 10360.
I can fix it using Recommendation #1
by changing the port into something else like 13333. But I am very curious what happened to port 10360. How can I check what application is using port 10360? How can I stop that application?
asked Mar 22, 2014 at 3:00
1
I had a similar issue running Visual Studio 2019 on Windows 10.
Some solutions that worked for others seemed to include:
- Changing the application port number.
- Have Visual studio automatically assign a port number each time the application start.
- Restart Visual Studio
- Restart the computer.
Unfortunately, none of these solutions worked for me, assigning another port number did work but was not an acceptable solution as it was important for my application to run on a specified port.
The Solution
First I ran the command:
netsh http add iplisten ipaddress=::
from an elevated command-line process. This solved the initial error, when attempting to run the application I no longer got the «port in use» error, instead, I now got an error stating the application was unable to bind to the port because administrative privileges were required. (although I was running Visual Studio as administrator)
The second error was caused by Hyper-V that adds ports to the Port Exclusion Range, the port my application uses was in one of these exclusion ranges.
You can view these ports by running the following command: netsh interface ipv4 show excludedportrange protocol=tcp
To solve this second error:
- Disable Hyper-V: Control Panel-> Programs and Features-> Turn Windows features on or off. Untick Hyper-V
- Restart the computer.
- Add the port you are using to the port exclusion range:
netsh int ipv4 add excludedportrange protocol=tcp startport=50403 numberofports=1 store=persistent
- Reenable Hyper-V
- Restart the computer
From here everything worked perfectly.
answered Jan 6, 2020 at 10:59
Philip TrenwithPhilip Trenwith
3,6212 gold badges10 silver badges10 bronze badges
12
i solve the problem this way…
File -> Open -> Web Site…
After that select Local IIS under IIS Express Site
remove the unwanted project.
hope this help.
answered Nov 20, 2014 at 7:21
yeanyean
1,27712 silver badges8 bronze badges
5
- change it in solution (right Click) -> property -> web tab
- Click Create Virtual Directory (in front of project Url textbox)
answered Oct 6, 2015 at 10:45
ImanIman
17.4k6 gold badges78 silver badges89 bronze badges
2
SIMPLE SOLUTION THAT WORKED FOR ME: (Credits to combination of other’s answers)
**My System Info:**
Windows 10 build : 1809
IIS Version : 10.0.17763.1
Hyper-V : Enabled
Docker : Installed - 2.3.0.2 (45183)
-
Check for blocked ports range in CMD (admin)
>> netsh interface ipv4 show excludedportrange protocol=tcp (Sample output): Protocol tcp Port Exclusion Ranges Start Port End Port ---------- -------- 49696 49795 (SEE HERE, 49796 to 49895 is not blocked) 49896 49995 ... list goes on ...
-
Open Visual Studio and Navigate to > Project > Properties > Web > Servers > Project Url
-
Use the Port that is not blocked.
(Sample port): http://localhost:49796/
-
Restart Visual Studio (if required)
-
Have a coffee and share love. (required)
answered Jul 25, 2020 at 9:42
Naveen Kumar VNaveen Kumar V
2,4011 gold badge27 silver badges43 bronze badges
2
I had the same problem, but no proccess appeared neither in netstat nor in resmon.
What solved the problem for me was closing all the open browser windows.
answered May 31, 2015 at 20:09
ClangonClangon
1,3882 gold badges17 silver badges24 bronze badges
5
You’re looking for netstat
.
Open an administrative command shell and run
netstat -aob
And look for port 10360. It’ll show you what executable opened the port and what PID to look up in Task Manager. (Actually, run netstat -?
in an unprivileged shell first, because I don’t approve of blindly running anything you don’t understand, especially in a privileged context.)
Here’s what the switches do:
-a
shows all connections or open ports, not just active ones — the port you want is probably listening, not active.
-o
shows the owning PID of the connection or port, so you can find the process in Task Manager’s Processes tab. (You might need to add the PID column in Task Manager. View->Select Columns)
-b
shows the binary involved in opening the connection or port. This is the one that requires elevated access.
answered Mar 22, 2014 at 3:21
4
The cause of this issue in my own case is a bit different. Everything was working fine until I started docker to do some other stuff. Starting docker, in one way or the other, added some new ranges of ports to the Port Exclusion Ranges. What to do:
- Open command prompt (As an administrator)
- run: netsh interface ipv4 show excludedportrange protocol=tcp (You should see the port your application is using in the excluded port ranges)
- run: net stop winnat
- run: netsh interface ipv4 show excludedportrange protocol=tcp (by this time, the Administered port exclusions ranges should reduce)
- run net start winnat.
If the problem was caused by Windows NAT Driver (winnat), then you should be good by now.
answered Aug 27, 2021 at 8:52
abibtjabibtj
1611 silver badge3 bronze badges
2
- Close the VS
- Start again — right click and run as admin
- Run your project again.
answered May 12, 2016 at 5:00
MansiMansi
1311 silver badge2 bronze badges
5
Running visual studio in administrative mode solved my issue
answered Nov 17, 2017 at 8:05
Mujtaba ZaidiMujtaba Zaidi
5991 gold badge5 silver badges13 bronze badges
- Delete the .sln file, if you have one.
- Open the file C:UsersNNDocumentsIISExpressconfigapplicationhost.config
- Locate the problematic site in configuration/system.applicationHost/sites and delete the whole site section.
- «Open Web Site..» from Visual Studio and the project will be given a random new port.
answered Dec 16, 2015 at 10:35
1
For me the «The specified port is in use» error is usually fixed (well actually worked arround) by stopping the «Internet Connection Sharing (ICS)» (SharedAccess) and the «World Wide Web Publishing Service» (W3SVC) service.
After the project / ISS Express is started the stopped services can be started again without issues.
Whenever i receive the error the port (in the 50000 range) is definitely not in use (checked with netstat & tcpview).
It would be nice if Microsoft did some integration testing of Visual Studio / IIS Express along side with HyperV and the «normal» IIS Service OR gave some guidance on which port ranges to use for VS / IIS Express (and which ports to avoid).
answered Apr 25, 2019 at 19:08
MichelMichel
711 silver badge2 bronze badges
3
Visual studio 2015
- Close all the files you have open inside Visual studio.
- Then close application and exit Visual Studio.
- Open Visual Studio and it should successfully run.
I hope this helps.
answered Jul 30, 2017 at 7:57
5
netstat didn’t show anything already using the port
netstat -ano | findstr <your port number>
showed nothing for me. I found out that port was excluded using this command to see what ranges are reserved by something else:
netsh interface ipv4 show excludedportrange protocol=tcp
You can try to unblock the range from the start port for a number of ports (need Command Prompt with Administrator):
netsh int ip delete excludedportrange protocol=tcp numberofports=<number of ports> startport=<start port>
However, in my case I couldn’t unblock the range, I just got «Access is denied», so I ended up having to pick another port for my site.
My original solution: The only thing that worked was deleting the .vs folder in the solution folder. (I’ve since found you can just delete the .vs/config/applicationhost.config instead to avoid losing so many settings).
answered May 1, 2019 at 15:16
3
If netstat doesn’t show anything, try a reboot.
For me, nothing appeared in netstat for my port. I tried closing Google Chrome browser windows as @Clangon and @J.T. Taylor suggested, but to no avail.
In the end a system reboot worked, however, so I can only assume that something else was secretly holding the port open. Or perhaps it just took longer than I was prepared to wait for the ports to be released after Chrome shut down.
answered Mar 24, 2016 at 11:14
Paul StephensonPaul Stephenson
66.4k9 gold badges49 silver badges51 bronze badges
1
For me, close all application and restart the computer.
When window start, Open Visual studio first, then open browser and click run(F5).
Now it works. I don’t know why.
answered Dec 26, 2016 at 14:31
OammieROammieR
2,8005 gold badges30 silver badges51 bronze badges
Open Task Manager and Just Close all processes of ‘IIS Express System Tray’ and ‘IIS Express Worker Process’ and Re-run the Project
answered May 8, 2018 at 13:17
SumairIrshadSumairIrshad
1,6531 gold badge13 silver badges11 bronze badges
For me, the Google Chrome browser was the process which was using the port. Even after I closed Chrome, I found that the process still persisted (I allow Chrome to «run in background» so that I can receive desktop notifications). I went into Task Manager, and killed the Chrome browser process, and then started my web application, it worked like a charm.
answered Sep 11, 2015 at 19:07
J.T. TaylorJ.T. Taylor
4,0971 gold badge22 silver badges23 bronze badges
Open your csproj with for example Notepad ++ and scroll down to DevelopmentServerPort. Change it to something else as long as it’s above 1024 like rekommended (so for example 22312). Also change the IISUrl to http://localhost:22312/. Save your changes and restart the project.
answered Sep 5, 2018 at 8:37
K.OleksiakK.Oleksiak
3151 gold badge2 silver badges15 bronze badges
In my case there was no application using specified port and elevated running of Visual Studio didn’t help either.
What worked for me is to reinstall IIS Express and than restart computer.
answered Feb 19, 2019 at 8:28
MirhatMirhat
3312 gold badges7 silver badges19 bronze badges
1
You need to configre this parameter by running the following in the administrative command prompt:
netsh http add iplisten ipaddress=::
answered Feb 18, 2020 at 6:46
click on the notification present on bottom of the task bar if you receiving the error like port in use then select the iiss icon right click then click on exit ,it work like charm for me
answered Sep 13, 2017 at 13:37
I had same error showing up. I had my web service set as an application in IIS and I fixed it by:
Right-click on my WebService project inside my solution > Properties > Web > Under ‘Servers’ change from IIS Express to Local IIS (it will automatically create a Virtual Directory which is what you want)
answered Oct 9, 2017 at 11:05
Cristian GCristian G
3811 gold badge3 silver badges22 bronze badges
When Port xxxx is already being used, there’s always a PID (Process Id) elaborated with the error. Simply go to the task manager on the machine you are running the application, click on details, and you will identify what the other application is. You can then decide whether you want to end that process or not
answered Oct 16, 2017 at 14:59
Ken.FukiziKen.Fukizi
1871 silver badge9 bronze badges
Just to add to this, I had the full IIS feature turned on for one of my machines and it seemed to cause this to happen intermittently.
I also got random complaints about needing Admin rights to bind sites after a while, I assume that somehow it was looking at the full IIS config (Which does require admin as it’s not a per-user file).
If you are stuck and nothing else is helping (and you don’t want to just choose another port) then check you have removed this if it is present.
answered Mar 16, 2019 at 11:05
Dan HarrisDan Harris
1,3261 gold badge21 silver badges43 bronze badges
FWIW, I tried tons of these options and I didn’t get anywhere. Then I realized I had installed VMWare Player just before the issue started. I uninstalled it, and this error went away.
I’m sure there’s some way to make them coexist, but I don’t really need Player so I just removed it. If you’ve tried all kinds of stuff and it’s not working consider looking through any programs you’ve installed recently (especially those that deal with network adapters?) and see if that gets you anywhere.
answered Jun 21, 2019 at 17:53
trademarktrademark
5354 silver badges20 bronze badges
In Visual Studio 2017, select Project/Properties and then select the Web option. In the IIS section next to the default project URL click Create Virtual Directory. This solved the problem for me. I think in my case the default project Virtual Directory had been corrupted in some way following a debugging session.
answered Mar 12, 2020 at 12:59
For me only thing worked is removing the element containing my application name, path and binding info under
</system.applicationHost> element in
applicationhost file.
To be found under C:UsersyourUsernameDocumentsIISExpressconfig
Closed the the solution , deleted the bad site element , save the applicationhost file and close.
Reopen the application/Website from Visual studio using Admin rights — Rebuilt and Run. Voila… A new port is auto assigned to your application which solves the purpose.
Can also be verified without running— check the Properties window for the solution and URL will have new port number.
answered Aug 20, 2020 at 12:21
In my case I got also this issue from my ASP Core 3.1 projets.
I thing that for some reason visual studio ignore the IP/Port setting in the project property and start it on 5000 and 5001. I discovered this while attempting to start my Core 3.1 projects from prompt using dotnet run
And this post helped me
How to specify the port an ASP.NET Core application is hosted on?
It suggest to
- Specify the port in the appsettings.json or maybe appsettings.development.json. (see lower)
- Close Visual Studio
- Delete /.vs, /bin, /obj folders
- Restart Visual Studio.
appsettings.json / appsettings.development.json content
{
/***************************
"Urls": "http://localhost:49438", <==== HERE
/***************************/
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"connectionStrings": { ... }
}
answered Dec 1, 2020 at 20:25
HugoHugo
1,9972 gold badges26 silver badges33 bronze badges
Вопрос:
Перезапуск сервера Django отображает следующую ошибку:
this port is already running....
Эта проблема возникает именно в Ubuntu, а не в других операционных системах. Как я могу освободить порт для перезагрузки сервера?
Лучший ответ:
Более простое решение просто введите sudo fuser -k 8000/tcp
.
Это должно убить все процессы, связанные с портом 8000.
EDIT:
Для пользователей osx вы можете использовать sudo lsof -t -i tcp:8000 | xargs kill -9
Ответ №1
netstat -ntlp
Он покажет что-то вроде этого.
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 6599/python
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN -
tcp 0 0 192.168.124.1:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp6 0 0 :::3306 :::* LISTEN
Теперь просто закройте порт, в котором запущен Django/python, убив связанный с ним процесс.
kill -9 PID
в моем случае
kill -9 6599
Теперь запустите приложение Django.
Ответ №2
ps aux | grep -i manage
after that you will see all process
ubuntu@ip-10-154-22-113:~/django-apps/projectname$ ps aux | grep -i manage
ubuntu 3439 0.0 2.3 40228 14064 pts/0 T 06:47 0:00 python manage.py runserver project name
ubuntu 3440 1.4 9.7 200996 59324 pts/0 Tl 06:47 2:52 /usr/bin/python manage.py runserver project name
ubuntu 4581 0.0 0.1 7988 892 pts/0 S+ 10:02 0:00 grep --color=auto -i manage
kill -9 process id
e.d kill -9 3440
`enter code here`after that :
python manage.py runserver project name
Ответ №3
Мы не используем эту команду {sudo lsof -t -i tcp: 8000 | xargs kill -9} Потому что он закрывает все вкладки… Вы должны использовать
ps -ef | grep python
kill -9 process_id
ps -ef | grep python (показать весь процесс с id)
kill -9 11633
(11633 – это идентификатор процесса для: -/bin/python manage.py runningerver)
Ответ №4
Это расширение на ответ Мунира. Я добавил bash script, который охватывает это для вас. Просто запустите ./scripts/runserver.sh
вместо ./manage.py runserver
, и он будет работать точно так же.
#!/bin/bash
pid=$(ps aux | grep "./manage.py runserver" | grep -v grep | head -1 | xargs | cut -f2 -d" ")
if [[ -n "$pid" ]]; then
kill $pid
fi
fuser -k 8000/tcp
./manage.py runserver
Ответ №5
По умолчанию команда runserver запускает сервер разработки с внутреннего IP-адреса на порту 8000.
Если вы хотите изменить порт сервера, передайте его в качестве аргумента командной строки. Например, эта команда запускает сервер на порту 8080:
python manage.py runserver 8080
Ответ №6
ps aux | grep manage
ubuntu 3438 127.0.0 2.3 40256 14064 pts/0 T 06:47 0:00 python manage.py runningerver
kill -9 3438
Ответ №7
Кажется, что IDE, VSCode, Puppeteer, nodemon, express и т.д. Вызывают эту проблему, вы запустили процесс в фоновом режиме или просто закрыли область отладки [браузер, терминал и т.д.] Или что-то еще, во всяком случае, я ответил на тот же вопрос раньше, вот ты это ссылка
qaru.site/questions/2443349/…
Ответ №8
Для меня это происходит потому, что мой запрос API в Postman перехватывается точкой останова отладчика в моем приложении… оставляя запрос зависшим. Если я отменю запрос в Postman перед тем, как убить сервер приложений, ошибка не возникнет.
→ Так что попробуйте отменить любые открытые запросы, которые вы делаете в других программах.
В macOS я использовал sudo lsof -t -i tcp:8000 | xargs kill -9
sudo lsof -t -i tcp:8000 | xargs kill -9
когда я забываю отменить открытый запрос http для решения error = That port is already in use.
Это также завершает закрытие моего приложения Почтальон, поэтому мое первое решение лучше.
1. Spring Boot startup failure
Every Spring Boot exception on start is registered and handled by one of the FailureAnalyzers responsible for wrapping errors and providing human-readable message about what went wrong.
For example when you are trying to run Spring Boot on port that is already in use you should see something similar to the following message (that cames from LoggingFailureAnalysisReporter):
2019-06-09 09:58:19.113 ERROR 10289 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured.
Action:
Verify the connector's configuration, identify and stop any process that's listening on port 8080, or configure this application to listen on another port.
2. Application failed to start — port 8080 already taken
When you see an error like: ‘The Tomcat connector configured to listen on port 8080 failed to start’, that means another application or service is running on port 8080, and your current instance cannot be started on the same port.
There are a couple of things you can do about this:
- change port for starting instance,
- stop other service running on port 8080.
2.1. Changing the starting port for Spring Boot instance
If you don’t want to stop the other service running on port 8080, because it is used for different systems, you can change starting port for your Spring Boot by setting server.port
parameter in the Spring Boot configuration file.
2.2. Stop service running on port 8080
-
if you have knowledge about the service running on port 8080 simply stop it and run your Spring Boot application,
-
if you don’t know what service is blocking your 8080 port try following commands:
On ubuntu use lsof
command to find out what is running on a specific port:
sudo lsof -i :8080
The output should look like this:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
docker-pr 4573 root 4u IPv6 39218 0t0 TCP *:http-alt (LISTEN)
You can now stop this service by sending -9
signal to this process id (PID) .
sudo kill -9 4573
After unblocking 8080 port, Spring Boot should start without a failure:
. ____ _ __ _ _
/ / ___'_ __ _ _(_)_ __ __ _
( ( )___ | '_ | '_| | '_ / _` |
/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |___, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: v2.1.5.RELEASE
2013-07-31 00:08:16.117 INFO 56603 --- [ main] o.s.b.s.app.SampleApplication : Starting SampleApplication v0.1.0 on mycomputer with PID 56603 (/apps/myapp.jar started by pwebb)
2013-07-31 00:08:16.166 INFO 56603 --- [ main] ationConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6e5a8246: startup date [Wed Jul 31 00:08:16 PDT 2013]; root of context hierarchy
2014-03-04 13:09:54.912 INFO 41370 --- [ main] .t.TomcatServletWebServerFactory : Server initialized with port: 8080
2014-03-04 13:09:56.501 INFO 41370 --- [ main] o.s.b.s.app.SampleApplication : Started SampleApplication in 2.992 seconds (JVM running for 3.658)
I enabled both 80 and 443.
sudo certbot certonly --standalone --agree-tos --no-eff-email --staple-ocsp --preferred-challenges http -m **@**.com -d mycomp.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for mycomp.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Could not bind TCP port 80 because it is already in use by another process on
this system (such as a web server). Please stop the program in question and then
try again.
Let’s Debug shows
ANotWorking
ERROR
mycomp.com has an A (IPv4) record (*.***.***.***) but a request to this address over port 80 did not succeed. Your web server must have at least one working IPv4 or IPv6 address.
I do not understand what is wrong with port 80.
How to fix this?
asked May 11, 2022 at 9:34
As the error says, port 80 «is already in use by another process on
this system (such as a web server)». You have told certbot to run standalone rather than co-operating with the existing webserver, which it would use if you’d asked.
Either change certbot --standalone
or stop the webserver you’ve got running.
answered May 11, 2022 at 9:43
roaimaroaima
98.5k14 gold badges125 silver badges238 bronze badges
If you’re running certbot --standalone
then certbot will try and stand up a temporary webserver on port 80 to do the validation. However it’s not able to do this since you already have a site running on that port. Depending on what you are using to host your site there are other workarounds but it’s hard to know without more details.
answered Nov 27, 2022 at 10:46
ArdenArden
11 bronze badge
1
For what it’s worth, I just succeeded on a windows 2012 R2 server.
At first, I had a failures, and after I stopped the, webserver it worked
Though it wasn’t obvious in the certbot instructions, it made sense, as the running webserver was claiming port 80, which is the one certbot is attempting to use while creating certificates for your domains.
Have a nice weekend, Ole
answered Jan 20 at 14:13
5
The other day I decided to install EasyPHP (a WAMP package that includes PHP, Apache, MySQL) on my machine running Windows 7. After install I ran the application, but to my surprise, Apache server was not working. It complained that Port 80 is used by another application. I thought this issue would be easily solved, but it took me a while to figure out what exactly is causing the problem. In this article I will show you what I tried and how I finally solved the Apache problem of not being able to run.
The error message that the EasyPHP gave was this:
Apache port (80) is already used by another application ! Close this application and try to run again the server. To close this application : open <easyphp folder>/binaries/tools/cports/cports.exe, find the line with the port already used in the column “Local Port”, right click and choose “Kill processes of Selected Ports”.
I tried to start server manually but that gave me the following error:
An attempt was made to access a socket in a way forbidden by its access permissions.
make_sock: could not bind to address 127.0.0.1:80
no listening sockets available, shutting down
I could of course just change the port, but I really wanted to find out what is causing this problem.
EasyPHP error message suggested to locate cports.exe to find the culprit, but I decided to first check the Programs and Features in control panel to see if I can figure out why the Apache server cannot listen to default port 80.
Using Programs and Features to look for application causing the issue
Looking at the list of installed programs I quickly found one such application that might be causing this issue. It was IIS Express 8 which was installed long time ago and I have totally forgotten about it. So solution seemed simple. Uninstall IIS Express 8 and the issue will go away, but to my surprise, that still didn’t solve the problem at all. Starting Apache failed again with the same port 80 is busy problem. So I decided to take advice from that EasyPHP error message about using cports.exe.
Running CurrPorts (cports.exe) as the error message suggested
CurrPorts is a little utility that lists all currently opened TCP/IP and UDP ports and the processes that opened those ports. If you also have EasyPHP installed, you should already have this utility. On my machine running Windows 7 64-bit I located cports.exe at:
C:Program Files (x86)EasyPHP-DevServer-14.1VC11binariestoolscports
When I ran the cports.exe I got a list processes listening to different ports and there was one listening to port 80, but unfortunately for me, there was no useful information about which process is doing this as shown below:
Click image to enlarge
For Process Name it showed System while Process ID showed 4. Even the option Kill Processes Of Selected Ports was grayed out.
Since currPorts was not giving me the information needed I decided to try my luck with commands in command prompt.
Using netstat command from Command Prompt
The one I tried first was netstat
, a command showing network activity.
Looking at the available parameters, using those listed below seemed worth a try
- -a : Displays all connections and listening ports.
- -n : Displays addresses and port numbers in numerical form.
- -o : Displays the owning process ID associated with each connection.
- -b : Displays the executable involved in creating each connection or listening port. (Requires administrator permission)
Due to –b parameter, I had to run cmd as an administrator as shown below:
Then I typed:
netstat –anob | more
About Pipe (|) and more command: Pipe redirects the output of the netstat
to the next command (in our case more
) which is a pager that displays a content one screen a time. Press space bar to scroll to the next page.
Looking for :80 under Local Address column I had this:
Local Address: | 0.0.0.0:80 |
---|---|
Foreign Address: | 0.0.0.0 |
State: | Listening |
PID: | 4 |
and below all these, there was a message “Can not obtain ownership information”.
PID stands for Process ID with PID 4 being a System Process where most system processes originate from. I tried to use Process Hacker utility to look for any information that would point me to what is causing this problem but I didn’t find any.
So I decided to try another command net stop which is discussed next.
Using net stop command from command prompt
Command net stop <service>
stops a running service. If that service has other services that depend on it, it will output a list of these services and prompts you for confirmation. This seemed like a great way to check what services depend on http service, so I typed the following line:
net stop http
The goal here was not to stop http service, so I didn’t confirm when prompted for confirmation. Instead, I just wanted to get the list of services that use it. The list I received is shown below:
By individually stopping each service in the generated list (by using services.msc), I wanted to find out if any of these services are responsible for taking away port 80. When particular service was stopped and had no effect on Apache, I chose the next service in the list.
After stopping all the services in the list I was still getting the error, so I went back to the web looking for possible causes and what caught my attention was http.sys process which is discussed next.
Quick guide on how to stop and disable the service
- Open the Start Menu, search for services.msc in the search box and run it. The new window will show up with a list of all the services.
- To stop a service, find the one you are looking for, right-click on it and select Stop. To make sure, the service stops even after computer restart, disable the service all together.
- To disable the service, right-click on that service, choose Properties and under General Tab for option Startup type, select Disabled in dropdown menu and click OK. Before disabling the service, you might want to find out first what role the service has, just to make sure you don’t really need it.
Finding out processes that use http.sys
Http.sys is a driver that enables multiple processes to listen to HTTP traffic on the same port. But examining this driver in Task Manager and also on Process Hacker revealed no useful information relating to ports.
And then I stumbled upon HttpSysManager tool. This looked like a very promising little utility that might reveal what is blocking Apache to listen on the default port. I ran the application, selected Acls tag and found some prefixes with port 80 on it as shown below:
Two of them were for SQL Reports. I quickly checked the list of services and found SQL Server Reporting Services (SSRS). After I stopped it Apache was able to run without error.
There was still one thing to check up. I wondered if this SQL Reporting service was the only culprit or will any of the stopped services from the net stop http
list still cause problems. By restarting all those services the Apache was unable to run once again. In the end it turned out that besides SQL Server Reporting Service I also had to disable World Wide Web Publishing Service (W3SVC). After those two were disabled, port 80 was finally available for Apache.
Conclusion
If Apache won’t start on port 80, we can either set it to listen to another port, or we can try to locate the application or service and stop them if they are not needed. With the help of CMD commands and various utilities this can be an easy task, but if the Process listening to port 80 is System Process with PID 4, then it takes a little more effort.
I hope you found the information here useful. If so, consider dropping a comment or share the post on social networks.
Окунись в чувственную атмосферу
Открой
Твоя скидка 10% по промокоду: VIVAZZI
Новосибирск
11 февраля 2023
sacral.club
Эта ошибка означает, что порт занят. Бывает, когда, например, в pycharm пытаешься перезапустить проект и терминал выдаёт Error: That port is already in use
. Чтобы освободить порт 8000, помогает в консоли его сброс:
sudo fuser -k 8000/tcp
Если точнее, эта команда убивает все процессы, связанные с указанным портом.
Оцените статью
4.4 из 5 (всего 7 оценок)
После нажатия кнопки «Отправить» ваше сообщение будет доставлено мне на почту.
Артём Мальцев
Веб-разработчик, владеющий знаниями языка программирования Python, фреймворка Django, системы управления содержимым сайта Django CMS, платформы для создания интернет-магазина Django Shop и многих различных приложений, использующих эти технологии.
Права на использование материала, расположенного на этой странице https://vivazzi.pro/ru/it/port-is-already-in-use/:
Разрешается копировать материал с указанием её автора и ссылки на оригинал без использования параметра rel="nofollow"
в теге <a>
. Использование:
Автор статьи: Артём Мальцев
Ссылка на статью: <a href="https://vivazzi.pro/ru/it/port-is-already-in-use/">https://vivazzi.pro/ru/it/port-is-already-in-use/</a>
Больше: Правила использования сайта
Представляю вашему вниманию книгу, написанную моим близким другом Максимом Макуриным: Секреты эффективного управления ассортиментом.
Книга предназначается для широкого круга читателей и, по мнению автора, будет полезна специалистам отдела закупок и логистики, категорийным и финансовым менеджерам, менеджерам по продажам, аналитикам, руководителям и директорам, в компетенции которых принятие решений по управлению ассортиментом.
Troubleshooting
Problem
IBM Host On-Demand Redirector does not work because the port specified is already in use by another application.
Symptom
When you specify local IBM Host On-Demand Redirector ports, you must make sure that the port is not in use by another application. The default for a redirector port starts at 12173 and increments after a port is configured.
Cause
On Japanese systems, Norton AntiVirus uses port 12174. As a result, the IBM Host On-Demand Redirector does not work on the port already in use.
Resolving The Problem
If the Redirector does not work on a specific port, you can investigate the state of the port:
- Enter the following command: netstat -an
- If this message appears, you cannot use port 12174 for the Redirector: TCP 0.0.0.0:12174 0.0.0.0:0 LISTENING
- Select a different port number to be used for the Redirector.
[{«Product»:{«code»:»SSS9FA»,»label»:»IBM Host On-Demand»},»Business Unit»:{«code»:»BU058″,»label»:»IBM Infrastructure w/TPS»},»Component»:»General»,»Platform»:[{«code»:»PF002″,»label»:»AIX»},{«code»:»PF010″,»label»:»HP-UX»},{«code»:»PF016″,»label»:»Linux»},{«code»:»PF020″,»label»:»NetWare»},{«code»:»PF025″,»label»:»Platform Independent»},{«code»:»PF012″,»label»:»IBM i»},{«code»:»PF027″,»label»:»Solaris»},{«code»:»PF033″,»label»:»Windows»},{«code»:»PF035″,»label»:»z/OS»}],»Version»:»10.0;11.0″,»Edition»:»»,»Line of Business»:{«code»:»LOB35″,»label»:»Mainframe SW»}}]
Содержание
- The port 1337 is already used by another application #3762
- Comments
- solution
- An error occurred this port is already used by another user
- Answered by:
- Question
- Answers
- All replies
- Ошибка сервера Django: порт уже используется
- What Can I Do If the Port 27017 Is Already in Use When We Start Up the EAP Controller?
- An error occurred this port is already used by another user
- Replied by Doug S on topic Port is already used error
- Replied by David Rankin on topic Port is already used error
- Replied by Jose Corazon on topic Port is already used error
- Replied by Duccio on topic Port is already used error
- Replied by Jasem Mutlaq on topic Port is already used error
- Replied by Pete Ingram on topic Port is already used error
- Replied by Hy Murveit on topic Port is already used error
- Replied by AstroNerd on topic Port is already used error
- Replied by Pete Ingram on topic Port is already used error
- Replied by alacant on topic Port is already used error
The port 1337 is already used by another application #3762
Describe the bug
The port 1337 is already used by another application.
Steps to reproduce the behavior
- Create a project
- npm run develop
Expected behavior
Use a port that’s not use.
Maybe in a first step we could just change the default port.
Additional context
Editable in Projectconfigenvironmentsdevelopmentserver.json
The text was updated successfully, but these errors were encountered:
You could either try to kill the opened port : sudo lsof -t -i:1337 or sudo kill $(lsof -ti:1337)
or you could start the project with a different port: npm run develop — -p 5000
Or you can close the terminal and open it again
sudo fuser -k 1337/tcp
you could start the project with a different port: npm run develop — -p 5000
@yassinebridi — Hi. I was curious if you have read somewhere that npm run develop — -p 5000 , should work?
This part of the docs, https://strapi.io/documentation/3.0.0-beta.x/guides/deployment.html#configuration, explains how to set-up Strapi on a different port (in case of conflicts or other reasons).
I am marking this issue as closed as it is not a bug with Strapi itself but the users environment.
You are welcome to change the port used by strapi in the config path you found, this is also documented in the link that @davidkartuzinski gave.
Also in the future please be sure to completely fill out the bug report including the section templated as this:
This worked out for me.
Before error (windows 10)
solution
Under:
my-projectconfigenvironmentsdevelopment
I change the port to 5000 — and the problem solved 🙂
NPM example: cd to my app folder and run
In my case (Windows 10 + wsl2) is the «RzSDKService» using the 1337 port
- Check if port 1337 used
Run «Command Prompt» as admin netstat -ab - Check which PID is using port 1337
Run «Command Prompt» as admin netstat -ano | findstr :1337 - Find the process using the PID found from the last step, in «Task Manager»‘s «Detail» tab by matching the PID
In my case is the «RzSDKService» - Kill the PID (Strapi works after killing the PID and freeing up the port)
Run «Command Prompt» as admin taskkill /PID
/F
In my case, the «RzSDKService» is inessential
Источник
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
I have two servers which were supposed to be identical but one is giving an error:
Windows Server 2016 Standard.
This is happening on several port in the same range.
Security / System Center Configuration Manager Current Branch / SQL
Answers
It would be helpful if you could provide some background information.
It is a PXE enabled DP with WDS installed in an SCCM environment, is it right?
It looks like a port issue. The PXE-enabled distribution point and the client in Windows PE select dynamically allocated high ports for TFTP transfers. These ports are defined by Microsoft between 49152 and 65535. For more information, see Service overview and network port requirements for Windows and Trivial FTP (TFTP) Daemon.
Check firewall if you enable above ports.
Hope my answer could help you and look forward to your feedback.
Best Regards,
Ray
Please remembers to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
It would be helpful if you could provide some background information.
It is a PXE enabled DP with WDS installed in an SCCM environment, is it right?
It looks like a port issue. The PXE-enabled distribution point and the client in Windows PE select dynamically allocated high ports for TFTP transfers. These ports are defined by Microsoft between 49152 and 65535. For more information, see Service overview and network port requirements for Windows and Trivial FTP (TFTP) Daemon.
Check firewall if you enable above ports.
Hope my answer could help you and look forward to your feedback.
Best Regards,
Ray
Please remembers to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
strange it started to work before we find a cause.
Security / System Center Configuration Manager Current Branch / SQL
Glad to hear it works again.
However, based on the error message, the high ports used for TFTP are disabled or occupied which causes this issue. If it occurs next time, we could start our troubleshooting in this direction.
Best Regards,
Ray
Please remembers to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
I will keep this in mind
Security / System Center Configuration Manager Current Branch / SQL
Hello I have a similar error
Error creating the UDP endpoint for provider «WDSTFTP» on interface «169.254.33.162:54669». Such errors may occur if the network interface has been disabled or modified, or if the port is already in use by another application. The provider cannot receive requests on this interface.
Error information: 0x2741
This is SCCM Server with WDS Installed
We did an upgrade of the SCCM server and this error appeared and hasnt dissapeared
There is no interface on the Server with this Private IP Address
There is no DHCP service running on teh same server, which i read can be the reason for this specific error.
Does anyone know why it might be reporting this interface that doesnt exist
The error was not there before
OSD Deployment is working ok after the upgrade.
Источник
Ошибка сервера Django: порт уже используется
Перезапуск сервера Django отображает следующую ошибку:
Эта проблема возникает именно в Ubuntu, а не в других операционных системах. Как я могу освободить порт для перезагрузки сервера?
Более простое решение просто введите sudo fuser -k 8000/tcp .
Это должно убить все процессы, связанные с портом 8000.
Для пользователей osx вы можете использовать sudo lsof -t -i tcp:8000 | xargs kill -9
Он покажет что-то вроде этого.
Теперь просто закройте порт, в котором запущен Django/python, убив связанный с ним процесс.
Теперь запустите приложение Django.
Мы не используем эту команду Потому что он закрывает все вкладки… Вы должны использовать
ps -ef | grep python (показать весь процесс с id)
kill -9 11633
(11633 – это идентификатор процесса для: -/bin/python manage.py runningerver)
Это расширение на ответ Мунира. Я добавил bash script, который охватывает это для вас. Просто запустите ./scripts/runserver.sh вместо ./manage.py runserver , и он будет работать точно так же.
По умолчанию команда runserver запускает сервер разработки с внутреннего IP-адреса на порту 8000.
Если вы хотите изменить порт сервера, передайте его в качестве аргумента командной строки. Например, эта команда запускает сервер на порту 8080:
ps aux | grep manage
ubuntu 3438 127.0.0 2.3 40256 14064 pts/0 T 06:47 0:00 python manage.py runningerver
Кажется, что IDE, VSCode, Puppeteer, nodemon, express и т.д. Вызывают эту проблему, вы запустили процесс в фоновом режиме или просто закрыли область отладки [браузер, терминал и т.д.] Или что-то еще, во всяком случае, я ответил на тот же вопрос раньше, вот ты это ссылка
Для меня это происходит потому, что мой запрос API в Postman перехватывается точкой останова отладчика в моем приложении… оставляя запрос зависшим. Если я отменю запрос в Postman перед тем, как убить сервер приложений, ошибка не возникнет.
→ Так что попробуйте отменить любые открытые запросы, которые вы делаете в других программах.
В macOS я использовал sudo lsof -t -i tcp:8000 | xargs kill -9 sudo lsof -t -i tcp:8000 | xargs kill -9 когда я забываю отменить открытый запрос http для решения error = That port is already in use. Это также завершает закрытие моего приложения Почтальон, поэтому мое первое решение лучше.
Источник
What Can I Do If the Port 27017 Is Already in Use When We Start Up the EAP Controller?
Note: Port 27217 of Mongo DB server is for the EAP controller 3.0.0 or later and port 27017 is used before EAP Controller 3.0.0.
When we start up the EAP Controller, we may get the error report “port 27017 is already in use” as shown in the picture below:
The port 27017 is used for mongoDB server, an important module for EAP Controller. If the port 27017 is already occupied by some other applications or processes, the monogoDB cannot be initialed, and thus it will lead to the failure of the EAP Controller.
Generally, to solve this problem, we just need to find out the process that is using this port and stop this process. Please note that, before you do that, make sure this process is not important for you and can be stopped, or you may need use another host to run the EAP Controller.
Here are the steps to instruct you find out the process that occupy the specific port and then kill it on the Windows 7 operation system.
Step 1. Find the PID of the process that the port is using
Open the Command Line of the Windows operation system, and type the command netstat –ano |findstr “27017” as shown below:
Find the process whose status is LISTENING, and the 2700 is the PID of the process. Please note that different environment may have different result.
Step 2. Find the process’s name
Type the command tasklist |findstr “2700” as shown in the picture below. The 2700 is the PID that you found in the last step.
Here the result is mongod.exe, and this is in my test environment, you may get a different result.
Step 3. Kill the Process
Type the command taskkill /im mongod.exe /f as shown below.
Note: this command may require administrator operation permission. If so, please run the Command Line as an administrator.
After the process that occupy the port 27017 is killed successfully, it’s recommended to check it again with the command netstat –ano |findstr “27017”, after that, we can run the EAP Controller again.
Был ли этот FAQ полезен?
Ваш отзыв поможет нам улучшить работу сайта.
Что вам не понравилось в этой статье?
- Недоволен продуктом
- Слишком сложно
- Неверный заголовок
- Не относится к моей проблеме
- Слишком туманное объяснение
- Другое
Как мы можем это улучшить?
Спасибо
Спасибо за обращение
Нажмите здесь, чтобы связаться с технической поддержкой TP-Link.
Подписаться на рассылку Мы с ответственностью относимся к вашим персональным данным. Полный текст положения об обработке персональных данных доступен здесь. С нашими условиями использования и программой улучшения пользовательского опыта можно ознакомиться здесь.
Источник
An error occurred this port is already used by another user
My Eqod mount just started doing this out of the blue. Had connected without issue before.
2020-07-26T21:58:12: [WARNING] Port /dev/ttyACM0 is already used by another driver or process.
2020-07-26T21:58:09: [INFO] Trying connecting to /dev/ttyACM0 @ 9600 .
2020-07-26T21:58:08: [WARNING] Port /dev/ttyUSB0 is already used by another driver or process.
2020-07-26T21:58:05: [INFO] Trying connecting to /dev/ttyUSB0 @ 9600 .
2020-07-26T21:58:04: [WARNING] Communication with /dev/ttyUSB1 @ 9600 failed. Starting Auto Search.
2020-07-26T21:58:04: [ERROR] Failed to connect to port (/dev/ttyUSB1). Error: Port failure Error: No such file or directory. Check if device is connected to this port.
2020-07-26T21:58:04: [INFO] Auto search is enabled. When connecting, the driver shall attempt to communicate with all available system ports until a connection is established.
If I just unplug it, plug it back in, then restart Ekos — it works. Any idea what causes this?
Please Log in or Create an account to join the conversation.
- Posts: 390
- Thank you received: 116
Replied by Doug S on topic Port is already used error
Please Log in or Create an account to join the conversation.
- Posts: 111
- Thank you received: 6
Replied by David Rankin on topic Port is already used error
Thanks, found the article on this.
Please Log in or Create an account to join the conversation.
- Posts: 1118
- Thank you received: 182
Replied by Jose Corazon on topic Port is already used error
Please Log in or Create an account to join the conversation.
- Posts: 13
- Thank you received: 0
Replied by Duccio on topic Port is already used error
Please Log in or Create an account to join the conversation.
Replied by Jasem Mutlaq on topic Port is already used error
Please Log in or Create an account to join the conversation.
- Posts: 18
- Thank you received: 1
Replied by Pete Ingram on topic Port is already used error
@Jasem, I regret to say that am still seeing the same error » [WARNING] Port /dev/ttyUSB0 is already used by another driver or process.» I am running astroberry 2.03 downloaded from the .img file. I have gone through this process indilib.org/get-indi/download-rpi.html Additionally I have done sudo apt dist-upgrade, sudo apt update, several reboots, I have removed modemmanager and gpsd. I am running this on a Pi4 / 8GB and have connected my Losmandy G11 Gemini-1 to both USB2 and USB3 ports. I have gone through power off of the Gemini and the Pi, disconnections of both. I have made sure that only the Gemini (and the USB 3.0 boot SSD) are connected to the Pi.
I do not know what to do next. I know this should work and I know that you know it works. What next please?
Please Log in or Create an account to join the conversation.
- Posts: 928
- Thank you received: 432
Replied by Hy Murveit on topic Port is already used error
In case you didn’t see it, I’m expanding on something said above.
It may be that your problem is the following: Linux randomly assigns serial USB devices to the ports /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2, . That is, the first device it chooses will get ttyUSB0 and the 2nd device ttyUSB1 and so on, but how it decides what is first is unpredictable. There’s a fancy scheme referred to above to help with with this, but understanding this is important. So, what I’d do if I were you is unplug all serial devices, reboot and only plug-in the one you want. I’ll bet you find that it connects now to /dev/ttyUSB0. You can then connect the next device, and I’ll bet it connects to /dev/ttyUSB1, and so on. Alternatively, you can keep things as is, and change /dev/ttyUSB0 to /dev/ttyUSB1 on the indi control panel connections tab for the device that’s not connecting and try to re-connect to it. Bottom line, this may not be a KStars/Ekos problem, but rather a linux one. Here’s the recommended work-around for that Linux issue: indilib.org/support/tutorials/157-persis. al-port-mapping.html
Please Log in or Create an account to join the conversation.
- Posts: 1067
- Thank you received: 137
Replied by AstroNerd on topic Port is already used error
Please Log in or Create an account to join the conversation.
- Posts: 18
- Thank you received: 1
Replied by Pete Ingram on topic Port is already used error
Thanks for your reply. Much appreciated. I did all you suggest many times. The Gemini (mount) never connects. I have tried it on its own with nothing else connected. ls -l /dev/tty* then shows no port suffixed by USB. Plugging my mount into either a Pi USB 2 or USB 3 port immediately generated a ttyUSB0 port. It never connects to KStars. The error message is always the same » [WARNING] Port /dev/ttyUSB0 is already used by another driver or process.»
In all honesty, I would not have written had I not been totally stuck. Finally, plugging my mount’s USB cable into a Windows 10 laptop it immediately connects to Stellarium either via Stellarium native or using the ASCOM driver.
This is very puzzling.
Please Log in or Create an account to join the conversation.
- Posts: 881
- Thank you received: 87
Replied by alacant on topic Port is already used error
Rather, I think it was introduced by the latest INDI, Previously, all devices connected without issue.
My workaround is currently to plug in the usb cables one at a time -the mount must be the first connected- and hit connect for each device on the indi control panel. This is the only reliable way I can connect our eq6. Not elegant, but may help rescue a session.
If the devs need anything testing or if we could revert this section of the code to the stable version immediately before 3.5.3, please don’t hesitate to ask.
Cheers and clear skies,
Steve
Please Log in or Create an account to join the conversation.
Источник
I want to run MAMP on my Windows 8.1 pc, but when I start the servers, it says:
'APACHE' needs open port '80' which is already being used by another
service or application. Please reconfigure 'APACHE' to use free port.
Changing the port to something else doesn’t help.
asked May 23, 2015 at 16:46
1
when you have this problem just turn off Skype because Skype use port 80
answered Apr 14, 2016 at 16:45
1
I used kampageddon’s answer and it worked. Just follow the following steps:
- Run MAMP
- Click Preferences
- On Preference window click Ports
- While on Ports change Apache & Nginx Port to 8080.
- click ok
- Start Servers.
answered Feb 24, 2017 at 16:23
Start windows command line and then run
netstat -aon | findstr :80
You will see line with process that is using port 80
answered May 23, 2015 at 17:11
1
You can change MAMP ports in Preferences -> ports, like a screenshot below
answered Jan 20, 2017 at 17:15
kampageddonkampageddon
1,40915 silver badges13 bronze badges
Hey On Windows 10 I Ran into the same issue.. I found a way that is a guarantee fix… Go into controlpanel -> system security -> windows firewall -> on the left pane there is advanced settings.. click that. -> then add new inbound rule (on the left pane click inbound… then new rule on the right pane.) -> then follow the wizard as program and select mamp from C:/MAMP I believe. Then you are Golden!! Hope this helps all those out there with the new windows 10.
Hypertextie
answered Jul 29, 2015 at 21:06
Evolve DigitalEvolve Digital
1301 gold badge1 silver badge9 bronze badges
If you arrived here because you just installed MAMP on a Windows OS (7~10), then Microsoft IIS is the most likely culprit hanging on to port 80.
You can confirm that with the CLI netstat advice by Sergio below and should you find via netstat that a listening service has a process id that maps to NT Kernal & System (ntoskrnl.exe -> cross check via details tab in task manager) then the culprit is IIS.
To Turn off IIS;
Start menu -> Control Panel -> Programs & Features -> Turn Windows Features On or Off -> De-select ‘Internet Information Services’.
If you know why IIS is running then you will likely know the application that specifically needs it and you can turn back on when need (take note of the selection chain when turning off) — otherwise it’s unlikely you need IIS on.
answered Aug 23, 2017 at 12:41
ericTbearericTbear
1531 silver badge11 bronze badges
I had the same problem with recent windows update. Closing skype did the trick.
answered Mar 2, 2019 at 3:18
Click Start > Settings > Ethernet >Network and Internet > Windows Firewall.
In the left pane, click Advanced Settings.
Find Local Port 80 with Protocol TCP. in my case is «World Wide Web Services (HTTP Traffic-In)»
check which program use this port 80
also you can know ip with port by running CMD as admin and write this line
netstat -aon | findstr «80»
and kill it by code:
taskill /F /PID 14276
14276 is the program code which use port 80
or
end task form services in task manager
restart Mamp again
enjoy!!!
answered Sep 9, 2021 at 13:07
IN CASE YOU ALREADY TURNED SKYPE OFF AND THE ERROR STILL APPEARS, just try stopping the server and closing MAMP, then go to MAMPdbmysql and delete the following files:
mysql-bin.index
ib_logfile0
ib_logfile1 files
The MySQL Server should now connect succesfully with the port 80!
answered Sep 3, 2019 at 22:26
Thru some web searches, I discovered that other windows services are know to be using Port 80.
In Windows Search (via Windows Start), type ‘services’, stop one of these services below en test again till it works. Do not forget to restart it later !
- SQL Server Reporting Services
- Web Deployment Agent Service
- BranchCache
- Sync Share Service
- World Wide Web Publishing Service
- Internet Information Server
answered Aug 24, 2016 at 8:00
Открытый порт позволяет принимать подключения на свой компьютер через IP-адрес нашего VPN. Например, чтобы запустить на компьютере игровой или веб-сервер, а другие смогли к нему подключиться через интернет.
Подготовительный этап:
- Для начала вам необходимо подключиться к нашему VPN. Для этого воспользуйтесь платной подпиской или получите тестовый код на один день.
- Скачайте и установите приложения для подключения. Например, для Windows или macOS.
- Подключитесь к желаемому серверу VPN и проверьте, изменился ли ваш IP-адрес. Если подключение прошло успешно и IP-адрес изменился, переходим к основному этапу.
Основной этап:
- Откройте панель http://10.117.0.1 и авторизуйтесь в ней своим кодом, который вы вводили в приложении для подключения к VPN.
- Перейдите во вкладку Port forwarding.
- Впишите необходимый порт в поле port и нажмите кнопку Add/replace.
- Порты добавляются по одному. Если порт не занят другим пользователем, он успешно откроется для вас, и правило добавится в таблицу ниже. Открытость порта следует проверять с другого компьютера, не подключенного к нашему VPN.
Если порт уже занят другим пользователем, вы увидите ошибку This port is already used by another user. В этом случае выберите другой порт либо другой сервер. Возможно, требуемый вам порт будет еще свободен там.
В случае проблем с открытием порта перепроверьте себя по этой инструкции в картинках.
Обратите внимание. На общих с другими пользователями IP-адресах, которые доступны всем по умолчанию на VPN-серверах, можно открыть порты только номером выше 1000.
На выделенных личных IP-адресах можно открыть любой порт, включая порты номером ниже 1000. Услуга аренды таких адресов доступна всем нашим клиентам с подписками сроком от полугода. Для запроса стоимости и подключения напишите нам.
Написать в службу поддержки
Полезные ссылки
- Приложение для Windows
- Приложение для macOS
- Приложение для Android
- Приложение для iOS
- Приложение для Linux
- Настройка на роутере
We know a random port number is assigned to a web application in Visual Studio. It works fine in my office desktop. But when I pull the code onto my laptop (from VisualStudio.com) and run the web app. I got a message, saying,
The specified port is in use
Port 10360 is already being used by another application.
Recommendations
- Try switching to port other than 10360 and higher than 1024.
- Stop the application that is using port 10360.
I can fix it using Recommendation #1
by changing the port into something else like 13333. But I am very curious what happened to port 10360. How can I check what application is using port 10360? How can I stop that application?
asked Mar 22, 2014 at 3:00
1
I had a similar issue running Visual Studio 2019 on Windows 10.
Some solutions that worked for others seemed to include:
- Changing the application port number.
- Have Visual studio automatically assign a port number each time the application start.
- Restart Visual Studio
- Restart the computer.
Unfortunately, none of these solutions worked for me, assigning another port number did work but was not an acceptable solution as it was important for my application to run on a specified port.
The Solution
First I ran the command:
netsh http add iplisten ipaddress=::
from an elevated command-line process. This solved the initial error, when attempting to run the application I no longer got the «port in use» error, instead, I now got an error stating the application was unable to bind to the port because administrative privileges were required. (although I was running Visual Studio as administrator)
The second error was caused by Hyper-V that adds ports to the Port Exclusion Range, the port my application uses was in one of these exclusion ranges.
You can view these ports by running the following command: netsh interface ipv4 show excludedportrange protocol=tcp
To solve this second error:
- Disable Hyper-V: Control Panel-> Programs and Features-> Turn Windows features on or off. Untick Hyper-V
- Restart the computer.
- Add the port you are using to the port exclusion range:
netsh int ipv4 add excludedportrange protocol=tcp startport=50403 numberofports=1 store=persistent
- Reenable Hyper-V
- Restart the computer
From here everything worked perfectly.
answered Jan 6, 2020 at 10:59
Philip TrenwithPhilip Trenwith
3,6212 gold badges10 silver badges10 bronze badges
12
i solve the problem this way…
File -> Open -> Web Site…
After that select Local IIS under IIS Express Site
remove the unwanted project.
hope this help.
answered Nov 20, 2014 at 7:21
yeanyean
1,27712 silver badges8 bronze badges
5
- change it in solution (right Click) -> property -> web tab
- Click Create Virtual Directory (in front of project Url textbox)
answered Oct 6, 2015 at 10:45
ImanIman
17.4k6 gold badges78 silver badges89 bronze badges
2
SIMPLE SOLUTION THAT WORKED FOR ME: (Credits to combination of other’s answers)
**My System Info:**
Windows 10 build : 1809
IIS Version : 10.0.17763.1
Hyper-V : Enabled
Docker : Installed - 2.3.0.2 (45183)
-
Check for blocked ports range in CMD (admin)
>> netsh interface ipv4 show excludedportrange protocol=tcp (Sample output): Protocol tcp Port Exclusion Ranges Start Port End Port ---------- -------- 49696 49795 (SEE HERE, 49796 to 49895 is not blocked) 49896 49995 ... list goes on ...
-
Open Visual Studio and Navigate to > Project > Properties > Web > Servers > Project Url
-
Use the Port that is not blocked.
(Sample port): http://localhost:49796/
-
Restart Visual Studio (if required)
-
Have a coffee and share love. (required)
answered Jul 25, 2020 at 9:42
Naveen Kumar VNaveen Kumar V
2,4011 gold badge27 silver badges43 bronze badges
2
I had the same problem, but no proccess appeared neither in netstat nor in resmon.
What solved the problem for me was closing all the open browser windows.
answered May 31, 2015 at 20:09
ClangonClangon
1,3882 gold badges17 silver badges24 bronze badges
5
You’re looking for netstat
.
Open an administrative command shell and run
netstat -aob
And look for port 10360. It’ll show you what executable opened the port and what PID to look up in Task Manager. (Actually, run netstat -?
in an unprivileged shell first, because I don’t approve of blindly running anything you don’t understand, especially in a privileged context.)
Here’s what the switches do:
-a
shows all connections or open ports, not just active ones — the port you want is probably listening, not active.
-o
shows the owning PID of the connection or port, so you can find the process in Task Manager’s Processes tab. (You might need to add the PID column in Task Manager. View->Select Columns)
-b
shows the binary involved in opening the connection or port. This is the one that requires elevated access.
answered Mar 22, 2014 at 3:21
4
The cause of this issue in my own case is a bit different. Everything was working fine until I started docker to do some other stuff. Starting docker, in one way or the other, added some new ranges of ports to the Port Exclusion Ranges. What to do:
- Open command prompt (As an administrator)
- run: netsh interface ipv4 show excludedportrange protocol=tcp (You should see the port your application is using in the excluded port ranges)
- run: net stop winnat
- run: netsh interface ipv4 show excludedportrange protocol=tcp (by this time, the Administered port exclusions ranges should reduce)
- run net start winnat.
If the problem was caused by Windows NAT Driver (winnat), then you should be good by now.
answered Aug 27, 2021 at 8:52
abibtjabibtj
1611 silver badge3 bronze badges
2
- Close the VS
- Start again — right click and run as admin
- Run your project again.
answered May 12, 2016 at 5:00
MansiMansi
1311 silver badge2 bronze badges
5
Running visual studio in administrative mode solved my issue
answered Nov 17, 2017 at 8:05
Mujtaba ZaidiMujtaba Zaidi
5991 gold badge5 silver badges13 bronze badges
- Delete the .sln file, if you have one.
- Open the file C:UsersNNDocumentsIISExpressconfigapplicationhost.config
- Locate the problematic site in configuration/system.applicationHost/sites and delete the whole site section.
- «Open Web Site..» from Visual Studio and the project will be given a random new port.
answered Dec 16, 2015 at 10:35
1
For me the «The specified port is in use» error is usually fixed (well actually worked arround) by stopping the «Internet Connection Sharing (ICS)» (SharedAccess) and the «World Wide Web Publishing Service» (W3SVC) service.
After the project / ISS Express is started the stopped services can be started again without issues.
Whenever i receive the error the port (in the 50000 range) is definitely not in use (checked with netstat & tcpview).
It would be nice if Microsoft did some integration testing of Visual Studio / IIS Express along side with HyperV and the «normal» IIS Service OR gave some guidance on which port ranges to use for VS / IIS Express (and which ports to avoid).
answered Apr 25, 2019 at 19:08
MichelMichel
711 silver badge2 bronze badges
3
Visual studio 2015
- Close all the files you have open inside Visual studio.
- Then close application and exit Visual Studio.
- Open Visual Studio and it should successfully run.
I hope this helps.
answered Jul 30, 2017 at 7:57
5
netstat didn’t show anything already using the port
netstat -ano | findstr <your port number>
showed nothing for me. I found out that port was excluded using this command to see what ranges are reserved by something else:
netsh interface ipv4 show excludedportrange protocol=tcp
You can try to unblock the range from the start port for a number of ports (need Command Prompt with Administrator):
netsh int ip delete excludedportrange protocol=tcp numberofports=<number of ports> startport=<start port>
However, in my case I couldn’t unblock the range, I just got «Access is denied», so I ended up having to pick another port for my site.
My original solution: The only thing that worked was deleting the .vs folder in the solution folder. (I’ve since found you can just delete the .vs/config/applicationhost.config instead to avoid losing so many settings).
answered May 1, 2019 at 15:16
3
If netstat doesn’t show anything, try a reboot.
For me, nothing appeared in netstat for my port. I tried closing Google Chrome browser windows as @Clangon and @J.T. Taylor suggested, but to no avail.
In the end a system reboot worked, however, so I can only assume that something else was secretly holding the port open. Or perhaps it just took longer than I was prepared to wait for the ports to be released after Chrome shut down.
answered Mar 24, 2016 at 11:14
Paul StephensonPaul Stephenson
66.4k9 gold badges49 silver badges51 bronze badges
1
For me, close all application and restart the computer.
When window start, Open Visual studio first, then open browser and click run(F5).
Now it works. I don’t know why.
answered Dec 26, 2016 at 14:31
OammieROammieR
2,8005 gold badges30 silver badges51 bronze badges
Open Task Manager and Just Close all processes of ‘IIS Express System Tray’ and ‘IIS Express Worker Process’ and Re-run the Project
answered May 8, 2018 at 13:17
SumairIrshadSumairIrshad
1,6531 gold badge13 silver badges11 bronze badges
For me, the Google Chrome browser was the process which was using the port. Even after I closed Chrome, I found that the process still persisted (I allow Chrome to «run in background» so that I can receive desktop notifications). I went into Task Manager, and killed the Chrome browser process, and then started my web application, it worked like a charm.
answered Sep 11, 2015 at 19:07
J.T. TaylorJ.T. Taylor
4,0971 gold badge22 silver badges23 bronze badges
Open your csproj with for example Notepad ++ and scroll down to DevelopmentServerPort. Change it to something else as long as it’s above 1024 like rekommended (so for example 22312). Also change the IISUrl to http://localhost:22312/. Save your changes and restart the project.
answered Sep 5, 2018 at 8:37
K.OleksiakK.Oleksiak
3151 gold badge2 silver badges15 bronze badges
In my case there was no application using specified port and elevated running of Visual Studio didn’t help either.
What worked for me is to reinstall IIS Express and than restart computer.
answered Feb 19, 2019 at 8:28
MirhatMirhat
3312 gold badges7 silver badges19 bronze badges
1
You need to configre this parameter by running the following in the administrative command prompt:
netsh http add iplisten ipaddress=::
answered Feb 18, 2020 at 6:46
click on the notification present on bottom of the task bar if you receiving the error like port in use then select the iiss icon right click then click on exit ,it work like charm for me
answered Sep 13, 2017 at 13:37
I had same error showing up. I had my web service set as an application in IIS and I fixed it by:
Right-click on my WebService project inside my solution > Properties > Web > Under ‘Servers’ change from IIS Express to Local IIS (it will automatically create a Virtual Directory which is what you want)
answered Oct 9, 2017 at 11:05
Cristian GCristian G
3811 gold badge3 silver badges22 bronze badges
When Port xxxx is already being used, there’s always a PID (Process Id) elaborated with the error. Simply go to the task manager on the machine you are running the application, click on details, and you will identify what the other application is. You can then decide whether you want to end that process or not
answered Oct 16, 2017 at 14:59
Ken.FukiziKen.Fukizi
1871 silver badge9 bronze badges
Just to add to this, I had the full IIS feature turned on for one of my machines and it seemed to cause this to happen intermittently.
I also got random complaints about needing Admin rights to bind sites after a while, I assume that somehow it was looking at the full IIS config (Which does require admin as it’s not a per-user file).
If you are stuck and nothing else is helping (and you don’t want to just choose another port) then check you have removed this if it is present.
answered Mar 16, 2019 at 11:05
Dan HarrisDan Harris
1,3261 gold badge21 silver badges43 bronze badges
FWIW, I tried tons of these options and I didn’t get anywhere. Then I realized I had installed VMWare Player just before the issue started. I uninstalled it, and this error went away.
I’m sure there’s some way to make them coexist, but I don’t really need Player so I just removed it. If you’ve tried all kinds of stuff and it’s not working consider looking through any programs you’ve installed recently (especially those that deal with network adapters?) and see if that gets you anywhere.
answered Jun 21, 2019 at 17:53
trademarktrademark
5354 silver badges20 bronze badges
In Visual Studio 2017, select Project/Properties and then select the Web option. In the IIS section next to the default project URL click Create Virtual Directory. This solved the problem for me. I think in my case the default project Virtual Directory had been corrupted in some way following a debugging session.
answered Mar 12, 2020 at 12:59
For me only thing worked is removing the element containing my application name, path and binding info under
</system.applicationHost> element in
applicationhost file.
To be found under C:UsersyourUsernameDocumentsIISExpressconfig
Closed the the solution , deleted the bad site element , save the applicationhost file and close.
Reopen the application/Website from Visual studio using Admin rights — Rebuilt and Run. Voila… A new port is auto assigned to your application which solves the purpose.
Can also be verified without running— check the Properties window for the solution and URL will have new port number.
answered Aug 20, 2020 at 12:21
In my case I got also this issue from my ASP Core 3.1 projets.
I thing that for some reason visual studio ignore the IP/Port setting in the project property and start it on 5000 and 5001. I discovered this while attempting to start my Core 3.1 projects from prompt using dotnet run
And this post helped me
How to specify the port an ASP.NET Core application is hosted on?
It suggest to
- Specify the port in the appsettings.json or maybe appsettings.development.json. (see lower)
- Close Visual Studio
- Delete /.vs, /bin, /obj folders
- Restart Visual Studio.
appsettings.json / appsettings.development.json content
{
/***************************
"Urls": "http://localhost:49438", <==== HERE
/***************************/
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"connectionStrings": { ... }
}
answered Dec 1, 2020 at 20:25
HugoHugo
1,9972 gold badges26 silver badges33 bronze badges
Вопрос:
Перезапуск сервера Django отображает следующую ошибку:
this port is already running....
Эта проблема возникает именно в Ubuntu, а не в других операционных системах. Как я могу освободить порт для перезагрузки сервера?
Лучший ответ:
Более простое решение просто введите sudo fuser -k 8000/tcp
.
Это должно убить все процессы, связанные с портом 8000.
EDIT:
Для пользователей osx вы можете использовать sudo lsof -t -i tcp:8000 | xargs kill -9
Ответ №1
netstat -ntlp
Он покажет что-то вроде этого.
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 6599/python
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN -
tcp 0 0 192.168.124.1:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp6 0 0 :::3306 :::* LISTEN
Теперь просто закройте порт, в котором запущен Django/python, убив связанный с ним процесс.
kill -9 PID
в моем случае
kill -9 6599
Теперь запустите приложение Django.
Ответ №2
ps aux | grep -i manage
after that you will see all process
ubuntu@ip-10-154-22-113:~/django-apps/projectname$ ps aux | grep -i manage
ubuntu 3439 0.0 2.3 40228 14064 pts/0 T 06:47 0:00 python manage.py runserver project name
ubuntu 3440 1.4 9.7 200996 59324 pts/0 Tl 06:47 2:52 /usr/bin/python manage.py runserver project name
ubuntu 4581 0.0 0.1 7988 892 pts/0 S+ 10:02 0:00 grep --color=auto -i manage
kill -9 process id
e.d kill -9 3440
`enter code here`after that :
python manage.py runserver project name
Ответ №3
Мы не используем эту команду {sudo lsof -t -i tcp: 8000 | xargs kill -9} Потому что он закрывает все вкладки… Вы должны использовать
ps -ef | grep python
kill -9 process_id
ps -ef | grep python (показать весь процесс с id)
kill -9 11633
(11633 – это идентификатор процесса для: -/bin/python manage.py runningerver)
Ответ №4
Это расширение на ответ Мунира. Я добавил bash script, который охватывает это для вас. Просто запустите ./scripts/runserver.sh
вместо ./manage.py runserver
, и он будет работать точно так же.
#!/bin/bash
pid=$(ps aux | grep "./manage.py runserver" | grep -v grep | head -1 | xargs | cut -f2 -d" ")
if [[ -n "$pid" ]]; then
kill $pid
fi
fuser -k 8000/tcp
./manage.py runserver
Ответ №5
По умолчанию команда runserver запускает сервер разработки с внутреннего IP-адреса на порту 8000.
Если вы хотите изменить порт сервера, передайте его в качестве аргумента командной строки. Например, эта команда запускает сервер на порту 8080:
python manage.py runserver 8080
Ответ №6
ps aux | grep manage
ubuntu 3438 127.0.0 2.3 40256 14064 pts/0 T 06:47 0:00 python manage.py runningerver
kill -9 3438
Ответ №7
Кажется, что IDE, VSCode, Puppeteer, nodemon, express и т.д. Вызывают эту проблему, вы запустили процесс в фоновом режиме или просто закрыли область отладки [браузер, терминал и т.д.] Или что-то еще, во всяком случае, я ответил на тот же вопрос раньше, вот ты это ссылка
qaru.site/questions/2443349/…
Ответ №8
Для меня это происходит потому, что мой запрос API в Postman перехватывается точкой останова отладчика в моем приложении… оставляя запрос зависшим. Если я отменю запрос в Postman перед тем, как убить сервер приложений, ошибка не возникнет.
→ Так что попробуйте отменить любые открытые запросы, которые вы делаете в других программах.
В macOS я использовал sudo lsof -t -i tcp:8000 | xargs kill -9
sudo lsof -t -i tcp:8000 | xargs kill -9
когда я забываю отменить открытый запрос http для решения error = That port is already in use.
Это также завершает закрытие моего приложения Почтальон, поэтому мое первое решение лучше.
The other day I decided to install EasyPHP (a WAMP package that includes PHP, Apache, MySQL) on my machine running Windows 7. After install I ran the application, but to my surprise, Apache server was not working. It complained that Port 80 is used by another application. I thought this issue would be easily solved, but it took me a while to figure out what exactly is causing the problem. In this article I will show you what I tried and how I finally solved the Apache problem of not being able to run.
The error message that the EasyPHP gave was this:
Apache port (80) is already used by another application ! Close this application and try to run again the server. To close this application : open <easyphp folder>/binaries/tools/cports/cports.exe, find the line with the port already used in the column “Local Port”, right click and choose “Kill processes of Selected Ports”.
I tried to start server manually but that gave me the following error:
An attempt was made to access a socket in a way forbidden by its access permissions.
make_sock: could not bind to address 127.0.0.1:80
no listening sockets available, shutting down
I could of course just change the port, but I really wanted to find out what is causing this problem.
EasyPHP error message suggested to locate cports.exe to find the culprit, but I decided to first check the Programs and Features in control panel to see if I can figure out why the Apache server cannot listen to default port 80.
Using Programs and Features to look for application causing the issue
Looking at the list of installed programs I quickly found one such application that might be causing this issue. It was IIS Express 8 which was installed long time ago and I have totally forgotten about it. So solution seemed simple. Uninstall IIS Express 8 and the issue will go away, but to my surprise, that still didn’t solve the problem at all. Starting Apache failed again with the same port 80 is busy problem. So I decided to take advice from that EasyPHP error message about using cports.exe.
Running CurrPorts (cports.exe) as the error message suggested
CurrPorts is a little utility that lists all currently opened TCP/IP and UDP ports and the processes that opened those ports. If you also have EasyPHP installed, you should already have this utility. On my machine running Windows 7 64-bit I located cports.exe at:
C:Program Files (x86)EasyPHP-DevServer-14.1VC11binariestoolscports
When I ran the cports.exe I got a list processes listening to different ports and there was one listening to port 80, but unfortunately for me, there was no useful information about which process is doing this as shown below:
Click image to enlarge
For Process Name it showed System while Process ID showed 4. Even the option Kill Processes Of Selected Ports was grayed out.
Since currPorts was not giving me the information needed I decided to try my luck with commands in command prompt.
Using netstat command from Command Prompt
The one I tried first was netstat
, a command showing network activity.
Looking at the available parameters, using those listed below seemed worth a try
- -a : Displays all connections and listening ports.
- -n : Displays addresses and port numbers in numerical form.
- -o : Displays the owning process ID associated with each connection.
- -b : Displays the executable involved in creating each connection or listening port. (Requires administrator permission)
Due to –b parameter, I had to run cmd as an administrator as shown below:
Then I typed:
netstat –anob | more
About Pipe (|) and more command: Pipe redirects the output of the netstat
to the next command (in our case more
) which is a pager that displays a content one screen a time. Press space bar to scroll to the next page.
Looking for :80 under Local Address column I had this:
Local Address: | 0.0.0.0:80 |
---|---|
Foreign Address: | 0.0.0.0 |
State: | Listening |
PID: | 4 |
and below all these, there was a message “Can not obtain ownership information”.
PID stands for Process ID with PID 4 being a System Process where most system processes originate from. I tried to use Process Hacker utility to look for any information that would point me to what is causing this problem but I didn’t find any.
So I decided to try another command net stop which is discussed next.
Using net stop command from command prompt
Command net stop <service>
stops a running service. If that service has other services that depend on it, it will output a list of these services and prompts you for confirmation. This seemed like a great way to check what services depend on http service, so I typed the following line:
net stop http
The goal here was not to stop http service, so I didn’t confirm when prompted for confirmation. Instead, I just wanted to get the list of services that use it. The list I received is shown below:
By individually stopping each service in the generated list (by using services.msc), I wanted to find out if any of these services are responsible for taking away port 80. When particular service was stopped and had no effect on Apache, I chose the next service in the list.
After stopping all the services in the list I was still getting the error, so I went back to the web looking for possible causes and what caught my attention was http.sys process which is discussed next.
Quick guide on how to stop and disable the service
- Open the Start Menu, search for services.msc in the search box and run it. The new window will show up with a list of all the services.
- To stop a service, find the one you are looking for, right-click on it and select Stop. To make sure, the service stops even after computer restart, disable the service all together.
- To disable the service, right-click on that service, choose Properties and under General Tab for option Startup type, select Disabled in dropdown menu and click OK. Before disabling the service, you might want to find out first what role the service has, just to make sure you don’t really need it.
Finding out processes that use http.sys
Http.sys is a driver that enables multiple processes to listen to HTTP traffic on the same port. But examining this driver in Task Manager and also on Process Hacker revealed no useful information relating to ports.
And then I stumbled upon HttpSysManager tool. This looked like a very promising little utility that might reveal what is blocking Apache to listen on the default port. I ran the application, selected Acls tag and found some prefixes with port 80 on it as shown below:
Two of them were for SQL Reports. I quickly checked the list of services and found SQL Server Reporting Services (SSRS). After I stopped it Apache was able to run without error.
There was still one thing to check up. I wondered if this SQL Reporting service was the only culprit or will any of the stopped services from the net stop http
list still cause problems. By restarting all those services the Apache was unable to run once again. In the end it turned out that besides SQL Server Reporting Service I also had to disable World Wide Web Publishing Service (W3SVC). After those two were disabled, port 80 was finally available for Apache.
Conclusion
If Apache won’t start on port 80, we can either set it to listen to another port, or we can try to locate the application or service and stop them if they are not needed. With the help of CMD commands and various utilities this can be an easy task, but if the Process listening to port 80 is System Process with PID 4, then it takes a little more effort.
I hope you found the information here useful. If so, consider dropping a comment or share the post on social networks.
Окунись в чувственную атмосферу
Открой
Твоя скидка 10% по промокоду: VIVAZZI
Новосибирск
11 февраля 2023
sacral.club
Эта ошибка означает, что порт занят. Бывает, когда, например, в pycharm пытаешься перезапустить проект и терминал выдаёт Error: That port is already in use
. Чтобы освободить порт 8000, помогает в консоли его сброс:
sudo fuser -k 8000/tcp
Если точнее, эта команда убивает все процессы, связанные с указанным портом.
Оцените статью
4.4 из 5 (всего 7 оценок)
После нажатия кнопки «Отправить» ваше сообщение будет доставлено мне на почту.
Артём Мальцев
Веб-разработчик, владеющий знаниями языка программирования Python, фреймворка Django, системы управления содержимым сайта Django CMS, платформы для создания интернет-магазина Django Shop и многих различных приложений, использующих эти технологии.
Права на использование материала, расположенного на этой странице https://vivazzi.pro/ru/it/port-is-already-in-use/:
Разрешается копировать материал с указанием её автора и ссылки на оригинал без использования параметра rel="nofollow"
в теге <a>
. Использование:
Автор статьи: Артём Мальцев
Ссылка на статью: <a href="https://vivazzi.pro/ru/it/port-is-already-in-use/">https://vivazzi.pro/ru/it/port-is-already-in-use/</a>
Больше: Правила использования сайта
Представляю вашему вниманию книгу, написанную моим близким другом Максимом Макуриным: Секреты эффективного управления ассортиментом.
Книга предназначается для широкого круга читателей и, по мнению автора, будет полезна специалистам отдела закупок и логистики, категорийным и финансовым менеджерам, менеджерам по продажам, аналитикам, руководителям и директорам, в компетенции которых принятие решений по управлению ассортиментом.