Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to use tomcat setup over SSL.

I generated the keystore using this command

$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore /home/user/.keystore

Then I used the connector

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
           maxThreads="150" scheme="https" secure="true"
           clientAuth="false" sslProtocol="TLS" 
           keystoreFile="/home/user/.keystore" keystorePass="password" keyAlias="tomcat" />

It is giving me the exception again and again:

java.io.IOException: Keystore was tampered with, or password was incorrect
    at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:788)
    at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
    at java.security.KeyStore.load(KeyStore.java:1201)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:328)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getTrustStore(JSSESocketFactory.java:302)
    at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getTrustManagers(JSSE14SocketFactory.java:181)
    at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:110)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:124)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:293)
    at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:139)

I had double check the password and file, both are correct.

Can any one guess why it is?

share|improve this question
    
Are you sure the path to the keystone is correct? –  Tim Brigham Jun 18 '13 at 11:36
    
I am 100% sure about path of keystore and password in connector. –  Nazar Hussain Jun 18 '13 at 12:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.