Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres tries to connect to random Cloudflare IP #12605

Open
pamidur opened this issue Jan 9, 2025 · 1 comment
Open

Postgres tries to connect to random Cloudflare IP #12605

pamidur opened this issue Jan 9, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@pamidur
Copy link

pamidur commented Jan 9, 2025

Describe the bug
Authentik-server won't start because it tries to connect to some random cloudflare ip instead of postgres pod

To Reproduce
Steps to reproduce the behaviour:
install on k3s with following values.yaml

authentik:
  log_level: info
  postgresql:
    host: "my-internal-db.svc.cluster.local"
    name: "authentik"

worker:
  replicas: 1
  envFrom: 
    - secretRef:
        name: authentik-pg-secret
    - secretRef:
        name: authentik-secret-key

server:
  replicas: 1
  envFrom: 
    - secretRef:
        name: authentik-pg-secret
    - secretRef:
        name: authentik-secret-key

Note
my-internal-db.svc.cluster.local is resolvable and pingable within the same namespace at 10.x.x.y
2606:4700:3032::ac43:bd3b is some random cloudflare address

Expected behavior
Authentik connects to another pod with postgres db at 10.x.x.y

Logs

{"event": "PostgreSQL connection failed, retrying... (connection is bad: connection to server at \"2606:4700:3032::ac43:bd3b\", port 5432 failed: Network is unreachable\n\tIs the server running on that host and accepting TCP/IP connections?)", "level": "info", "logger": "authentik.lib.config", "timestamp": 1736388730.1291566}
{"error":"authentik starting","event":"failed to proxy to backend","level":"warning","logger":"authentik.router","timestamp":"2025-01-09T02:12:16Z"}

Version and Deployment:

  • authentik version: [2024.12.1]
  • Deployment: [helm]

Additional context
I have cloudflared in another namespace

@pamidur pamidur added the bug Something isn't working label Jan 9, 2025
@rissson
Copy link
Member

rissson commented Jan 9, 2025

my-internal-db.svc.cluster.local seems to resolve to 2606:4700:3032::ac43:bd3b. Check your DNS setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants