您好,我在Windows上配置了tomcat服务器,没有任何安全性,并且启动正常。

当我将其迁移到具有SSL安全性的Linux Server时,我重新配置为SSL安全性,但是它始终具有以下缺点:

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)


这是我的服务器配置:

<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"/>

最佳答案

我遇到过同样的问题。我提到Starting Tomcat Failed to initialize end point associated with ProtocolHandler,但没有成功。请先尝试此操作。否则,请执行以下操作。

我在我的一位具有root权限的用户上在Ubuntu上运行了tomcat。最初,我运行普通命令./startup.sh,并获得了该权限被拒绝的异常。然后我运行了sudo ./startup.sh,它起作用了。

希望能帮助到你!!!

10-07 16:19
查看更多