1

I am trying to run hashicorp vault server as windows service in windows 10 system. Vault server UI is showing as blank screen. Please refer my configuration details.

config.hcl

ui = true

backend "consul" {
  address = "127.0.0.1:8500"
  path = "vault/"
}

listener "tcp" {
 address     = "127.0.0.1:8200"
 tls_disable = 1
 tls_cert_file = "c:/vault/config/certificate.crt"
 tls_key_file  = "c:/vault/config/privkey.key"
}

By default vault server is running in this (http://localhost:8200/ui/) local URL. When i navigate to this 8200 port , Blank ui screen is displayed.

Console log of Vault UI

But at the same time hashicorp vault server UI is loading if we run vault as container based application.

Windows service command I used to run vault service:

sc.exe create VaultAgent binPath= "C:\vault\vault.exe server -config=C:\vault\config\config.hcl" displayName= "Vault Agent" start= auto

Note: vault.exe is downloaded from vault windows amd64 version this url.

I am able to receive the response from vault server. Please refer the image. vault server backend response

Note: Consul service is up and running. Please refer the image. consul server up and running

How to bring up the Vault server UI up and running? Am i missing something.?

Note: Below are the Vault server UI console logs

unseal:1 Refused to execute script from 'https://localhost:8200/ui/assets/vendor-dd308e6ebdb070a5a829a0c0d6e74f61.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

unseal:1 Refused to execute script from 'https://localhost:8200/ui/assets/vault-8a8f62829e5ad33487e21f63af47c80d.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

unseal:1 Refused to execute script from 'https://localhost:8200/ui/sw-registration-1b862bc1e33e4a8a41781d56c3469209.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
V. Periyasamy
  • 99
  • 2
  • 10
  • Did you find a solution for this, I came across with this problem and can't find a solution – Nihat Mert Apr 15 '22 at 12:02
  • @NihatMert No, I couldn't find the solution. – V. Periyasamy Apr 17 '22 at 06:56
  • The root cause might be a bug in Vault, coupled with your browser enforcing strict MIME type checking. I bet that log is not coming from Vault, but from your browser. Try Firefox (if you are on Chrome/Opera/Edge) or vice-versa. – ixe013 Apr 18 '22 at 02:44
  • Let me confirm you by trying in Firefox. But same vault service is running when I make it as containerisation (docker). Same browser but no issues. – V. Periyasamy Apr 18 '22 at 04:00
  • In firefox also kind of same issue. Please refer the logs => The resource from “http://localhost:8200/ui/assets/vault-8a8f62829e5ad33487e21f63af47c80d.js” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff). None of the “sha512” hashes in the integrity attribute match the content of the subresource. ui The resource from “http://localhost:8200/ui/assets/vendor-dd308e6ebdb070a5a829a0c0d6e74f61.js” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff). – V. Periyasamy Apr 18 '22 at 04:53
  • 1
    @NihatMert As mentioned in below link, we are able to run the vault successfully. But this is not working with latest version of vault. Source url: https://github.com/hashicorp/vault/issues/13357 Download url: https://releases.hashicorp.com/vault/1.8.8/vault_1.8.8_windows_amd64.zip – V. Periyasamy Apr 28 '22 at 10:32
  • 1
    Well, I tried several versions (1.10.1, 1.9.5, 1.9.4) and still had the same problem. I jumped back to 1.6.7 and it worked out of the box (on PC). – Alexander Collins Apr 28 '22 at 13:31

1 Answers1

3

Latest version of the Hashicorp is having an bug and it is in opened stage. Please refer the url. GitHub issue link

So you can little go back with old version(1.8.8) of vault and try to run it as windows service and UI should be up and running.

Note: v 1.8.8 is having it's own feature and not having all the features of the latest vault version.

Download the 1.8.8 vault for windows

V. Periyasamy
  • 99
  • 2
  • 10