Quantcast
Channel: NETWORK ENGINEER BLOG
Viewing all articles
Browse latest Browse all 266

Linux で特定ポートで実行されているプロセスを強制終了する

$
0
0

CentOS 6.3 の例になります。
WebGoat を起動しようとすると以下のエラーが出力されました。

***************************
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 使用されているようです。
使用しているプロセスは以下のコマンドで確認できます。

# lsof -i:8080
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    16915 root   26u  IPv6  53443      0t0  TCP *:webcache (LISTEN)

Java の webcache が使用しているようです。
以下のコマンドで強制終了します。

# kill $(lsof -t -i:8080)

もしくは、

#kill -9 $(lsof -t -i:8080)

再度ポート 8080 の使用状況を確認します。

# lsof -i:8080

正常に終了できていれば、表示されなくなります。

以上


Viewing all articles
Browse latest Browse all 266

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>