LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to encrypt keystore password in server.xml (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-encrypt-keystore-password-in-server-xml-4175651542/)

LittleMaster 04-05-2019 06:47 AM

How to encrypt keystore password in server.xml
 
Hi ,

Tomcat instance failing after enabling SSL certificate .

However when I try the below approach in the server.xml comments, Tomcat does not
start:



[root@porsche conf]# cat server.xml
<Connector
protocol="org.apache.coyote.http11.Http11NioProtocol"
port="8443" maxThreads="200" compression="on"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="conf/keystore.jks" keystorePass="XziIPXoTSoF=OK0"
clientAuth="false" sslProtocol="TLS">
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
</Connector>
[root@porsche conf]#

[root@porsche conf]# ll keystore.jks
-rw-r-----. 1 root root 5470 Apr 5 16:23 keystore.jks
[root@porsche conf]# pwd
/opt/tomcat/conf
[root@porsche conf]#

after enabling server.xml modification fails to start

Catalina.log

08-Apr-2019 16:03:25.258 WARNING [main] org.apache.tomcat.util.digester.Digester.endElement No rules found matching [Connector/SSLHostConfig/Certificate]
08-Apr-2019 16:03:25.260 WARNING [main] org.apache.tomcat.util.digester.Digester.endElement No rules found matching [Connector/SSLHostConfig]
08-Apr-2019 16:03:25.260 WARNING [main] org.apache.tomcat.util.digester.Digester.endElement No rules found matching [Connector]
java.lang.NullPointerException
at org.apache.catalina.startup.Catalina.load(Catalina.java:580)
at org.apache.catalina.startup.Catalina.load(Catalina.java:612)
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:306)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:491)
08-Apr-2019 16:03:25.261 SEVERE [main] org.apache.catalina.startup.Catalina.start Cannot start server, server instance is not configured
[root@porsche conf]#


All times are GMT -5. The time now is 01:32 PM.