title: Hashicorp Vault Error: Error checking seal status
body: <p>I am working on generating self-signed certificates with Hashicorp vault and successfully generated the CA certificate, issuing ca, ca-chain and private keys using these links below:
  <a href="https://learn.hashicorp.com/vault/identity-access-management/iam-policies" rel="noreferrer">Policies</a>, <a href="https://learn.hashicorp.com/vault/secrets-management/sm-pki-engine#step-1-generate-root-ca" rel="noreferrer">Build Your Certificate</a>. I'm also able to import the resultant <code>.pem</code> which is the combination of the certificate, issuingCa, caChain and privateKey file into a Java keystore successfully with <code>keytool</code> to get a <code>.jks</code>.
  <br />So, I start vault successfully using this command <code>vault server -config=config.hcl</code> with the output below:</p>
  <pre><code>==&gt; Vault server configuration:
  
               Api Address: https://test.sammy.com:8200
                       Cgo: disabled
           Cluster Address: https://test.sammy.com:8201
                Listener 1: tcp (addr: &quot;127.0.0.1:9000&quot;, cluster address: &quot;127.0.0.1:9001&quot;, max_request_duration: &quot;1m30s&quot;, max_request_size: &quot;33554432&quot;, tls: &quot;disabled&quot;)
                Listener 2: tcp (addr: &quot;127.0.0.1:8200&quot;, cluster address: &quot;127.0.0.1:8201&quot;, max_request_duration: &quot;1m30s&quot;, max_request_size: &quot;33554432&quot;, tls: &quot;enabled&quot;)
                 Log Level: info
                     Mlock: supported: true, enabled: true
             Recovery Mode: false
                   Storage: inmem
                   Version: Vault v1.4.2
  
  ==&gt; Vault server started! Log data will stream in below:
  
  2020-06-28T23:37:01.489+0100 [INFO]  proxy environment: http_proxy= https_proxy= no_proxy=
  </code></pre>
  <p>using the configuration file <code>config.hcl</code> (shown below) from this StackOverflow <a href="https://stackoverflow.com/questions/36677778/hashicorp-vault-unrecognized-ssl-message-plaintext-connection">question</a>:</p>
  <pre><code>backend &quot;inmem&quot; {}
  
  listener &quot;tcp&quot; {
    address = &quot;127.0.0.1:9000&quot;
    tls_disable = 1
  }
  
  listener &quot;tcp&quot; {
    address = &quot;127.0.0.1:8200&quot;
    tls_disable = 0
    tls_cert_file = &quot;/Vault/pki_ca_cert_chain.pem&quot;
    tls_key_file = &quot;Vault/vault.key.pem&quot;
  }
  
  # Advertise the non-loopback interface
  api_addr = &quot;https://test.sammy.com:8200&quot;
  cluster_addr = &quot;https://test.sammy.com:8201&quot;
  </code></pre>
  <p>I use this command to expose the server address:<code>export VAULT_ADDR='https://test.sammy.com:8200'</code>.
  <br />The issues I've got now are, when I run this command to view the server status <code>vault status</code>, I get the error below:</p>
  <pre><code>Error checking seal status: Get https://test.sammy.com:8200/v1/sys/seal-status: dial tcp 45.33.2.79:8200: connect: no route to host
  </code></pre>
  <p>My Spring Boot application picks the truststore file up but throws this exception at runtime:
  <code>I/O exception (java.net.NoRouteToHostException) caught when processing request to {s}-&gt;https://test.sammy.com:8200: No route to host (Host unreachable)</code> or simply, <code>Caused by: java.net.NoRouteToHostException: No route to host (Host unreachable)</code>. My bootstrap.yml looks like this</p>
  <pre><code>spring:
    application:
      name: hashicorp-spring-app
    cloud:
      vault:
        enabled: true
        host: test.sammy.com
        port: 8200
        scheme: https
        authentication: cert
        ssl:
          trust-store: classpath:vault-truststore.jks
          trust-store-password: somethingsecret
  </code></pre>
  <p><br />I get a different error when I try to initialize vault using this command:<code>vault operator init</code></p>
  <pre><code>Error initializing: Put https://test.sammy.com:8200/v1/sys/init: dial tcp 45.79.19.196:8200: i/o timeout
  </code></pre>
  <p>I've tried this <a href="https://github.com/hashicorp/vault/issues/2944" rel="noreferrer">link</a> to fix it but, I still get the I/O timeout error above. I'm quite sure I've missed something possibly simple and have combed the internet to find a straightforward solution for this but can't seem to find any so please, any help will be appreciated!!!</p>