启动Tomcat报错

heng7421 2010-03-02 11:23:18
错误信息:



2010-3-2 11:17:30 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.10.
2010-3-2 11:17:30 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2010-3-2 11:17:30 org.apache.coyote.http11.Http11AprProtocol init
严重: Error initializing endpoint
java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/??????/???)????í?????Ρ?
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:612)
at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2010-3-2 11:17:30 org.apache.catalina.startup.Catalina load
严重: Catalina.start
LifecycleException: Protocol handler initialization failed: java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/??????/???)????í?????Ρ?
at org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2010-3-2 11:17:30 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1108 ms
2010-3-2 11:17:30 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2010-3-2 11:17:30 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.16
log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.
2010-3-2 11:17:33 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "listeners.ContextListener" is already configured for this context. The duplicate definition has been ignored.
2010-3-2 11:17:33 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "listeners.SessionListener" is already configured for this context. The duplicate definition has been ignored.
2010-3-2 11:17:33 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2010-3-2 11:17:33 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2010-3-2 11:17:33 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.catalina.Registry', 'org.apache.tomcat.util.modeler.Registry@13e6226')
2010-3-2 11:17:33 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.catalina.MBeanServer', 'com.sun.jmx.mbeanserver.JmxMBeanServer@9dca26')
2010-3-2 11:17:33 org.apache.coyote.http11.Http11AprProtocol start
严重: Error starting endpoint
java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/??????/???)????í?????Ρ?
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:612)
at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:717)
at org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
at org.apache.catalina.connector.Connector.start(Connector.java:1131)
at org.apache.catalina.core.StandardService.start(StandardService.java:531)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2010-3-2 11:17:33 org.apache.catalina.startup.Catalina start
严重: Catalina.start:
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/??????/???)????í?????Ρ?
at org.apache.catalina.connector.Connector.start(Connector.java:1138)
at org.apache.catalina.core.StandardService.start(StandardService.java:531)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2010-3-2 11:17:33 org.apache.catalina.startup.Catalina start
信息: Server startup in 3130 ms
2010-3-2 11:17:33 org.apache.catalina.core.StandardServer await
严重: StandardServer.await: create[8006]:
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
at org.apache.catalina.startup.Catalina.await(Catalina.java:642)
at org.apache.catalina.startup.Catalina.start(Catalina.java:602)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)







开始我以为是Tomcat端口被占用,但是改了端口之后依然报错。
...全文
457 27 打赏 收藏 转发到动态 举报
写回复
用AI写文章
27 条回复
切换为时间正序
请发表友善的回复…
发表回复
CrazyJayFans 2010-09-18
  • 打赏
  • 举报
回复
是什么问题呀!我也报的这个错误!哎。。。
yunzhizi2 2010-08-13
  • 打赏
  • 举报
回复
我的也遇到这种问题了啊,tomcat5.5在myeclipse里面启动报的都是红色字体。
Away_11111111 2010-03-03
  • 打赏
  • 举报
回复
呵呵 很感兴趣 是什么原因??
heng7421 2010-03-03
  • 打赏
  • 举报
回复
已经搞定了,
多谢大家的帮忙,谢谢,谢谢。
heng7421 2010-03-02
  • 打赏
  • 举报
回复
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"
compressionMinSize="2048"
compression="on"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain,application/json,image/png,image/jpg,image/gif"/>


我改过了,还是出错
exezdl 2010-03-02
  • 打赏
  • 举报
回复
Tomcat端口被占用,修改Tomcat6.0\conf\server.xml,
so185582 2010-03-02
  • 打赏
  • 举报
回复
它提示Socket绑定失败
孤独剑客 2010-03-02
  • 打赏
  • 举报
回复
端口被占用了啊,
把端口关闭了, 重新启动再看看
在cmd下, netstat -an查看端口是用情况
牛叔 2010-03-02
  • 打赏
  • 举报
回复
少包
还是
????
Away_11111111 2010-03-02
  • 打赏
  • 举报
回复
我昨天装Tomcat服务器也走了一点歧路,你的错误可能存在在几个点上:一可能是Apache Tomcat已经启动了服务器,你再在MyEclipse的servers里启动Tomcat 6.x就会冲突报错;二JDK和Tomcat服务器分别要配置正确;三端口就像很多人认为的那样--可能冲突,我一般不改,用默认8080的;四环境变量,这应该不会设置错吧,这条应该要仔细。
b07522 2010-03-02
  • 打赏
  • 举报
回复
很期待!!等待高手。
meander 2010-03-02
  • 打赏
  • 举报
回复
引用 10 楼 heng7421 的回复:
更改端口(失败)、
关了进程(失败)、
重起电脑(失败)、
卸了重装(在下载...)


端口被占用
星辰企业 2010-03-02
  • 打赏
  • 举报
回复
有办法! 进入任务管理器里面把所有的javaw与java还有myeclipse还有eclipse的线程中留下一个点内存最大的! 其它的都停止掉!再启动Tomcat 就可以了!
wangxiaoyun987 2010-03-02
  • 打赏
  • 举报
回复
兄弟 把自动改成手动
heng7421 2010-03-02
  • 打赏
  • 举报
回复
<!-- Note:  A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="SHUTDOWN">

<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener" />
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>

<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">

<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->


<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="6060" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"
compressionMinSize="2048"
compression="on"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain,application/json,image/png,image/jpg,image/gif"/>
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />


<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->

<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">

<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->

<!-- The request dumper valve dumps useful debugging information about
the request and response data received and sent by Tomcat.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->

<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>

<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->

<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->
<Context path="" docBase="D:\WEB_BasicUnitInfo\BasicUnitInfo" reloadable="true" crossContext="true"/>
</Host>
</Engine>
</Service>
</Server>



server.xml
heng7421 2010-03-02
  • 打赏
  • 举报
回复
引用 15 楼 wangxiaoyun987 的回复:
你看看的计算机服务里 apache tomcat服务项是不是手动的 不是的话改成手动的。然后再试试


是自动的,而且我也启动了tomcat。
nickycheng 2010-03-02
  • 打赏
  • 举报
回复
<Server port="8005" shutdown="SHUTDOWN">

<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />


试试看把带色的都改一下。 8443要成对改
wangxiaoyun987 2010-03-02
  • 打赏
  • 举报
回复
你看看的计算机服务里 apache tomcat服务项是不是手动的 不是的话改成手动的。然后再试试
heng7421 2010-03-02
  • 打赏
  • 举报
回复
引用 13 楼 wangxiaoyun987 的回复:
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

        <!-- SingleSignOn valve, share authentication between web applications
            Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
            Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" 
              prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
        -->

      </Host>

试试 CONF/SERVER.XML 部分代码


改了你的来试,也继续报错了。快疯了...
我的原来是这样的:
<Host name="localhost"  appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->

<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->
<Context path="" docBase="D:\WEB_BasicUnitInfo\BasicUnitInfo" reloadable="true" crossContext="true"/>
</Host>
wangxiaoyun987 2010-03-02
  • 打赏
  • 举报
回复
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->

<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->

</Host>

试试 CONF/SERVER.XML 部分代码
加载更多回复(7)

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧