Port 8500 required for HTTP Unix Domain Socket


Just thought I’d note what seemed like an odd thing.

I wanted Consul to use both HTTP and HTTPS, with the HTTP listener only on a Unix domain socket. I got it working, but realized you must set http = 8500 in the ports block, even though that isn’t relevant with a Unix domain socket. Until you set the port, the socket file will not be created.

addresses {
  http  = "unix:///tmp/consul-agent.sock"
  https = ""

ports {
  http     = 8500
  https    = 8501
  grpc_tls = 8502
  grpc     = 8503

Hopefully if someone else is stumbling on this, I can save them some time!

Anyway, Consul is great!

Hi @zchtodd,

What version of Consul are you using? I did a quick test with the latest Consul version, and it works even without specifying the HTTP port.

ref: https://asciinema.org/a/T4h1fw0BVCngrs1WJkzhSbaNE

That’s interesting.

I’m using Consul v1.16.2.