zoukankan      html  css  js  c++  java
  • windows下关闭指定端口服务,解决tomcat端口占用问题

    http://blog.aizhet.com/Server/640.html

        在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

  • 相关阅读:
    Postman基本使用
    一分钟应对勒索病毒WannaCry
    使用C语言和Java分别实现冒泡排序和选择排序
    C#快速读写文件
    从一个故事开始谈项目与团队管理
    JavaSE学习总结(八)
    npm 包的 发布 流程
    iOS开发UI篇—Quartz2D使用(矩阵操作)
    iOS开发UI篇—Quartz2D使用(图形上下文栈)
    iOS开发UI篇—Quartz2D简单使用(三)
  • 原文地址:https://www.cnblogs.com/jexwn/p/4448416.html
Copyright © 2011-2022 走看看