Windows Server - Vault.exe server -config=server.json

391 views
Skip to first unread message

Craig Irvin

unread,
Mar 31, 2017, 10:08:16 AM3/31/17
to Vault
I''m trying to figure out a basic configuration using JSON vs HCL and when I load the JSON file it gives an error of 

Error loading configuration from <Path>\Vault: Error loading <Path>\Vault\server.json: At 1:1: illegal char

The JSON validates if I load it in through PowerShell and/or use a JSON validator. This is what I am using:

{
 
"listener": {
                 
"tcp": {
                         
"address": "192.168.50.200:8200",
                         
"tls_disabled": true
                       
}
             
},
 
"storage": {
               
"file": {
                         
"path": "vault"
                       
}
             
}
}


the HCL i'm using is:

storage "file" {
  path
= "vault"
}


listener
"tcp" {
 address
= "192.168.50.200:8200"
 tls_disable
= 1
}


Is anyone able tell me what I'm doing wrong?
Message has been deleted

Craig Irvin

unread,
Mar 31, 2017, 10:11:21 AM3/31/17
to Vault
One thing to note is that I've tried this on Version 0.6.5 and 0.7.0


Jeff Mitchell

unread,
Mar 31, 2017, 1:04:20 PM3/31/17
to Vault
Hi Craig,

I found two issues:

1) The key is "tls_disable" not "tls_disabled" -- it's right in your HCL but not your JSON
2) The value for "tls_disable" is a string. In HCL we accept either but the JSON is stricter. So it needs to be "true" not true.

Best,
Jeff

On Fri, Mar 31, 2017 at 7:11 AM, Craig Irvin <irv...@gmail.com> wrote:
One thing to note is that I've tried this on Version 0.6.5 and 0.7.0


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/vault/issues
IRC: #vault-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Vault" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/8c9e738c-b1cf-49c6-9e2a-3281b15cff50%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Craig Irvin

unread,
Mar 31, 2017, 1:58:30 PM3/31/17
to Vault
Thanks Jeff for the fast reply. Here are the changes made but still getting a parsing error "Error loading configuration from D:\vault\server.json: At 1:1: illegal char"

I was using PowerShell $True / $False which is why it was being written the way it was so that was changed to just be a normal string.

{
   
"listener":  {
                     
"tcp":  {
                                 
"address":  "192.168.50.200:443",
                                 
"tls_disable":  "true"
                             
}
                 
},
   
"backend":  {
                   
"file":  {
                                 
"path":  "D:\\vault\\storage"
                             
}
               
}
}


On Friday, March 31, 2017 at 12:04:20 PM UTC-5, Jeff Mitchell wrote:
Hi Craig,

I found two issues:

1) The key is "tls_disable" not "tls_disabled" -- it's right in your HCL but not your JSON
2) The value for "tls_disable" is a string. In HCL we accept either but the JSON is stricter. So it needs to be "true" not true.

Best,
Jeff
On Fri, Mar 31, 2017 at 7:11 AM, Craig Irvin <irv...@gmail.com> wrote:
One thing to note is that I've tried this on Version 0.6.5 and 0.7.0


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/vault/issues
IRC: #vault-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Vault" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+...@googlegroups.com.

Jeff Mitchell

unread,
Mar 31, 2017, 4:56:26 PM3/31/17
to Vault
Hi Craig,

I can't replicate that error on my (non-Windows) system using the config file you pasted. Any chance it's a newline thing?

Best,
Jeff

To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/57399ba6-df6d-487e-bac0-1594f99adaac%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages