HashiCorp Vault - Connect timed out

thelovelines
PRO

a year ago

Hello,

I'm having issues connecting to a HashiCorp Vault Service, from a Spring Boot Application. Wondering if someone had the same issue or if you can help.

Error: Caused by: org.apache.hc.client5.http.ConnectTimeoutException: Connect to https://[vault-railway-template-develop.up.railway.app](vault-railway-template-develop.up.railway.app):8200[[vault-railway-template-develop.up.railway.app](vault-railway-template-develop.up.railway.app)/34.32.135.56] failed: Connect timed out

Steps:

  1. I created the Vault from the existing template in railway.

  2. From Settings create a public domain

  3. Add that domain + http + port inside the variables VAULTADDR and VAULTAPI_ADDR (I tried to connect without this step, but I get the same error)

  4. Restart/Re-deploy the service

  5. Vault is UP&Running, I can connect to it from the browser and add my secrets

  6. In my spring boot application I've added the dependency in pom and in the .yml file the following configuration for vault: spring: cloud: vault: host: vault-railway-template-develop.up.railway.app port: 8200 scheme: https authentication: TOKEN token: MY_TOKEN kv: enabled: true config: import: vault://

  7. An additional information would be that I tried with http as well, but still the same error

  8. Run the app and get the error

Am I doing something wrong ? Do I need additional steps in order to connect ?

Thanks

0 Replies