在tomcat启动时通常只允许每个套接字地址(协议/网络地址/端口)使用一次? [英] Only one usage of each socket address (protocol/network address/port) is normally permitted while tomcat start?

查看:47
本文介绍了在tomcat启动时通常只允许每个套接字地址(协议/网络地址/端口)使用一次?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我在 server.xml 中的连接器元素.我也尝试使用 8443 而不是 8484 但同样的错误.

Here is my connector element in server.xml. I also tried using 8443 instead of 8484 but same error.

<Connector 
  SSLEnabled="true" 
  acceptCount="100" 
  connectionTimeout="20000" 
  executor="tomcatThreadPool" 
  keystoreFile="D:/.keystore" 
  keystorePass="changeit" 
  maxKeepAliveRequests="15" 
  port="8484" 
  protocol="HTTP/1.1" 
  redirectPort="8484" 
  scheme="https" 
  secure="true" 
  allowUnsafeLegacyRenegotiation="true"/>



SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address (protocol/network address/port) is normally permitted.  
    at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:649)
    at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:766)
    at org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
    at org.apache.catalina.connector.Connector.start(Connector.java:1122)
    at org.apache.catalina.core.StandardService.start(StandardService.java:540)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Jan 23, 2014 10:05:26 AM org.apache.catalina.core.StandardService start
SEVERE: Failed to start connector [Connector[HTTP/1.1-8484]]
LifecycleException:  service.getName(): "Catalina";  Protocol handler start failed: java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address (protocol/network address/port) is normally permitted.  
    at org.apache.catalina.connector.Connector.start(Connector.java:1129)
    at org.apache.catalina.core.StandardService.start(StandardService.java:540)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

我确信没有其他应用程序正在使用端口(8484 或 8443),经 Tomcat 启动错误验证.我不确定真正的原因是什么?

i am sure no other app is using ports(8484 or 8443) as verified with Tomcat start up error. i am not sure what is the actual cause ?

推荐答案

port="8484" 
...
redirectPort="8484" 

您正试图在同一个端口上打开两个侦听套接字.

You're attempting to open two listening sockets on the same port.

redirectPort 用于:

如果此连接器支持非 SSL 请求,并且收到了一个匹配的 <security-constraint> 请求.需要 SSL 传输,Catalina 会自动将请求重定向到此处指定的端口号.

If this Connector is supporting non-SSL requests, and a request is received for which a matching <security-constraint> requires SSL transport, Catalina will automatically redirect the request to the port number specified here.

它需要与 port

这篇关于在tomcat启动时通常只允许每个套接字地址(协议/网络地址/端口)使用一次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆