在tomcat启动时通常只允许每个套接字地址(协议/网络地址/端口)使用一次?

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

问题描述

限时送ChatGPT账号..

这是我在 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.AprEndpoint.init(AprEndpoint.java:649)
    at org.apache.tomcat.util.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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 04:06:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1389398.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:启动时   端口   只允许   网络地址   协议

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!