1. My Caddy version (caddy version
):
caddy v2 beta (docker caddy/caddy)
2. How I run Caddy:
Kubernetes plugin
a. System environment:
docker + kubernetes/kubelet
d. My complete Caddyfile or JSON config:
http://
log {
level DEBUG
}
#tls internal {
# alpn h2
# on_demand
#}
bind unix//csi/caddy.sock
reverse_proxy unix//csi/csi.sock {
header_up Host localhost
#transport grpc
}
3. The problem I’m having:
the golang-gRPC client is connecting directly over UDS
It requires only http2 unencrypted
There is no option to force http2 and unencrypted.
4. Error messages and/or full log output:
{"level":"info","ts":1585819933.9361951,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"info","ts":1585819933.9576204,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["localhost:2019"]}
2020/04/02 09:32:13 [INFO][cache:0xc000156280] Started certificate maintenance routine
{"level":"info","ts":1585819933.957991,"logger":"tls","msg":"cleaned up storage units"}
{"level":"info","ts":1585819933.9583864,"msg":"autosaved config","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1585819933.9583986,"msg":"serving initial configuration"}
{"level":"error","ts":1585819934.2176893,"logger":"http.log.error","msg":"net/http: HTTP/1.x transport connection broken: malformed HTTP response \"\\x00\\x00\\b\\a\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01\"","request":{"method":"PRI","uri":"*","proto":"HTTP/2.0","remote_addr":"@","host":"","headers":{}},"status":502,"err_id":"yu18fjish","err_trace":"reverseproxy.(*Handler).ServeHTTP (reverseproxy.go:363)"}
{"level":"error","ts":1585819934.2177327,"logger":"http.log.access.log0","msg":"handled request","request":{"method":"PRI","uri":"*","proto":"HTTP/2.0","remote_addr":"@","host":"","headers":{}},"common_log":"@ - - [02/Apr/2020:09:32:14 +0000] \"PRI * HTTP/2.0\" 502 0","latency":0.0306497,"size":0,"status":502,"resp_headers":{"Server":["Caddy"]}}
{"level":"error","ts":1585819934.2177327,"logger":"http.log.access.log0","msg":"handled request","request":{"method":"PRI","uri":"*","proto":"HTTP/2.0","remote_addr":"@","host":"","headers":{}},"common_log":"@ - - [02/Apr/2020:09:32:14 +0000] \"PRI * HTTP/2.0\" 502 0","latency":0.0306497,"size":0,"status":502,"resp_headers":{"Server":["Caddy"]}}
5. What I already tried:
tls internal {
alpn h2
on_demand
}