myEclipse中Tomcat启动报错问题

18人阅读 评论(0) 收藏 举报
分类:

在myeclipse中启动tomcat报如下错误:

信息: Initializing ProtocolHandler ["http-nio-8080"]
Apr 15, 2018 5:01:20 PM org.apache.catalina.util.LifecycleBase handleSubClassException
严重: Failed to initialize component [Connector[HTTP/1.1-8080]]
org.apache.catalina.LifecycleException: Protocol handler initialization failed
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:935)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:530)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:852)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:656)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:306)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:491)
Caused by: java.net.BindException: Address already in use
    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.initServerSocket(NioEndpoint.java:227)
    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:202)
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1043)
    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:540)
    at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:74)
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:932)
    ... 13 more
Apr 15, 2018 5:01:20 PM org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
Apr 15, 2018 5:01:21 PM org.apache.catalina.util.LifecycleBase handleSubClassException
严重: Failed to initialize component [Connector[AJP/1.3-8009]]
org.apache.catalina.LifecycleException: Protocol handler initialization failed
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:935)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:530)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:852)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:656)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:306)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:491)
Caused by: java.net.BindException: Address already in use
    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.initServerSocket(NioEndpoint.java:227)
    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:202)
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1043)
    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:540)
    at org.apache.catalina.connector.Connector.initInternal(Connector.java:932)
    ... 13 more
Apr 15, 2018 5:01:21 PM org.apache.catalina.startup.Catalina load
信息: Initialization processed in 988 ms
Apr 15, 2018 5:01:21 PM org.apache.catalina.core.StandardService startInternal
信息: Starting service [Catalina]
Apr 15, 2018 5:01:21 PM org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/9.0.7
Apr 15, 2018 5:01:21 PM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory [/usr/local/ApacheTomcat/webapps/ppp]
Apr 15, 2018 5:01:21 PM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory [/usr/local/ApacheTomcat/webapps/ppp] has finished in [40] ms
Apr 15, 2018 5:01:21 PM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory [/usr/local/ApacheTomcat/webapps/docs]
Apr 15, 2018 5:01:21 PM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory [/usr/local/ApacheTomcat/webapps/docs] has finished in [22] ms
Apr 15, 2018 5:01:21 PM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory [/usr/local/ApacheTomcat/webapps/manager]
Apr 15, 2018 5:01:21 PM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory [/usr/local/ApacheTomcat/webapps/manager] has finished in [62] ms
Apr 15, 2018 5:01:21 PM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory [/usr/local/ApacheTomcat/webapps/examples]
Apr 15, 2018 5:01:22 PM org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
Apr 15, 2018 5:01:22 PM org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
Apr 15, 2018 5:01:22 PM org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('StockTicker', 'async.Stockticker@2de23121')
Apr 15, 2018 5:01:22 PM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory [/usr/local/ApacheTomcat/webapps/examples] has finished in [393] ms
Apr 15, 2018 5:01:22 PM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory [/usr/local/ApacheTomcat/webapps/ROOT]
Apr 15, 2018 5:01:22 PM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory [/usr/local/ApacheTomcat/webapps/ROOT] has finished in [20] ms
Apr 15, 2018 5:01:22 PM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory [/usr/local/ApacheTomcat/webapps/host-manager]
Apr 15, 2018 5:01:22 PM org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory [/usr/local/ApacheTomcat/webapps/host-manager] has finished in [31] ms
Apr 15, 2018 5:01:22 PM org.apache.catalina.startup.Catalina start
信息: Server startup in 1098 ms
Apr 15, 2018 5:01:22 PM org.apache.catalina.core.StandardServer await
严重: StandardServer.await: create[localhost:8005]:
java.net.BindException: Address already in use (Bind failed)
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
    at java.net.ServerSocket.bind(ServerSocket.java:375)
    at java.net.ServerSocket.<init>(ServerSocket.java:237)
    at org.apache.catalina.core.StandardServer.await(StandardServer.java:422)
    at org.apache.catalina.startup.Catalina.await(Catalina.java:770)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:716)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)

这说明已经有tomact在后台运行产生的绑定错误(你在控制台已经启动tomcat并没有关闭)

解决方法:手动关闭 tomcat

控制台中输入:

1.cd  /你的tomcat存放的文件夹/bin /

2. ./shutdown.sh

3.然后在myeclise中重新启动tomact不报错!!

查看评论

打开Myeclipse时Tomcat服务器报错解决办法

打开myEclipse就会报 Errors running builder 'DeploymentBuilder' on project '工程名' xxxNullpointException 的错误...
  • Elina_1992
  • Elina_1992
  • 2016-12-20 19:17:21
  • 1871

Eclipse中配置启动Tomcat服务器,以及错误及报错解决

起初是使用MyEclipse,对于部署tomcat其实是很简单的。只是需要在首选项中增加tomcat的目录即可在快捷键栏中部署使用。 但是Eclipse就不一样了。这个是比较繁琐的。下面就简单的配置一...
  • SSTBOV
  • SSTBOV
  • 2016-06-10 11:14:11
  • 4704

MyEclipse启动Tomcat正常,Tomcat自启动报错

今天碰到一个很抓狂的问题,在MyEclipse里启动Tomcat不报错,项目正常运行,但是部署到服务器端时莫名奇妙的出现了Caused by: org.springframework.beans.fa...
  • Galeno1994
  • Galeno1994
  • 2016-07-29 16:25:59
  • 953

Failed to initialize component [Connector[HTTP/1.1-8086]]

严重: Failed to initialize end point associated with ProtocolHandler ["http-apr-8086"] java.lang.Excep...
  • z278718149
  • z278718149
  • 2014-03-23 16:58:07
  • 12728

Java Tomcat9.0 启动报错

配置好了Tomcat9.0 启动的时候报错了, 详细: 一月 12, 2017 1:12:23 上午 org.apache.tomcat.util.digester.SetPropert...
  • pkandroid
  • pkandroid
  • 2017-01-12 01:17:59
  • 3875

Javaweb学习笔记——Server Tomcat v9.0 Server at localhost failed to start.

Javaweb学习笔记——Server Tomcat v9.0 Server at localhost failed to start.
  • dlt9527
  • dlt9527
  • 2017-04-21 17:54:52
  • 13636

项目运行时报错,myeclipse和tomcat的jdk不一致

如何修改myeclipse中的jdk的版本。 选择service-->tomcat-->jdk就ok
  • yinbucheng
  • yinbucheng
  • 2017-04-11 14:52:35
  • 309

Tomcat启动报错Cannot connect to VM

今天在启动Tomcat的时候遇到了下面这个错误: starting Tomcat 6.x server:a configuration error occurred during startup. ...
  • zapperbot
  • zapperbot
  • 2015-05-24 19:46:58
  • 411

严重 [RMI TCP Connection(3)-127.0.0.1]

学习Servlet时碰到的一个bug。 Connected to server [2017-01-08 04:40:33,100] Artifact jspRun:war exploded: Arti...
  • lgh1992314
  • lgh1992314
  • 2017-01-08 17:13:41
  • 16840

Tomcat源码分析 -- Tomcat的启动过程(二)

本篇结构: 前言 总览一下main方法 init setAwait load start 一、前言 上一篇中介绍了startup.bat和catalina.bat脚本。了解到日常双击star...
  • w1992wishes
  • w1992wishes
  • 2018-02-23 13:58:01
  • 37
    个人资料
    等级:
    访问量: 47
    积分: 50
    排名: 170万+
    文章分类
    文章存档