반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Chrome
- unittest
- 오블완
- MAC
- PYTHON
- 리눅스
- TensorFlow
- androidstudio
- xcode
- build
- 네트워크
- react
- centos
- ReactNative
- node
- MachineLearning
- Android
- 개발
- 맥
- localserver
- 센토스
- qunit
- vsCode
- webpack
- linux
- 티스토리챌린지
- IOS
- VirtualBox
- jest
Archives
- Today
- Total
로메오의 블로그
[netstat] 포트확인해서 프로세스 종료하기 본문
반응형
Spring Application 서버가 구동되는 상태에서 예상치 못하게 이클립스가 종료되어
서버를 종료하지 못하면 다시 실행된 이클립스에서 서버를 구동하려 해도 이미 포트가 사용중이라며
서버구동을 못할때가 있습니다.
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210)
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1150)
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:591)
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1018)
... 19 common frames omitted
2019-08-29 15:41:54.250 ERROR o.s.b.d.LoggingFailureAnalysisReporter -
이때 명령어로 Spring Application이 사용하는 포트의 pid를 확인해서 프로세스를 종료하는 방법입니다.
스프링을 구동할때 포트를 확인 할수 있습니다.
포트확인
########### Mac의 경우
$ lsof -i :"8088"
########### Windows의 경우
$ netstat -ano | find "8088"
PID를 확인합니다.
프로세스 종료
########### Mac의 경우
$ kill -9 "40348"
$ lsof -i :"8088"
########### Windows의 경우
$ taskkill /f /pid 40348
$ netstat -ano | find "8088"
kill 명령어로 프로세스를 종료시키고 다시 포트를 확인하면 종료된것을 확인 할 수 있습니다.
반응형
Comments