Unable to start consul RPI4

Hi,

I used ansible community consul role to install consul.

But this time, with latest 1.10.2, consul server/agent doesn’t start on my single RPI4.

This is my config.json:

{
    "addresses": {
        "dns": "0.0.0.0",
        "grpc": "0.0.0.0",
        "http": "0.0.0.0",
        "https": "0.0.0.0"
    },
    "advertise_addr": "192.168.10.138",
    "advertise_addr_wan": "192.168.10.138",
    "bootstrap": true,
    "bootstrap_expect": 1,
    "bind_addr": "192.168.10.138",
    "client_addr": "127.0.0.1",
    "data_dir": "/var/consul",
    "datacenter": "dc1",
    "disable_update_check": false,
    "domain": "consul",
    "enable_local_script_checks": false,
    "enable_script_checks": false,
    "encrypt": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "encrypt_verify_incoming": true,
    "encrypt_verify_outgoing": true,
    "log_file": "/var/log/consul/consul.log",
    "log_level": "DEBUG",
    "log_rotate_bytes": 0,
    "log_rotate_duration": "24h",
    "log_rotate_max_files": 0,
    "performance": {
        "leave_drain_time": "5s",
        "raft_multiplier": 1,
        "rpc_hold_timeout": "7s"
    },
    "ports": {
        "dns": 8600,
        "grpc": 8502,
        "http": 8500,
        "https": -1,
        "serf_lan": 8301,
        "serf_wan": 8302,
        "server": 8300
    },
    "raft_protocol": 3,
    "retry_interval": "30s",
    "retry_interval_wan": "30s",
    "retry_max": 0,
    "retry_max_wan": 0,
    "server": true,
    "translate_wan_addrs": false,
    "connect": {
         "enable": true
    },
    "ui_config": {
            "enable": true,
            "metrics_provider": "prometheus"
    }
}

I log file:

2021-09-03T07:19:44.536Z [WARN]  agent: BootstrapExpect is set to 1; this is the same as Bootstrap mode.
2021-09-03T07:19:44.536Z [WARN]  agent: bootstrap = true: do not enable unless necessary

But no more.

When I remove:

    "bootstrap": true,
    "bootstrap_expect": 1,

I have this error:

2021-09-03T06:32:58.965Z [WARN]  agent.router.manager: No servers available
2021-09-03T06:32:58.965Z [ERROR] agent.anti_entropy: failed to sync remote state: error="No known Consul servers"

I don’t know what I can do.
Sorry and thanks,

Hi, The first error you pasted in:

2021-09-03T07:19:44.536Z [WARN]  agent: BootstrapExpect is set to 1; this is the same as Bootstrap mode.
2021-09-03T07:19:44.536Z [WARN]  agent: bootstrap = true: do not enable unless necessary

Are warnings about bootstrap, You can just remove "bootstrap": true and that might disappear. You can’t do the example 2 you have of:

2021-09-03T06:32:58.965Z [WARN]  agent.router.manager: No servers available
2021-09-03T06:32:58.965Z [ERROR] agent.anti_entropy: failed to sync remote state: error="No known Consul servers"

Because you need a boostrap server to start. Are there any other errors you are receiving with the first example because again those are warnings and should not prevent the agent from starting in server mode.

Thanks!

It works with this:

{
    "addresses": {
        "dns": "0.0.0.0",
        "grpc": "0.0.0.0",
        "http": "0.0.0.0",
        "https": "0.0.0.0"
    },
    "advertise_addr": "192.168.10.138",
    "advertise_addr_wan": "192.168.10.138",
    "bind_addr": "192.168.10.138",
    "client_addr": "127.0.0.1",
    "data_dir": "/opt/consul",
    "datacenter": "dc1",
    "disable_update_check": false,
    "domain": "consul",
    "enable_local_script_checks": false,
    "enable_script_checks": false,
    "encrypt": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "encrypt_verify_incoming": true,
    "encrypt_verify_outgoing": true,
    "log_file": "/var/log/consul/consul.log",
    "log_level": "INFO",
    "log_rotate_bytes": 0,
    "log_rotate_duration": "24h",
    "log_rotate_max_files": 0,
    "performance": {
        "leave_drain_time": "5s",
        "raft_multiplier": 1,
        "rpc_hold_timeout": "7s"
    },
    "ports": {
        "dns": 8600,
        "grpc": -1,
        "http": 8500,
        "https": -1,
        "serf_lan": 8301,
        "serf_wan": 8302,
        "server": 8300
    },
    "raft_protocol": 3,
    "retry_interval": "30s",
    "retry_join": [],
    "retry_max": 0,
    "bootstrap": true,
    "server": true,
    "translate_wan_addrs": false,
    "ui_config": {
        "enabled": true
     }
}