Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consul HTTPS unix socket binds HTTP instead #16252

Closed
putz612 opened this issue Feb 14, 2023 · 1 comment · Fixed by #16301
Closed

Consul HTTPS unix socket binds HTTP instead #16252

putz612 opened this issue Feb 14, 2023 · 1 comment · Fixed by #16301

Comments

@putz612
Copy link

putz612 commented Feb 14, 2023

When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.

Overview of the Issue

In testing using unix sockets for connect envoy and consul I have come across that entering a unix socket for https results in a http socket instead.

Reproduction Steps

Steps to reproduce this issue, eg:

  1. Create a consul config supplying all the TLS goodies and add the https address section pointing to a unix socket. In my case I am using the consul docker container 1.14.4
    "addresses": {
        "grpc_tls" : "unix://consul/consul_grpc.sock",
        "http" : "unix://consul/consul_http.sock",
        "https" : "unix://consul/consul_https.sock"
    },
  1. Configure consul connect to connect to the socket using environment vars
      - CONSUL_HTTP_ADDR=unix://consul/consul_https.sock
      - CONSUL_HTTP_SSL=true
  1. View error
    us-consul-gateway | Error registering service "gateway-us": Put "https://consul%2Fconsul_https.sock/v1/agent/service/register": http: server gave HTTP response to HTTPS client

Consul info for both Client and Server

Client info
# consul info
agent:
	check_monitors = 0
	check_ttls = 0
	checks = 1
	services = 1
build:
	prerelease =
	revision = dae670fe
	version = 1.14.4
	version_metadata =
consul:
	acl = enabled
	known_servers = 1
	server = false
runtime:
	arch = arm64
	cpu_count = 2
	goroutines = 98
	max_procs = 2
	os = linux
	version = go1.19.4
serf_lan:
	coordinate_resets = 0
	encrypted = true
	event_queue = 0
	event_time = 2
	failed = 0
	health_score = 0
	intent_queue = 0
	left = 0
	member_time = 25
	members = 2
	query_queue = 0
	query_time = 1

Operating system and Environment details

Mac OS using docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants