Failed to initialize end point associated with Pro

2019-07-28 20:57发布

问题:

Hello I have configurated tomcat Server on Windows without any security and it started fine.

When I migrated it to a Linux Server with SSL security, I reconfigured to SSL security but it has always given the follwing eror:

06-Oct-2017 10:45:34.858 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["https-jsse-nio-443"]
     java.net.SocketException: Permission denied
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:433)
        at sun.nio.ch.Net.bind(Net.java:425)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210)
        at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:982)
        at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:244)
        at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:620)
        at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:66)
        at org.apache.catalina.connector.Connector.initInternal(Connector.java:997)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
        at org.apache.catalina.core.StandardService.initInternal(StandardService.java:549)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
        at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:875)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:607)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:630)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)

This is my Server configuratiuon:

<Connector port="443" maxHttpHeaderSize="8192"
     maxThreads="100" minSpareThreads="25" maxSpareThreads="50"
     enableLookups="true" disableUploadTimeout="true"
     acceptCount="50" scheme="https" secure="true"
     URIEncoding="UTF-8"
     connectionTimeout="20000"
     SSLEnabled="true"
     SSLPassword="hasanpass"
     keystorePass="hasanpass"
     SSLCertificateFile="/usr/local/tomcat/crypto/hasan1.crt"
     SSLCertificateKeyFile="/usr/local/tomcat/crypto/hasan.key"/>

回答1:

I had the same issue. I referred to Starting Tomcat Failed to initialize end point associated with ProtocolHandler but no success. Try this first.If it does not do the following.

I ran tomcat on Ubuntu with one of my users with root permissions. Initially I ran the normal command ./startup.sh and I got this permission denied exception. Then I ran sudo ./startup.sh and it worked.

Hope it helps!!!