2 Tunnels configured, only 1 works

Hello,

I just configured 2 tunnels for 2 different domains, pointing to the same service (nginx reverse proxy).

When I hit domain A, it goes through the tunnel, to my service and serves a website correctly.
When I hit domain B, it goes through the tunnel, but gives an error

2023-06-28T19:12:20Z ERR error=“Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: remote error: tls: unrecognized name” cfRay=7de83da08d8c7139-YUL event=1 ingressRule=0 originService=https://:
2023-06-28T19:12:20Z ERR Request failed error=“Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: remote error: tls: unrecognized name” connIndex=1 dest=https://.com/ event=0 ip= type=http

If I look at the logs when the tunnel is booted, the configurations are slightly different for some reason, even though they are the exact same in Zero-Trust dashboard.

Domain A configuration from logs:

2023-06-28T19:05:13Z INF Updated to new configuration config=“{"ingress":[{"hostname":".ca","originRequest":{},"service":"https://:"},{"originRequest":{"originServerName":".ca"},"service":"https://:"}],"warp-routing":{"enabled":false}}” version=2

Domain B configuration from logs:

2023-06-28T19:05:03Z INF Updated to new configuration config=“{"ingress":[{"hostname":".com","originRequest":{"noTLSVerify":false},"service":"https://:"},{"service":"https://:"}],"warp-routing":{"enabled":false}}” version=4

I’ll repost the configuration from logs as some of the content is not showing correctly with how I tried to hide the domains:

Domain A configuration from logs:

2023-06-28T19:05:13Z INF Updated to new configuration config="{\"ingress\":[{\"hostname\":\"domain-a.ca\",\"originRequest\":{},\"service\":\"https://my-nginx-ip:my-nginx-port\"},{\"originRequest\":{\"originServerName\":\"domain-a.ca\"},\"service\":\"https://my-nginx-ip:my-nginx-port\"}],\"warp-routing\":{\"enabled\":false}}" version=2

Domain B configuration from logs:

2023-06-28T19:05:03Z INF Updated to new configuration config="{\"ingress\":[{\"hostname\":\"domain-b.com\",\"originRequest\":{\"noTLSVerify\":false},\"service\":\"https://my-nginx-ip:my-nginx-port\"},{\"service\":\"https://my-nginx-ip:my-nginx-port\"}],\"warp-routing\":{\"enabled\":false}}" version=4

Figured it out :),

Looks like because Domain A was done through a migration from a non-cloud hosted config, it shows “OriginServerName” as NULL in the ZeroTrust dashboard, when in fact there is a value there. So setting the OriginServerName on Domain B fixed it.

Looks like this is a bug with migration & displaying configured values.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.