> Ok, so the idea is that init() has to be successful or the component will 
> never become started later on.
> Connectors are a bit special though. You can use bindOnInit to do the socket 
> bind and TLS start either in init (you don't want it to fail, and you want 
> the server to start accepting asap) or start (which allows stopping and 
> restarting later, new    
> attempts after a failure, and so on).

> I don't know what the best default behavior after getting into a "failed 
> init" state should be for a component. Right now after destroy, it is not 
> possible to go back and simply call init again. I have the impression this is 
> the most reasonable behavior.

> Rémy

Rémy,

We've followed your advice and changed the code on our app side to avoid the 
error loading the connector keystore (i.e.  "java.io.FileNotFoundException: 
C:\Program Files\Neverfail\tomcat\ssl\NFKeyStore.jks (The system cannot find 
the path specified))" 
-> this SOLVED the original reported issue 😊. Now our webapp is working 
correctly, with keystore created before, thus being ready by the time tomcat 
connector "https-openssl-nio-9727" starts.

Here are catalina logs for successful load/init/start:
__________________________
[...]
06-Nov-2024 11:40:28.796 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache 
Tomcat Native library [1.3.1] using APR version [1.7.4].
06-Nov-2024 11:40:28.796 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: 
IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
06-Nov-2024 11:40:28.796 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL 
configuration: useAprConnector [false], useOpenSSL [true]
06-Nov-2024 11:40:28.796 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL 
successfully initialized [OpenSSL 3.0.14 4 Jun 2024]
06-Nov-2024 11:40:29.202 INFO [main] org.apache.coyote.AbstractProtocol.init 
Initializing ProtocolHandler ["http-nio-9728"]
06-Nov-2024 11:40:29.233 INFO [main] org.apache.coyote.AbstractProtocol.init 
Initializing ProtocolHandler ["https-openssl-nio-9727"]
06-Nov-2024 11:40:34.405 INFO [main] 
org.apache.tomcat.util.net.AbstractEndpoint.logCertificate Connector 
[https-openssl-nio-9727], TLS virtual host [_default_], certificate type 
[UNDEFINED] configured from keystore [../ssl/NFKeyStore.jks] using alias 
[nfhb_private_certificate] with trust store [null]
06-Nov-2024 11:40:34.405 INFO [main] org.apache.catalina.startup.Catalina.load 
Server initialization in [6698] milliseconds
06-Nov-2024 11:40:34.452 INFO [main] 
org.apache.catalina.core.StandardService.startInternal Starting service 
[Catalina]
06-Nov-2024 11:40:34.452 INFO [main] 
org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: 
[Apache Tomcat/9.0.96]
06-Nov-2024 11:40:34.468 INFO [main] 
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application 
archive [C:\Program 
Files\Neverfail\tomcat\apache-tomcat-9.0.96\webapps\hbws.war]
06-Nov-2024 11:40:57.830 INFO [main] 
org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application 
archive [C:\Program 
Files\Neverfail\tomcat\apache-tomcat-9.0.96\webapps\hbws.war] has finished in 
[23,361] ms
[...]
______________________

Thank you for your guidance,
/LJ

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to