Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
This issue has already been observed and mentioned in https://github.com/hashicorp/consul/issues/16844. Since it's kind of separate, I think it's useful to outline and track this in a new issue.
Since https://github.com/hashicorp/consul/pull/16845 got merged single-node/dev setups of Consul don't work with systemd
out of the box any more. When running systemctl start consul systemd is just stuck and times out. Consul appears to start fine, but just systemd does not know that.
Online docs mention that the NOTIFY_SOCKET is only notified when a LAN join is completed and join or retry_join is set. Single node setups don't have that usually. Maybe it is related to that.
Overview of the Issue
This issue has already been observed and mentioned in https://github.com/hashicorp/consul/issues/16844. Since it's kind of separate, I think it's useful to outline and track this in a new issue.
Since https://github.com/hashicorp/consul/pull/16845 got merged single-node/dev setups of Consul don't work with systemd out of the box any more. When running
systemctl start consul
systemd is just stuck and times out. Consul appears to start fine, but just systemd does not know that.Online docs mention that the NOTIFY_SOCKET is only notified when a LAN join is completed and
join
orretry_join
is set. Single node setups don't have that usually. Maybe it is related to that.Workaround
systemctl edit consul
Reproduction Steps
Consul info for both Client and Server
Consul info
Output from 'consul info' command here ``` agent: check_monitors = 0 check_ttls = 0 checks = 0 services = 0 build: prerelease = revision = 192df66a version = 1.16.0 version_metadata = consul: acl = disabled bootstrap = true known_datacenters = 1 leader = true leader_addr = 10.0.2.15:8300 server = true raft: applied_index = 18 commit_index = 18 fsm_pending = 0 last_contact = 0 last_log_index = 18 last_log_term = 2 last_snapshot_index = 0 last_snapshot_term = 0 latest_configuration = [{Suffrage:Voter ID:525e7b31-91a1-1907-5715-d94bc31c73d2 Address:10.0.2.15:8300}] latest_configuration_index = 0 num_peers = 0 protocol_version = 3 protocol_version_max = 3 protocol_version_min = 0 snapshot_version_max = 1 snapshot_version_min = 0 state = Leader term = 2 runtime: arch = amd64 cpu_count = 2 goroutines = 167 max_procs = 2 os = linux version = go1.20.4 serf_lan: coordinate_resets = 0 encrypted = false event_queue = 1 event_time = 2 failed = 0 health_score = 0 intent_queue = 0 left = 0 member_time = 2 members = 1 query_queue = 0 query_time = 1 serf_wan: coordinate_resets = 0 encrypted = false event_queue = 0 event_time = 1 failed = 0 health_score = 0 intent_queue = 0 left = 0 member_time = 1 members = 1 query_queue = 0 query_time = 1 ``` HCL config ``` data_dir = "/opt/consul" server=true bootstrap_expect=1 ```Operating system and Environment details
Log Fragments
Consul log
SystemD Log