5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Windowsでポート8080を調べてプロセス終了する

Posted at

###環境
Windows10
SpringBoot 2.5.2

###エラーログ

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-06-30 22:16:21.436 ERROR 8536 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Web server failed to start. Port 8080 was already in use.

Action:

Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.

###8080を使用しているプロセスを終了する

ちょっとしらべたらLinuxコマンドは出てくるけど、Windowsはあまり出てこなかったのでメモしときます。

コマンドプロンプトで以下のコマンドを実行

調べるとき
$ netstat -nao | findstr 8080
  TCP         0.0.0.0:8080           0.0.0.0:0              LISTENING       25952
  TCP         [::]:8080              [::]:0                 LISTENING       25952

最後の25952がPIDなので、終了させる

終了するとき
$ taskkill /f /pid 25952
成功: PID 25952 のプロセスは強制終了されました。
5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?