Skip to content

bug: Can not connect OIDC in a dual stack environment. #97

@Heracles31

Description

@Heracles31

Describe the bug

Infos already posted in the Discord help group here

Deployed Homarr 1.18.1 in a dual stack Kubernetes cluster. DNS resolution works and returns both A and AAAA records. Ingress works and listens on both v4 and v6 addresses.

Homarr is configured for OIDC authentication using Keycloak deployed in the very same cluster.

When configured properly for it, Homarr just says that all logins fail. In the log, there is this :

2025-04-28T03:28:09.512Z error: fetch failed 
... 
    at async doRender (/app/node_modules/next/dist/server/base-server.js:1513:42)
caused by Error: getaddrinfo ENOTFOUND auth.domain.tld errno="-3007" code="ENOTFOUND" syscall="getaddrinfo" hostname="auth.domain.tld"
    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:122:26)
    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)

From inside the pod, DNS works :

/app # nslookup auth.domain.tld
Server:         10.96.0.10
Address:        10.96.0.10:53

auth.domain.tld   canonical name = nginx-ing64.domain.tld
Name:   nginx-ing64.domain.tld
Address: 172.24.138.10

auth.domain.tld   canonical name = nginx-ing64.domain.tld
Name:   nginx-ing64.domain.tld
Address: 2001:0DB8:6000:c4::100

But OpenSSL can not connect using the DNS name :
/```app # openssl s_client -connect auth.domain.tld:443
28AB5B27057F0000:error:10080002:BIO routines:BIO_lookup_ex:system lib:crypto/bio/bio_addr.c:763:Name has no usable address
connect:errno=22


If I hard code the IPv4 in the hosts file, it works.

### Steps to reproduce

Deploy in a similar environment and try OIDC / DNS resolution from the pod...


### Impact

Unable to use OIDC at all which defeats the purpose of using Homarr over here.

### Additional information

Talos Linux 1.9.5 ; Kubernetes 1.32.2 ; Flannel ; but considering how DNS works from inside and that the hard coding in the host file bypass the bug, I highly doubt it is related to environment....

### Version

1.18.0

### Installation method

Helm

### Browser

Safari

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions