#New Installation Failing

1 messages · Page 1 of 1 (latest)

obtuse cloud
#

When creating a new installation via the helm charts with the following values:

authentik:
  error_reporting:
    enabled: true
  log_level: trace
postgresql:
  enabled: true
  existingSecret: authentik-secrets
redis:
  enabled: true

env:
  AUTHENTIK_EMAIL__HOST: smtp.postmarkapp.com
  AUTHENTIK_EMAIL__PORT: 587
  AUTHENTIK_EMAIL__USE_TLS: "true"
  AUTHENTIK_EMAIL__FROM: <email>

envValueFrom:
  AUTHENTIK_SECRET_KEY:
    secretKeyRef:
      name: authentik-secrets
      key: secret_key
  AUTHENTIK_POSTGRESQL__PASSWORD:
    secretKeyRef:
      name: authentik-secrets
      key: postgresql-postgres-password
  AUTHENTIK_EMAIL_USERNAME:
    secretKeyRef:
      name: authentik-secrets
      key: mail_username
  AUTHENTIK_EMAIL_PASSWORD:
    secretKeyRef:
      name: authentik-secrets
      key: mail_password

When doing the initial startup flow I get this error

Nothing in the Authentik Server/Worker logs, but this in the postgres logs

2024-01-05 01:26:58.474 GMT [175] WARNING:  there is already a transaction in progress
2024-01-05 01:27:01.041 GMT [176] ERROR:  relation "authentik_crypto_certificatekeypair" does not exist at character 367
2024-01-05 01:27:01.041 GMT [176] STATEMENT:  SELECT "authentik_crypto_certificatekeypair"."created", "authentik_crypto_certificatekeypair"."last_updated", "authentik_crypto_certificatekeypair"."managed", "authentik_crypto_certificatekeypair"."kp_uuid", "authentik_crypto_certificatekeypair"."name", "authentik_crypto_certificatekeypair"."certificate_data", "authentik_crypto_certificatekeypair"."key_data" FROM "authentik_crypto_certificatekeypair" WHERE "authentik_crypto_certificatekeypair"."managed" = 'goauthentik.io/crypto/jwt-managed' ORDER BY "authentik_crypto_certificatekeypair"."kp_uuid" ASC LIMIT 1
2024-01-05 01:27:01.042 GMT [176] ERROR:  relation "authentik_crypto_certificatekeypair" does not exist at character 22
2024-01-05 01:27:01.042 GMT [176] STATEMENT:  SELECT 1 AS "a" FROM "authentik_crypto_certificatekeypair" WHERE "authentik_crypto_certificatekeypair"."name" = 'authentik Self-signed Certificate' LIMIT 1
2024-01-05 01:27:01.064 GMT [176] ERROR:  relation "authentik_outposts_outpost" does not exist at character 257
2024-01-05 01:27:01.064 GMT [176] STATEMENT:  SELECT "authentik_outposts_outpost"."managed", "authentik_outposts_outpost"."uuid", "authentik_outposts_outpost"."name", "authentik_outposts_outpost"."type", "authentik_outposts_outpost"."service_connection_id", "authentik_outposts_outpost"."_config" FROM "authentik_outposts_outpost" WHERE "authentik_outposts_outpost"."managed" = 'goauthentik.io/outposts/embedded' LIMIT 21 FOR UPDATE
2024-01-05 01:27:01.199 GMT [176] ERROR:  relation "authentik_core_source" does not exist at character 533
2024-01-05 01:27:01.199 GMT [176] STATEMENT:  SELECT "authentik_policies_policybindingmodel"."pbm_uuid", "authentik_policies_policybindingmodel"."policy_engine_mode", "authentik_core_source"."policybindingmodel_ptr_id", "authentik_core_source"."managed", "authentik_core_source"."name", "authentik_core_source"."slug", "authentik_core_source"."user_path_template", "authentik_core_source"."enabled", "authentik_core_source"."icon", "authentik_core_source"."authentication_flow_id", "authentik_core_source"."enrollment_flow_id", "authentik_core_source"."user_matching_mode" FROM "authentik_core_source" INNER JOIN "authentik_policies_policybindingmodel" ON ("authentik_core_source"."policybindingmodel_ptr_id" = "authentik_policies_policybindingmodel"."pbm_uuid") WHERE "authentik_core_source"."managed" = 'goauthentik.io/sources/inbuilt' LIMIT 21 FOR UPDATE
obtuse cloud
#
{"auth_via": "unauthenticated", "event": "f(exec): Flow not applicable to current user", "exc": "FlowNonApplicableException()", "flow_slug": "initial-setup", "host": "localhost:58957", "level": "warning", "logger": "authentik.flows.views.executor", "pid": 23, "request_id": "bf07dc0ae66d4e1da3a8ff7494860f7a", "timestamp": "2024-01-05T02:05:15.252841"}

this is in the log

#

Same with the default configuration

authentik:
  secret_key: "PleaseGenerateA50CharKey"
  # This sends anonymous usage-data, stack traces on errors and
  # performance data to sentry.io, and is fully opt-in
  error_reporting:
    enabled: true
  postgresql:
    password: "ThisIsNotASecurePassword"

postgresql:
  enabled: true
  postgresqlPassword: "ThisIsNotASecurePassword"
redis:
  enabled: true
obtuse cloud
#

Now it's working, but I didn't change anything

obtuse cloud
#

Issue is occuring again

#

Now its working after re-deploy

#

I'm really not sure whats causing the inconsistent behavior

obtuse cloud
#

Not working again after another re-deploy

#

Whatever it is seems to be caused by the worker pod

#

Some further testing:

Scaling down worker and server deployments on install of the helm chart.
Exec into the postgres container, \l shows the authentik db, \dt shows no relations.

Starting either of them gives a ton of errors in the psql log