caddy-tailscale icon indicating copy to clipboard operation
caddy-tailscale copied to clipboard

Error no certificate

Open doronkatz opened this issue 10 months ago • 1 comments
trafficstars

Hi So building and running I get the following error:

‘’’ 5/01/04 22:00:04.963 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "..."} 2025/01/04 22:00:04.963 DEBUG tls.handshake no certificate matching TLS ClientHello {"remote_ip": "100.120.244.83", "remote_port": "50119", "server_name": "anonymized-hostname.tail7c7620.ts.net", "remote": "100.120.244.83:50119", "identifier": "anonymized-hostname.tail7c7620.ts.net", "cipher_suites": [51914, 4865, 4866, 4867], "cert_cache_fill": 0, "load_or_obtain_if_necessary": true, "on_demand": false} 2025/01/04 22:00:05.111 DEBUG events event {"name": "tls_get_certificate", "id": "fecb31d0-b5fd-4e54-9572-4218feed14d8", "origin": "tls", "data": {"client_hello":{"CipherSuites":[47802,4865,4866,4867,49196,49195,52393,49200,49199,52392,49162,49161,49172,49171,157,156,53,47,49160,49170,10],"ServerName":"anonymized-hostname.tail7c7620.ts.net","SupportedCurves":[35466,29,23,24,25],"SupportedPoints":"AA==","SignatureSchemes":[1027,2052,1025,1283,2053,2053,1281,2054,1537,513],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[31354,772,771,770,769],"RemoteAddr":{"IP":"100.120.244.83","Port":49412,"Zone":""},"LocalAddr":{"IP":"100.113.130.43","Port":443,"Zone":""}}}} 2025/01/04 22:00:05.111 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "anonymized-hostname.tail7c7620.ts.net"} 2025/01/04 22:00:05.111 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": ".tail7c7620.ts.net"} 2025/01/04 22:00:05.111 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "..ts.net"} 2025/01/04 22:00:05.111 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "...net"} 2025/01/04 22:00:05.111 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "..."} 2025/01/04 22:00:05.111 DEBUG tls.handshake no certificate matching TLS ClientHello {"remote_ip": "100.120.244.83", "remote_port": "49412", "server_name": "anonymized-hostname.tail7c7620.ts.net", "remote": "100.120.244.83:49412", "identifier": "anonymized-hostname.tail7c7620.ts.net", "cipher_suites": [47802, 4865, 4866, 4867, 49196, 49195, 52393, 49200, 49199, 52392, 49162, 49161, 49172, 49171, 157, 156, 53, 47, 49160, 49170, 10], "cert_cache_fill": 0, "load_or_obtain_if_necessary": true, "on_demand": false} 2025/01/04 22:00:05.112 DEBUG http.stdlib http: TLS handshake error from 100.120.244.83:49412: no certificate available for 'anonymized-hostname.tail7c7620.ts.net' ‘’’

my caddy file is: ‘’’

hostname.tail7c7620.ts.net { reverse_proxy localhost:3000 }

‘’’

doronkatz avatar Jan 04 '25 22:01 doronkatz

If you're trying to have caddy listen on your tailnet, then it looks like you are missing the bind directive documented here. So you should have something like:

hostname.tail7c7620.ts.net {
    bind tailscale/
    reverse_proxy localhost:3000
}

willnorris avatar Feb 11 '25 22:02 willnorris