Пытаюсь добавить SSL Let`s Encrypt в томкат но переадресация не происходит.
server.xml
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
Server =" "
redirectPort="443"
maxParameterCount="1000"
/>
<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateFile="conf/cert.pem"
certificateKeyFile="conf/privkey.pem"
certificateChainFile="conf/chain.pem" />
</SSLHostConfig>
</Connector>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="S-2">
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
catalina.out выдаёт
24-Jan-2024 11:42:20.543 INFO [main] org.apache.coyote.AbstractProtocol.init Инициализация ProtocolHandler ["http-nio-80"]
24-Jan-2024 11:42:20.610 INFO [main] org.apache.coyote.AbstractProtocol.init Инициализация ProtocolHandler ["https-jsse-nio-443"]
24-Jan-2024 11:42:20.621 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Ошибка инициализации компонента [Connector["https-jsse-nio-443"]]
org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1015)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:127)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:554)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:127)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1010)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:127)
at org.apache.catalina.startup.Catalina.load(Catalina.java:747)
at org.apache.catalina.startup.Catalina.load(Catalina.java:769)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:307)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:477)
Caused by: java.net.SocketException: Operation not permitted
at java.base/sun.nio.ch.Net.bind0(Native Method)
at java.base/sun.nio.ch.Net.bind(Net.java:555)
at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:337)
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:294)
at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:247)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:202)
at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1280)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1293)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:624)
at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:77)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1013)
... 13 more
nmap -p 443
выдаёт:
PORT STATE SERVICE
443/tcp closed https
lsof -i:443 ничего не выдает.
Как это можно исправить?
Не знаю, может имеет значение. Там стоит ngnix, я егонемного поковырял и просто выключил stop.