gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 07:11:24 26 4
gpt4 key购买 nike

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

<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 start up error 验证. 我不确定真正的原因是什么?

最佳答案

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

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

redirectPort 用于:

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

指定的 不同端口

关于java - tomcat启动时通常只允许每个套接字地址(协议(protocol)/网络地址/端口)使用一次?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21299942/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com