Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-2006, 04:48 PM
dcm dcm is offline
Member
 
Posts: 11
Default SSL problems

For a couple of reasons, I decided to use a commercial SSL certificate from godaddy instead of the self-signed certificate that was created during the install.

I found this page: http://wiki.zimbra.com/index.php?tit...l_Certificates and followed the instructions for godaddy certificate at the bottom of the page. Everything seemed to be going fine all the way up until I restarted tomcat. I ran 'tomcat restart' and it took awhile but didn't give me any errors. 'zmcontrol status', however, is showing that tomcat is down. I tried 'zmcontrol stop' and 'zmcontrol start' and got the same results.

I copied the old /opt/zimbra/apache-tomcat-5.5.15/conf/keystore back into place and it started back up fine.

I then found a couple of posts that said that I needed to run this:

keytool -delete -alias tomcat -keystore /opt/zimbra/tomcat/conf/keystore -storepass zimbra
keytool -delete -alias my_ca -keystore /opt/zimbra/tomcat/conf/keystore -storepass zimbra

Both said they had an error running the second command. One said the error was "Alias my_ca does not exist", which is the same error I saw when I ran the command. A couple of questions about this:
1. Am I supposed to be replacing my_ca with something else? If so, what?
2. Are these commands just modifying something in the file /opt/zimbra/tomcat/conf/keystore? If so and I am replacing that file with a new one, is it even necessary to run those commands?

Finally, since tomcat is failing to start up, what log file do I look in to see what errors are causing the problem. I didn't see anything obvious in /opt/zimbra/tomcat/logs/

Any help or suggestions would be greatly appreciated.

dcm
Reply With Quote
  #2 (permalink)  
Old 09-06-2006, 05:06 PM
Zimbra Employee
 
Posts: 2,103
Default

Quote:
Originally Posted by dcm
I then found a couple of posts that said that I needed to run this:

keytool -delete -alias tomcat -keystore /opt/zimbra/tomcat/conf/keystore -storepass zimbra
keytool -delete -alias my_ca -keystore /opt/zimbra/tomcat/conf/keystore -storepass zimbra

Both said they had an error running the second command. One said the error was "Alias my_ca does not exist", which is the same error I saw when I ran the command. A couple of questions about this:
1. Am I supposed to be replacing my_ca with something else? If so, what?
2. Are these commands just modifying something in the file /opt/zimbra/tomcat/conf/keystore? If so and I am replacing that file with a new one, is it even necessary to run those commands?
The second command should read
keytool -delete -alias my_ca -keystore /opt/zimbra/java/jre/lib/security/cacerts -storepass changeit

but you shouldn't need to run it.
Quote:
Finally, since tomcat is failing to start up, what log file do I look in to see what errors are causing the problem. I didn't see anything obvious in /opt/zimbra/tomcat/logs/

Any help or suggestions would be greatly appreciated.

dcm
/opt/zimbra/tomcat/logs/catalina.out

Chances are that your keypass or storepass is wrong (both should be zimbra) or your keystore is just fubar - did you import the godaddy cert into the same keystore you used to create the cert request? DId you import the godaddy root and intermediate certs?
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #3 (permalink)  
Old 09-06-2006, 05:22 PM
dcm dcm is offline
Member
 
Posts: 11
Default

OK, I see an error in catalina.out. It does look like it is a password problem. When I was going through the steps to create the csr, etc., I did use a different password. Does that mean that I have to go back and have godaddy reisue the certificate or can I change that stuff after the fact?

Thanks,

dcm
Reply With Quote
  #4 (permalink)  
Old 09-11-2006, 07:30 AM
Senior Member
 
Posts: 72
Default

I think I'm going to have the same problem, I generated my ssl cert with

openssl req -new -newkey rsa:1024 -nodes -subj '/CN=myhost.domain.com/O=My Company/C=US/ST=Alabama/L=Birmingham' -keyout webmail1.pem -out webmail1.pem

If this is going to cause a problem, is there a way to fix this so that I can use the already generated (and submitted) certificate?

Thanks,
Kyle
Reply With Quote
  #5 (permalink)  
Old 09-11-2006, 02:29 PM
dcm dcm is offline
Member
 
Posts: 11
Default

I re-keyed mine and everything is fine now.

dcm
Reply With Quote
  #6 (permalink)  
Old 09-13-2006, 10:59 AM
Senior Member
 
Posts: 72
Default

Will I need to run
keytool -delete -alias tomcat -keystore /opt/zimbra/tomcat/conf/keystore -storepass zimbra

before generating my new certificate? I get
keytool error: java.lang.Exception: Key pair not generated, alias <tomcat> already exists

When I try to generate it without running that, I just want to be sure I'm not going to break the existing self-signed ssl cert.

Thanks,
kyle

Last edited by kechols; 09-13-2006 at 12:58 PM.. Reason: had the wrong command in my clipboard Ooops ! :D
Reply With Quote
  #7 (permalink)  
Old 09-13-2006, 11:52 AM
dcm dcm is offline
Member
 
Posts: 11
Default

I think I just renamed my current commercial.csr and commercial.keystore files and my .crt file and then stated over.

dcm
Reply With Quote
  #8 (permalink)  
Old 07-26-2007, 02:17 PM
Junior Member
 
Posts: 9
Default

I'm trying to get a GeoTrust certificate installed onto my Zimbra server.

In my haste to acquire the cert, I generated the CSR using openssl, rather than keytool, as kechols seems to have done. I have now a CSR, key, and certificate.

I backed up and then deleted tomcat/conf/keystore. I successfully executed:
Code:
keytool -import -alias tomcat -keystore /opt/zimbra/tomcat/conf/keystore -trustcacerts -file my.crt -storepass zimbra
`tomcat restart` does not produce any errors, but HTTPS communication to the Zimbra server is not functional.

I tried using the java tool provided in this thread to generate a new keystore, but I got the following error:
Quote:
[root@mail zimbra]# ./java/bin/java -cp /opt/zimbra/java/lib/tools.jar:. AddCertToKeystore
Exception in thread "main" java.io.IOException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.net.ssl.internal.ssl.PKCS12KeyStore.engine Load(PKCS12KeyStore.java:1275)
at java.security.KeyStore.load(KeyStore.java:1150)
at AddCertToKeystore.main(AddCertToKeystore.java:18)
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
at com.sun.crypto.provider.SunJCE_ac.b(DashoA12275)
at com.sun.crypto.provider.PKCS12PBECipherCore$PBEWit hSHA1AndRC2_40.engineDoFinal(DashoA12275)
at javax.crypto.Cipher.doFinal(DashoA12275)
at com.sun.net.ssl.internal.ssl.PKCS12KeyStore.engine Load(PKCS12KeyStore.java:1272)
... 2 more
How can I make use of the certificate we have purchased?
Reply With Quote
  #9 (permalink)  
Old 07-31-2007, 09:34 PM
Former Zimbran
 
Posts: 5,606
Default

Take a look at this thread:
SSL Certificate Problems - ZimbraWiki

and see if that helps.
Reply With Quote
  #10 (permalink)  
Old 08-01-2007, 06:16 AM
Junior Member
 
Posts: 9
Default

Thanks for the link, jholder. Unfortunately, none of the information in that wiki page is relevant to the problem I described. I'm not using a self-signed certificate.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.