Consul config file format, where is the mistake

Hello, I really confused about configuration files. I have configuration file below, and I am still getting warnings like ; any suggestion, correction would be perfect for me.
[WARN] agent: The ‘ui’ field is deprecated. Use the ‘ui_config.enabled’ field instead.
[WARN] agent.auto_config: The ‘ui’ field is deprecated. Use the ‘ui_config.enabled’ field instead
[WARN] agent: bootstrap = true: do not enable unless necessary

I changed for example config enabled like in my configuration file, its not reading. Also kv_max_value_size still giving error at 512kb, cannot read from my configuration.

I am starting my configuration with command below;
consul agent -config-file=/etc/consul.d/server.hcl

{
    "node_name": "myserver_name",
    "advertise_addr": "192.168.1.1",
    "bind_addr": "0.0.0.0",
    "client_addr": "192.168.1.1",
    "server": true,
    "ui": true,
    "bootstrap": true,
    "datacenter": "MyConsulSRV",
    "data_dir": "/opt/consulserver/",
    "log_level": "DEBUG",
    "enable_syslog": true,
    "rejoin_after_leave": true,
    "enable_local_script_checks": true
    "limits": {
     "kv_max_value_size": 999999
     }

"ui_config": {
  "enabled": true
}
"acl": {
  "enabled": true,
  "default_policy: deny,
  "enable_token_persistence: true
}
}

First of all it’s not HCL, but json.
Second: delete the line

"ui": true

as mentioned in the depreciation warning.
Third, before your entry

"limits": {
     "kv_max_value_size": 999999
 }

there is missing a comma at the end of

"enable_local_script_checks": true

Maybe that’s why it’s not recognized.

2 Likes

Ok, everything clear now. Thank you so much. I didn’t realize that hcl supports json format, and i did mistakes on json formatting, making corrections worked well.

1 Like