2

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)

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 ?

Community
  • 1
  • 1
user3198603
  • 5,528
  • 13
  • 65
  • 125

1 Answers1

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

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

The redirectPort is for:

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.

It would need to be a different port than the one specified by port

Brian Roach
  • 76,169
  • 12
  • 136
  • 161
  • This answer is *not* correct. `redirectPort` does not bind to a port. The configuration is probably wrong (the port *should* in fact be different) but this configuration will not cause the error reported in the original question. – Christopher Schultz Nov 15 '16 at 14:57