Errors encountered when executing vault status

My configuration file looks like this:

root@docker-agent:~# cat /etc/vault.d/vault.hcl 
cluster_addr  = ""
api_addr      = ""
cluster_name  = "Vault-Test"
disable_mlock = true
ui            = true

listener "tcp" {
  address            = ""
  tls_cert_file      = "/root/vault/certs.d/vault-cert.pem"
  tls_key_file       = "/root/vault/certs.d/vault-key.pem"
  tls_client_ca_file = "/root/vault/certs.d/vault-ca.pem"

storage "raft" {
  path    = "/opt/vault/data"
  node_id = "node-1"

  retry_join {
    leader_tls_servername   = ""
    leader_api_addr         = ""
    leader_ca_cert_file     = "/root/vault/certs.d/vault-ca.pem"
    leader_client_cert_file = "/root/vault/certs.d/vault-cert.pem"
    leader_client_key_file  = "/root/vault/certs.d/vault-key.pem"

When I execute vault status, I get this error:

Error checking seal status: Get "": tls: failed to verify certificate: x509: cannot validate certificate for because it doesn't contain any IP SANs

Then I performed the following

export VAULT_ADDR=''
export VAULT_CAPATH='/root/vault/certs.d/vault-cert.pem'

It returns the correct result

root@docker-agent:~# vault status  
Key                Value
---                -----
Seal Type          shamir
Initialized        false
Sealed             true
Total Shares       0
Threshold          0
Unseal Progress    0/0
Unseal Nonce       n/a
Version            1.15.6
Build Date         2024-02-28T17:07:34Z
Storage Type       raft
HA Enabled         true

I don’t want to use export at the moment, what should I do?

Accept that you have to? Or generate a new vault server certificate that does have IP SAN for

So far my problem has been solved