consul
consul copied to clipboard
Consul on macOS Sequoia is unable to connect to server
Overview of the Issue
Experiencing that Consul on macOS Sequoia is actually not working completely since it is not able to establish a connection:
2024-09-17T09:04:48.507+0100 [WARN] agent: (LAN) couldn't join: number_of_nodes=0
error=
| 1 error occurred:
| \t* Failed to join 192.168.67.2:8301: dial tcp 192.168.67.2:8301: connect: no route to host
This only happens when the Consul is launched via launchctl
; but does not occur when launched via Terminal.
The problem looks to be related to the way Go linker works and the fact macOS Local Network Privacy is doing some filtering; and previous with macOS Sonoma it allowed the connections but Sequoia does not. This is also been reported under https://github.com/golang/go/issues/68678
The root cause is that Consul binary does not have the UUID set at link time, as there is for Nomad which causes the Local Network Privacy to drop the connection attempts:
$ dwarfdump --uuid /opt/homebrew/bin/consul
$ dwarfdump --uuid /opt/homebrew/bin/nomad
UUID: 7A0A50B8-59DC-309C-A1BE-51B591F285AA (arm64) /opt/homebrew/bin/nomad
Are you able to adjust the linker settings in order to make Consul work on Sequoia?
Reproduction Steps
Try to join Consul server on the local network when using launchctl.
Minimal example for showing the Go linking problem is also provided under https://github.com/golang/go/issues/68678
Consul info for both Client and Server
Consul v.1.19.2
Operating system and Environment details
macOS 15.0