title: keytool error: java.lang.Exception: Failed to establish chain from reply
body: <p>Generate keystore:</p>
  
  <pre><code>keytool -genkey -alias tomcat -keyalg RSA -keystore my.keystore -keysize 2048
  </code></pre>
  
  <p>Generate certificate signing request (CSR):</p>
  
  <pre><code>keytool -certreq -alias tomcat -keyalg RSA -file my.csr -keystore my.keystore
  </code></pre>
  
  <p>I then go off to my hosting provider and get some certificates. These i installed as follows:</p>
  
  <pre><code>keytool -import -alias root -keystore my.keystore -trustcacerts -file gd_bundle-g2-g1.crt
  keytool -import -alias intermed -keystore my.keystore -trustcacerts -file gdig2.crt
  keytool -import -alias tomcat -keystore my.keystore -trustcacerts -file my.crt
  </code></pre>
  
  <p>When I installed the final certificate (my.crt) I got the following error:</p>
  
  <pre><code>keytool error: java.lang.Exception: Failed to establish chain from reply
  </code></pre>
  
  <p>I believe i have imported the chain and in the correct order so I'm very confused by this message. Can anyone see what I'm doing wrong?</p>