windows下关闭指定端口服务,解决tomcat端口占用问题

windows下关闭指定端口服务,解决tomcat端口占用问题

id="cproIframe_595135_2" width="250" height="250" src="http://cb.baidu.com/ecom?adn=3&at=231&aurl=&cad=1&ccd=24&cec=UTF-8&cfv=16&ch=0&col=zh-cn&conOP=0&cpa=1&dai=2&dis=0&ltr=http%3A%2F%2Fwww.baidu.com%2Fs%3Fie%3Dutf-8%26f%3D8%26rsv_bp%3D1%26tn%3D29065018_161_hao_pg%26wd%3Dtomcat7.0%25E6%2580%258E%25E4%25B9%2588%25E5%2585%25B3%25E9%2597%25AD%26rsv_pq%3Db37252b20021fa0a%26rsv_t%3D6a231G5KqQ01uSY1vJhwhgYCEzIjpvYeyno1VaScTo9lKeTEfeC5iJQFOOPB9D%252Fb4VQA67JgsrjraA%26rsv_enter%3D1%26oq%3Dtomcat7%26inputT%3D19847%26rsv_sug1%3D42%26rsv_sug3%3D34%26rsv_sug2%3D0%26rsv_sug4%3D20586&ltu=http%3A%2F%2Fblog.aizhet.com%2FServer%2F640.html&lunum=6&n=hao121com_cpr&pcs=1349x666&pis=10000x10000&ps=295x235&psr=1366x768&pss=1349x706&qn=789bd724e65b6aea&rad=&rs=301&rsi0=250&rsi1=250&rsi5=4&rss0=%23FFFFFF&rss1=%23FFFFFF&rss2=%230000FF&rss3=%23444444&rss4=%23008000&rss5=&rss6=%23e10900&rss7=&scale=&skin=&td_id=9223372032564301275&tn=text_default_250_250&tpr=1425741799045&ts=1&xuanting=0&dtm=BAIDU_DUP2_SETJSONADSLOT&dc=2&di=595135" align="center,center" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" allowtransparency="true">

    在windows下做java EE的开发时;搭建 Eclipse+tomcat的java web开发环境;在应用之中经常遇到 tomcat在重新启动服务时,端口占用问题;导致无法启动服务;

错误提示:

tomCat服务器重新启动端口占用问题

Several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).

分析原因: 是当前 端口 8080被占用,所以重新启动服务为出现端口占用错误;

解决方案:

结束当前占用8080端口的服务就可以了;

1:开始----运行-----cmd-------输入 netstat -abn   
        2:如图结果之中,发现 8080端口占用的程序名称是 javaw.exe

8080端口占用

3:打开任务 管理器----进程----结束进程  javaw.exe就可以了;

4:然后重新启动tomcat服务器; 

如何关闭指定端口的程序进程

如图操作--先找出端口对应的程序进程pid---根据pid找出程序名称----根据进程名称结束进程,释放端口;

查询指定端口占用的程序服务

1:netstat -abn|findstr "8080"         查询指定端口占用程序的pid

2:tasklist|findstr "180"                查看pid 为 180的进程的程序名称

3:taskkill  /f  /t  /im  javaw.exe       强制结束占用8080端口的程序javaw.exe

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值