Hashicorp Vault 服务器 UI 加载空白屏幕

发布于 2025-01-21 02:14:08 字数 2009 浏览 4 评论 0原文

我正在尝试在 Windows 10 系统中将 hashicorpVault 服务器作为 Windows 服务运行。 Vault 服务器 UI 显示为空白屏幕。 请参考我的配置详细信息。

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"
}

默认情况下,Vault 服务器在此 (http://localhost:8200/ui/) 本地 URL 中运行。当我导航到这个 8200 端口时,会显示空白的用户界面屏幕。

Vault UI 的控制台日志

但如果我们运行 Vault,同时也会加载 hashicorpVault 服务器 UI作为基于容器的应用程序。

我用来运行Vault服务的Windows服务命令:

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

注意:vault.exe是从vault下载的Windows amd64 版本 此网址。

我能够收到来自 Vault 服务器的响应。请参考图片。 vault 服务器后端响应

注意: Consul 服务已启动并正在运行。请参考图片。 consul 服务器启动并运行

如何启动并运行 Vault 服务器 UI?我错过了什么吗?

注意:以下是 Vault 服务器 UI 控制台日志

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.

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ζ澈沫 2025-01-28 02:14:08

最新版本的 Hashicorp 有一个 bug,目前处于开放阶段。请参考网址。
GitHub 问题链接

所以你几乎无法返回旧版本(1.8.8)保管库并尝试将其作为 Windows 服务运行,并且 UI 应该已启动并运行。

注意:v 1.8.8 有它自己的功能,并不具有最新 Vault 版本的所有功能。

下载 Windows 版 1.8.8 保管库

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

千年*琉璃梦 2025-01-28 02:14:08

试图打开Vault UI时,我也遇到了同样的问题。

我缺少端口映射。使用以下命令,我能够成功运行图像和Vault UI。

docker run -d --rm --cap-add=IPC_LOCK --name vault-demo -p 8200:8200 -e 'VAULT_DEV_ROOT_TOKEN_ID=myroot' -e 'VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200' hashicorp/vault

I also faced same issue when trying to open vault UI.

I was missing the port mapping. Using below command i was able to run the image and vault UI successfully.

docker run -d --rm --cap-add=IPC_LOCK --name vault-demo -p 8200:8200 -e 'VAULT_DEV_ROOT_TOKEN_ID=myroot' -e 'VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:8200' hashicorp/vault
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文