zoukankan      html  css  js  c++  java
  • 启动Tomcat的时候8080被占用

    异常来源:启动Tomcat服务器报错:

         Several ports (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端口的进程:

    先打开你的cmd命令(电脑按住Win+R键),然后在code里敲 netstat -ano|findstr 8080或8009(哪个端口被占用,就输入哪个端口号,看我的截图是8080端口号).

    还有另外一种 输入: netstat   -ano

    展示出所有的,找到8080端口,pid为12064.

    可以在任务管理器找到pid为12064的进程直接关闭,或者在cmd中输入“taskkill /pid 编号 /f”

     比如我这个,就是直接输入taskkill /pid 12064 /f 就可以直接关闭这个进程。

     

    方法二:改变你tomcat启动的端口号,比如你现在为8080,但是端口号被占用了。

    修改Tomcat的配置文件。
    例如:C:/tomcat5.5.25/conf/server.xml
     <Connector port="8080" maxHttpHeaderSize="8192"
                   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                   enableLookups="false" redirectPort="8443" acceptCount="100"
                   connectionTimeout="20000" disableUploadTimeout="true" />

    Connector 节点,将port="8080"中的端口改为一个没有被占用的端口。

    ----------------------------------------------------------------------

    以上方法使用后,重新打开tomcat就可以使用了。。。

  • 相关阅读:
    JWT
    activate-power-mode安装与设置
    redis备份与恢复
    stub_status监控Nginx使用情况!
    php-fpm,cgi,fast-cgi,nginx,php.ini,php-fpm.conf,nginx.conf
    Nginx 413 Request Entity Too Large
    Quartz作业调度框架
    mysql 查看是否存在某一张表
    JSTL 核心标签库
    J2EE maven pom.xml常用的jar包
  • 原文地址:https://www.cnblogs.com/jianshuai520/p/9772484.html
Copyright © 2011-2022 走看看