ory / kratos

Next-gen identity server replacing your Auth0, Okta, Firebase with hardened security and PassKeys, SMS, OIDC, Social Sign In, MFA, FIDO, TOTP and OTP, WebAuthn, passwordless and much more. Golang, headless, API-first. Available as a worry-free SaaS with the fairest pricing on the market!

Home Page:https://www.ory.sh/kratos/?utm_source=github&utm_medium=banner&utm_campaign=kratos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker compose not working

akashlama1998-icloud opened this issue · comments

Preflight checklist

Ory Network Project

No response

Describe the bug

While docker composing the project of latest version, i.e., v1.1.0 the process getting stuck in an infinite loop in kratos migration. The old version, i.e., v0.5.5-alpha.1 works just fine.

Reproducing the bug

git clone https://github.com/ory/kratos.git
cd kratos
git checkout v1.1.0
docker-compose -f quickstart.yml -f quickstart-standalone.yml up --build --force-recreate

Relevant log output

kratos-1                      | time=2024-02-22T14:53:10Z level=debug msg=Adding config files. func=github.com/ory/x/configx.(*Provider).createProviders file=/go/pkg/mod/github.com/ory/x@v0.0.562/configx/provider.go:144 audience=application files=[/etc/config/kratos/kratos.yml] service_name=Ory Kratos service_version=v1.0.0
kratos-1                      | 
kratos-1                      | The configuration contains values or keys which are invalid:
kratos-1                      | feature_flags: map[cacheable_sessions:false use_continue_with_transitions:true]
kratos-1                      |                ^-- additionalProperties "use_continue_with_transitions" not allowed
kratos-1                      | 
kratos-1                      | time=2024-02-22T14:53:10Z level=error msg=Unable to instantiate configuration. func=github.com/ory/kratos/driver.NewWithoutInit file=/project/driver/factory.go:43 audience=application error=map[message:I[#/feature_flags] S[#/properties/feature_flags/additionalProperties] additionalProperties "use_continue_with_transitions" not allowed stack_trace:stack trace could not be recovered from error type *jsonschema.ValidationError] service_name=Ory Kratos service_version=v1.0.0
kratos-1                      | Error: I[#/feature_flags] S[#/properties/feature_flags/additionalProperties] additionalProperties "use_continue_with_transitions" not allowed
kratos-1                      | Usage:
kratos-1                      |   kratos serve [flags]
kratos-1                      | 
kratos-1                      | Flags:
kratos-1                      |   -c, --config strings   Path to one or more .json, .yaml, .yml, .toml config files. Values are loaded in the order provided, meaning that the last config file overwrites values from the previous config file.
kratos-1                      |       --dev              Disables critical security features to make development easier
kratos-1                      |   -h, --help             help for serve
kratos-1                      |       --sqa-opt-out      Disable anonymized telemetry reports - for more information please visit https://www.ory.sh/docs/ecosystem/sqa
kratos-1                      |       --watch-courier    Run the message courier as a background task, to simplify single-instance setup
kratos-1                      | 
kratos-1                      | I[#/feature_flags] S[#/properties/feature_flags/additionalProperties] additionalProperties "use_continue_with_transitions" not allowed
kratos-1 exited with code 1

Relevant configuration

No response

Version

v1.1.0

On which operating system are you observing this issue?

Windows

In which environment are you deploying?

Docker Compose

Additional Context

No response

Hey - please make sure you're using the latest revision on master to use the correct docker file. It looks like the git commit you're using is still using Ory Hydra 1.0.0 (in the logs) probably because the docker image definition is still 1.0.0

Tried using master branch as well.. but still no success.

kratos-migrate-1              | time=2024-02-23T09:59:24Z level=debug msg=Migration has not been applied but it might be a legacy migration, investigating. audience=application migration_file=migrations/sql/20240119094628000000_sessions_created_at_index.up.sql migration_name=sessions_created_at_index service_name=Ory Kratos service_version=v1.1.0 version=20240119094628000000
kratos-migrate-1              | time=2024-02-23T09:59:24Z level=info msg=Migration has not yet been applied, running migration. audience=application migration_file=migrations/sql/20240119094628000000_sessions_created_at_index.up.sql migration_name=sessions_created_at_index service_name=Ory Kratos service_version=v1.1.0 version=20240119094628000000
kratos-migrate-1              | Successfully applied SQL migrations!
kratos-migrate-1              | time=2024-02-23T09:59:24Z level=info msg=> sessions_created_at_index applied successfully audience=application migration_file=migrations/sql/20240119094628000000_sessions_created_at_index.up.sql migration_name=sessions_created_at_index service_name=Ory Kratos service_version=v1.1.0 version=20240119094628000000
kratos-migrate-1              | time=2024-02-23T09:59:24Z level=debug msg=Successfully applied 307 migrations. audience=application service_name=Ory Kratos service_version=v1.1.0
kratos-migrate-1              | time=2024-02-23T09:59:24Z level=debug msg=3.8972 seconds audience=application service_name=Ory Kratos service_version=v1.1.0
kratos-migrate-1 exited with code 0
kratos-1                      | time=2024-02-23T09:59:25Z level=debug msg=Connecting to SQL Database func=github.com/ory/kratos/driver.(*RegistryDefault).Init.func1 file=/project/driver/registry_default.go:641 audience=application connMaxLifetime=0s idlePool=4 pool=20 service_name=Ory Kratos service_version=v1.1.0
kratos-1                      | time=2024-02-23T09:59:25Z level=warning msg=
kratos-1                      |
kratos-1                      | YOU ARE RUNNING Ory KRATOS IN DEV MODE.
kratos-1                      | SECURITY IS DISABLED.
kratos-1                      | DON'T DO THIS IN PRODUCTION!
kratos-1                      |
kratos-1                      |  func=github.com/ory/kratos/cmd/serve.NewServeCmd.func1 file=/project/cmd/serve/root.go:32 audience=application service_name=Ory Kratos service_version=v1.1.0
kratos-1                      | time=2024-02-23T09:59:25Z level=warning msg=Config version is 'v0.13.0' but kratos runs on version 'v1.1.0' func=github.com/ory/x/logrusx.(*Logger).Logf file=/go/pkg/mod/github.com/ory/x@v0.0.614/logrusx/helper.go:125 audience=application service_name=Ory Kratos service_version=v1.1.0
kratos-1                      | time=2024-02-23T09:59:25Z level=info msg=Software quality assurance features are enabled. Learn more at: https://www.ory.sh/docs/ecosystem/sqa func=github.com/ory/x/metricsx.New file=/go/pkg/mod/github.com/ory/x@v0.0.614/metricsx/middleware.go:176 audience=application service_name=Ory Kratos service_version=v1.1.0
kratos-1                      | time=2024-02-23T09:59:25Z level=info msg=TLS has not been configured for public, skipping func=github.com/ory/x/logrusx.(*Logger).Logf file=/go/pkg/mod/github.com/ory/x@v0.0.614/logrusx/helper.go:125 audience=application service_name=Ory Kratos service_version=v1.1.0
kratos-1                      | time=2024-02-23T09:59:25Z level=info msg=Starting the public httpd on: 0.0.0.0:4433 func=github.com/ory/x/logrusx.(*Logger).Logf file=/go/pkg/mod/github.com/ory/x@v0.0.614/logrusx/helper.go:125 audience=application service_name=Ory Kratos service_version=v1.1.0
kratos-1                      | time=2024-02-23T09:59:25Z level=info msg=TLS has not been configured for admin, skipping func=github.com/ory/x/logrusx.(*Logger).Logf file=/go/pkg/mod/github.com/ory/x@v0.0.614/logrusx/helper.go:125 audience=application service_name=Ory Kratos service_version=v1.1.0
kratos-1                      | time=2024-02-23T09:59:25Z level=info msg=Courier worker started. func=github.com/ory/kratos/cmd/courier.Watch file=/project/cmd/courier/watch.go:94 audience=application service_name=Ory Kratos service_version=v1.1.0
kratos-1                      | time=2024-02-23T09:59:25Z level=info msg=Starting the admin httpd on: 0.0.0.0:4434 func=github.com/ory/x/logrusx.(*Logger).Logf file=/go/pkg/mod/github.com/ory/x@v0.0.614/logrusx/helper.go:125 audience=application service_name=Ory Kratos service_version=v1.1.0

The service is now clearly starting though?

I had the same issue. I bumped the version on image tags on these lines to v1.1.0:

It is now starting.

The same might be needed on other yml files, though.

(couldn't be the tag be moved? or tagging a v1.1.1?)