# Vault failed to start

**URL:** <https://discuss.hashicorp.com/t/vault-failed-to-start/2529>\
**Category:** Vault\
**Created:** [August 23, 2019, 4:34am UTC](https://discuss.hashicorp.com/t/vault-failed-to-start/2529 "2019-08-23T04:34:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rinshad](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/rinshad/32/1954_2.png) [@Rinshad](https://discuss.hashicorp.com/u/Rinshad)\
**Post date:** [August 23, 2019, 4:34am UTC](https://discuss.hashicorp.com/t/vault-failed-to-start/2529/1 "2019-08-23T04:34:38Z")

</div>

Hello,

I am getting below error when initing vault.

$ sudo vault operator init

Error initializing: Put [https://127.0.0.1:8200/v1/sys/init:](https://127.0.0.1:8200/v1/sys/init:) dial tcp 127.0.0.1:8200: connect: connection refused

My configuration file details.  
$ cat /usr/local/etc/vault/vault\_s1.hcl  
listener “tcp” {  
address = “0.0.0.0:8200”  
cluster\_address = “0.0.0.0:8201”  
tls\_disable = “true”  
}

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

    api_addr = "http://10.1.1.4:8200"
    cluster_addr = "https://10.1.1.4:8201"

```

I have one Vault node and one consul node

$ cat /usr/local/etc/consul/client\_agent.json  
{  
“server”: false,  
“datacenter”: “dc1”,  
“node\_name”: “consul\_c1”,  
“data\_dir”: “/consul/client-data”,  
“bind\_addr”: “10.1.1.4”,  
“client\_addr”: “127.0.0.1”,  
“retry\_join”: [“10.1.1.5”],  
“log\_level”: “DEBUG”,  
“enable\_syslog”: true,  
“acl\_enforce\_version\_8”: false  
}

Disabled firewall and confirmed vault and consul service is running.  
can someone help me with this?

Regards

---

<div class="post-metadata">

**Author:** ![mgaffney](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/mgaffney/32/1169_2.png) [@mgaffney](https://discuss.hashicorp.com/u/mgaffney)\
**Post date:** [August 24, 2019, 2:35pm UTC](https://discuss.hashicorp.com/t/vault-failed-to-start/2529/2 "2019-08-24T14:35:20Z")

</div>

Hi Rinshad,

It looks like the command is using the default vault address but you have tls disabled so the address should be `http://127.0.0.1:8200`. Try setting the environment variable `export VAULT_ADDR=http://127.0.0.1:8200` or using the command line option `vault operator init -address=http://127.0.0.1:8200`.

---

<div class="post-metadata">

**Author:** ![Rinshad](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/rinshad/32/1954_2.png) [@Rinshad](https://discuss.hashicorp.com/u/Rinshad)\
**Post date:** [August 26, 2019, 9:37am UTC](https://discuss.hashicorp.com/t/vault-failed-to-start/2529/3 "2019-08-26T09:37:16Z")

</div>

Executed the same but no luck.  
export VAULT\_ADDR=http://127.0.0.1:8200  
~$ sudo vault status

Error checking seal status: Get [https://127.0.0.1:8200/v1/sys/seal-status:](https://127.0.0.1:8200/v1/sys/seal-status:) dial tcp 127.0.0.1:8200: connect: connection refused

---

<div class="post-metadata">

**Author:** ![mgaffney](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/mgaffney/32/1169_2.png) [@mgaffney](https://discuss.hashicorp.com/u/mgaffney)\
**Post date:** [August 26, 2019, 1:08pm UTC](https://discuss.hashicorp.com/t/vault-failed-to-start/2529/4 "2019-08-26T13:08:39Z")

</div>

On my machine, if I run  
`export VAULT_ADDR=http://127.0.0.1:8200`  
`~$ sudo env`  
The `VAULT_ADDR` variable is not set. So, can you try running the vault command without using sudo?

---

<div class="post-metadata">

**Author:** ![DevOpsRob](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/devopsrob/32/1607_2.png) [@DevOpsRob](https://discuss.hashicorp.com/u/DevOpsRob)\
**Post date:** [August 27, 2019, 2:49pm UTC](https://discuss.hashicorp.com/t/vault-failed-to-start/2529/5 "2019-08-27T14:49:23Z")

</div>

Hi Rinshad

Sounds crazy but is the vault service running? If i set the vault address correctly with the tls options disabled, normally the only reason i get a connection refused is if the vault service had trouble starting up.

In my experience, if the vault address variable isn’t set and you disable tls, the error message you normally get is something olong the lines of “recieved a http response from a https server”.

---

<div class="post-metadata">

**Author:** ![unfor19](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/unfor19/32/5199_2.png) [@unfor19](https://discuss.hashicorp.com/u/unfor19)\
**Post date:** [March 9, 2020, 2:25pm UTC](https://discuss.hashicorp.com/t/vault-failed-to-start/2529/6 "2020-03-09T14:25:02Z")

</div>

This did the trick

```bash
vault operator init -address=http://127.0.0.1:8200

```

Thanks

---

<div class="post-metadata">

**Author:** ![rcdmoreno](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/rcdmoreno/32/11046_2.png) [@rcdmoreno](https://discuss.hashicorp.com/u/rcdmoreno)\
**Post date:** [August 27, 2020, 4:11pm UTC](https://discuss.hashicorp.com/t/vault-failed-to-start/2529/7 "2020-08-27T16:11:42Z")

</div>

vault status  
Error checking seal status: Get “[https://127.0.0.1:8200/v1/sys/seal-status](https://127.0.0.1:8200/v1/sys/seal-status)”: dial tcp 127.0.0.1:8200: connect: connection refused

I can’t check status server vault server configuartion as node in Consul.

everyone can help me!!

---

<div class="post-metadata">

**Author:** ![hellowahab](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/hellowahab/32/14722_2.png) [@hellowahab](https://discuss.hashicorp.com/u/hellowahab)\
**Post date:** [November 16, 2020, 8:46am UTC](https://discuss.hashicorp.com/t/vault-failed-to-start/2529/8 "2020-11-16T08:46:30Z")

</div>

The probable reason for getting connection refused is that the Vault Server is not up and running.  
Try grapping the specific process using  
netstat -ant |grep 8200  
if the vault is running on the above port.  
One more thing is that vault for dev initially get started without background mode or demon mode so you need to have two terminals open one for keep the server running and second to execute the commands
