Caddy not working as a reverse proxy: (dial tcp 192.168.0.69:2283: i/o timeout)

1. The problem I’m having:

I have set up Caddy as a simple reverse proxy, using the template on the immich website + the debug option.
the problem is that when i try to connect to the server, it just shows a blank screen. The server works fine through the local ip.
Any extra info is in the logs.

2. Error messages and/or full log output:

2024/05/07 23:13:47.041	DEBUG	events	event	{"name": "tls_get_certificate", "id": "2b5a7e02-af81-40f1-a997-60e70feec4b2", "origin": "tls", "data": {"client_hello":{"CipherSuites":[4866,4867,4865,4868,49196,49200,52393,52392,49325,49195,49199,49324,49187,49191,49162,49172,49161,49171,157,49309,156,49308,61,60,53,47,159,52394,49311,158,49310,107,103,57,51,255],"ServerName":"arnaud.click","SupportedCurves":[29,23,30,25,24,256,257,258,259,260],"SupportedPoints":"AAEC","SignatureSchemes":[1027,1283,1539,2055,2056,2057,2058,2059,2052,2053,2054,1025,1281,1537,771,769],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[772,771],"RemoteAddr":{"IP":"192.168.1.1","Port":46512,"Zone":""},"LocalAddr":{"IP":"192.168.1.69","Port":443,"Zone":""}}}}
2024/05/07 23:13:47.041	DEBUG	tls.handshake	choosing certificate	{"identifier": "arnaud.click", "num_choices": 1}
2024/05/07 23:13:47.041	DEBUG	tls.handshake	default certificate selection results	{"identifier": "arnaud.click", "subjects": ["arnaud.click"], "managed": true, "issuer_key": "acme-v02.api.letsencrypt.org-directory", "hash": "ac55dc871ad22ccee803544ca077586571c6db3d55fba0df1f9897ee7812361f"}
2024/05/07 23:13:47.042	DEBUG	tls.handshake	matched certificate in cache	{"remote_ip": "192.168.1.1", "remote_port": "46512", "subjects": ["arnaud.click"], "managed": true, "expiration": "2024/08/04 19:46:20.000", "hash": "ac55dc871ad22ccee803544ca077586571c6db3d55fba0df1f9897ee7812361f"}
2024/05/07 23:13:47.057	DEBUG	http.handlers.reverse_proxy	selected upstream	{"dial": "192.168.0.69:2283", "total_upstreams": 1}
2024/05/07 23:13:50.058	DEBUG	http.handlers.reverse_proxy	upstream roundtrip	{"upstream": "192.168.0.69:2283", "duration": 3.00075228, "request": {"remote_ip": "192.168.1.1", "remote_port": "46512", "client_ip": "192.168.1.1", "proto": "HTTP/2.0", "method": "GET", "host": "arnaud.click", "uri": "/", "headers": {"X-Forwarded-Host": ["arnaud.click"], "User-Agent": ["curl/8.2.1"], "Accept": ["*/*"], "X-Forwarded-For": ["192.168.1.1"], "X-Forwarded-Proto": ["https"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4867, "proto": "h2", "server_name": "arnaud.click"}}, "error": "dial tcp 192.168.0.69:2283: i/o timeout"}
2024/05/07 23:13:50.059	ERROR	http.log.error	dial tcp 192.168.0.69:2283: i/o timeout	{"request": {"remote_ip": "192.168.1.1", "remote_port": "46512", "client_ip": "192.168.1.1", "proto": "HTTP/2.0", "method": "GET", "host": "arnaud.click", "uri": "/", "headers": {"Accept": ["*/*"], "User-Agent": ["curl/8.2.1"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4867, "proto": "h2", "server_name": "arnaud.click"}}, "duration": 3.001726355, "status": 502, "err_id": "zved2zp95", "err_trace": "reverseproxy.statusError (reverseproxy.go:1267)"}


3. Caddy version:

2.7.6

4. How I installed and ran Caddy:

a. System environment:

ubuntu 22.04, all default, the server i want to access from my domain is in a docker container.
The whole thing is running on an old x86 laptop.

b. Command:

sudo caddy run --config /home/arnaud/caddy-configuration/Caddyfile

c. Service/unit/compose file:

non-applicable

d. My complete Caddy config:

{
	debug
}

arnaud.click
reverse_proxy http://192.168.0.69:2283
}

5. Links to relevant resources:

if i missed any info please tell me.

i am very dumb, i got a new router, which changed the ip to 192.168.1.69, i changed the ip and it works now!

1 Like