Migration: 3.0.9 -> 4.0.5 Foreign key constraint is incorrectly formed (on hydra_jwk)

{"level":"info","ts":"2022-12-23T01:59:15+01:00","logger":"pydio.grpc.oauth","msg":"A migration table exists, checking if it is a transactional migration table.","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:59:15+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20211226155900000000"}
{"level":"error","ts":"2022-12-23T01:59:15+01:00","logger":"pydio.grpc.oauth","msg":"Could not apply migrations","error":"error executing migrations/20211226155900000000_grant_jwk_bearer.mysql.up.sql, sql: CREATE TABLE IF NOT EXISTS hydra_oauth2_trusted_jwt_bearer_issuer\n(\n    id         VARCHAR(36)                         PRIMARY KEY,\n    issuer     VARCHAR(255)                        NOT NULL,\n    subject    VARCHAR(255)                        NOT NULL,\n    scope      TEXT                                NOT NULL,\n    key_set    varchar(255)                        NOT NULL,\n    key_id     varchar(255)                        NOT NULL,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n    expires_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n    UNIQUE (issuer, subject, key_id),\n    FOREIGN KEY (key_set, key_id) REFERENCES hydra_jwk (sid, kid) ON DELETE CASCADE\n);\n\nCREATE INDEX hydra_oauth2_trusted_jwt_bearer_issuer_expires_at_idx ON hydra_oauth2_trusted_jwt_bearer_issuer (expires_at);\n: Error 1005: Can't create table `pydio`.`hydra_oauth2_trusted_jwt_bearer_issuer` (errno: 150 \"Foreign key constraint is incorrectly formed\")","errorVerbose":"Error 1005: Can't create table `pydio`.`hydra_oauth2_trusted_jwt_bearer_issuer` (errno: 150 \"Foreign key constraint is incorrectly formed\")\nerror executing migrations/20211226155900000000_grant_jwk_bearer.mysql.up.sql, sql: CREATE TABLE IF NOT EXISTS hydra_oauth2_trusted_jwt_bearer_issuer\n(\n    id         VARCHAR(36)                         PRIMARY KEY,\n    issuer     VARCHAR(255)                        NOT NULL,\n    subject    VARCHAR(255)                        NOT NULL,\n    scope      TEXT                                NOT NULL,\n    key_set    varchar(255)                        NOT NULL,\n    key_id     varchar(255)                        NOT NULL,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n    expires_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n    UNIQUE (issuer, subject, key_id),\n    FOREIGN KEY (key_set, key_id) REFERENCES hydra_jwk (sid, kid) ON DELETE CASCADE\n);\n\nCREATE INDEX hydra_oauth2_trusted_jwt_bearer_issuer_expires_at_idx ON hydra_oauth2_trusted_jwt_bearer_issuer (expires_at);\n\ngithub.com/ory/x/popx.NewMigrationBox.func1.1\n\tgithub.com/ory/x@v0.0.368/popx/migration_box.go:80\ngithub.com/ory/x/popx.Migration.Run\n\tgithub.com/ory/x@v0.0.368/popx/migration_info.go:34\ngithub.com/ory/x/popx.(*Migrator).UpTo.func1.2\n\tgithub.com/ory/x@v0.0.368/popx/migrator.go:139\ngithub.com/ory/x/popx.(*Migrator).isolatedTransaction\n\tgithub.com/ory/x@v0.0.368/popx/migrator.go:314\ngithub.com/ory/x/popx.(*Migrator).UpTo.func1\n\tgithub.com/ory/x@v0.0.368/popx/migrator.go:138\ngithub.com/ory/x/popx.(*Migrator).exec\n\tgithub.com/ory/x@v0.0.368/popx/migrator.go:559\ngithub.com/ory/x/popx.(*Migrator).UpTo\n\tgithub.com/ory/x@v0.0.368/popx/migrator.go:92\ngithub.com/ory/x/popx.(*Migrator).Up\n\tgithub.com/ory/x@v0.0.368/popx/migrator.go:80\ngithub.com/ory/hydra/persistence/sql.(*Persister).MigrateUp\n\tgithub.com/ory/hydra@v1.11.10/persistence/sql/persister_migration.go:40\ngithub.com/pydio/cells/v4/common/auth.InitRegistry.func1.1\n\tgithub.com/pydio/cells/v4/common/auth/registry.go:177\ngithub.com/pydio/cells/v4/common/utils/std.Retry\n\tgithub.com/pydio/cells/v4/common/utils/std/func.go:55\ngithub.com/pydio/cells/v4/common/auth.InitRegistry.func1\n\tgithub.com/pydio/cells/v4/common/auth/registry.go:127\nsync.(*Once).doSlow\n\tsync/once.go:74\nsync.(*Once).Do\n\tsync/once.go:65\ngithub.com/pydio/cells/v4/common/auth.InitRegistry\n\tgithub.com/pydio/cells/v4/common/auth/registry.go:118\ngithub.com/pydio/cells/v4/idm/oauth/grpc.init.0.func1.1\n\tgithub.com/pydio/cells/v4/idm/oauth/grpc/plugins.go:90\ngithub.com/pydio/cells/v4/common/service.WithGRPC.func1.1\n\tgithub.com/pydio/cells/v4/common/service/grpc.go:42\ngithub.com/pydio/cells/v4/common/service.(*service).Start\n\tgithub.com/pydio/cells/v4/common/service/service.go:182\ngithub.com/pydio/cells/v4/common/server.(*server).Serve.func2.1\n\tgithub.com/pydio/cells/v4/common/server/server.go:109\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/sync@v0.0.0-20220907140024-f12130a52804/errgroup/errgroup.go:75\nruntime.goexit\n\truntime/asm_amd64.s:1594"}

Basically:

CREATE TABLE IF NOT EXISTS hydra_oauth2_trusted_jwt_bearer_issuer
(
    id         VARCHAR(36)                         PRIMARY KEY,
    issuer     VARCHAR(255)                        NOT NULL,
    subject    VARCHAR(255)                        NOT NULL,
    scope      TEXT                                NOT NULL,
    key_set    varchar(255)                        NOT NULL,
    key_id     varchar(255)                        NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
    expires_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
    UNIQUE (issuer, subject, key_id),
    FOREIGN KEY (key_set, key_id) REFERENCES hydra_jwk (sid, kid) ON DELETE CASCADE
);

=> Foreign key constraint is incorrectly formed

My hydra_jwk table as it is currently:

CREATE TABLE `hydra_jwk` (
  `sid` varchar(255) NOT NULL,
  `kid` varchar(255) NOT NULL,
  `version` int(11) NOT NULL DEFAULT 0,
  `keydata` mediumtext NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `pk` int(10) unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`pk`),
  UNIQUE KEY `hydra_jwk_idx_id_uq` (`sid`,`kid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci

I can confirm the CREATE TABLE statement fails (in interactive mysql).
It’s mariadb 10.5.18-0+deb11u1, and
/etc/mysql/mariadb.conf.d/50-server.cnf : collation-server = utf8mb4_general_ci

SHOW ENGINE INNODB STATUS

2022-12-23 02:14:40 0x7fa550b9e700 Error in foreign key constraint of table `pydio`.`hydra_oauth2_trusted_jwt_bearer_issuer`:
Create  table `pydio`.`hydra_oauth2_trusted_jwt_bearer_issuer` with foreign key (key_set, key_id) constraint failed.
Field type or character set for column 'key_set' does not match referenced column 'sid'

Before running 4.0.x for the first time I proceeded with the CHARACTER SET utf8mb4 as specified at https://pydio.com/en/docs/cells/v4/major-versions-upgrade-informations

If I append COLLATE=utf8mb4_general_ci to the failing SQL request (and trigger it by hand), then it executes and the table is created. Then, when starting the server again, the remaining migrations run (the subsequent INDEX at least).

Hi,

So if I understand correctly, you had the warning mentioned in the docs on this table hydra_jwk, changed the collation as requested, and it failed during the migration.
By any chance, do you still have the original warning ? Did you rebuild or change mysql version prior to the upgrade from 3.0.9 to 4.0.5 ?

Thanks,
Greg

I did not experienced the warning (I anticipated it by changing the CHARSET before).

The extended log of the migration:

{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.grpc.data.objects","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.grpc.data.sync","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.generic.timer","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.rest.search","msg":"starting","service":"pydio.rest.search","hook router to":"/a/search"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.rest.graph","msg":"starting","service":"pydio.rest.graph","hook router to":"/a/graph"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.rest.jobs","msg":"starting","service":"pydio.rest.jobs","hook router to":"/a/jobs"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.web.libreoffice","msg":"Skipping LibreOffice plugin as not enabled"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.rest.auth","msg":"starting","service":"pydio.rest.auth","hook router to":"/a/auth"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.rest.workspace","msg":"starting","service":"pydio.rest.workspace","hook router to":"/a/workspace"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.rest.mailer","msg":"starting","service":"pydio.rest.mailer","hook router to":"/a/mailer"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.grpc.oauth","msg":"Detected HydraJwkMigration - We are migrating from a v3 version - You may be disconnected after that!"}
{"level":"warn","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.grpc.oauth","msg":"Found a Legacy JWK - Will be removed (private:6016115a-4826-4f9d-a48f-c996b79fb228)"}
{"level":"warn","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.grpc.oauth","msg":"Found a Legacy JWK - Will be removed (public:6016115a-4826-4f9d-a48f-c996b79fb228)"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.grpc.oauth","msg":"Removed legacy JWKs from hydra_jwk"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.rest.frontend","msg":"starting","service":"pydio.rest.frontend","hook router to":"/a/frontend"}
{"level":"info","ts":"2022-12-23T01:58:33+01:00","logger":"pydio.grpc.policy","msg":"Migrated 3 rows from old gorp_migrations table to ladon_migrations\n"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.policy","msg":"MariaDB Detected - switching to specific migrations"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.mailer","msg":"Configuring sendmail with binary path: /usr/bin/sendmail"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.mailer","msg":"Starting mailer with sender 'sendmail'"}
{"level":"warn","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.mailer","msg":"Could not init mailer handler from config: cannot find executable path","error":"cannot find executable path","errorVerbose":"cannot find executable path\ngithub.com/pydio/cells/v4/broker/mailer.(*Sendmail).Check\n\tgithub.com/pydio/cells/v4/broker/mailer/sender-sendmail.go:56\ngithub.com/pydio/cells/v4/broker/mailer/grpc.(*Handler).initFromConf\n\tgithub.com/pydio/cells/v4/broker/mailer/grpc/handler.go:254\ngithub.com/pydio/cells/v4/broker/mailer/grpc.NewHandler\n\tgithub.com/pydio/cells/v4/broker/mailer/grpc/handler.go:58\ngithub.com/pydio/cells/v4/broker/mailer/grpc.init.1.func1.2\n\tgithub.com/pydio/cells/v4/broker/mailer/grpc/plugins.go:77\ngithub.com/pydio/cells/v4/common/service.WithGRPC.func1.1\n\tgithub.com/pydio/cells/v4/common/service/grpc.go:42\ngithub.com/pydio/cells/v4/common/service.(*service).Start\n\tgithub.com/pydio/cells/v4/common/service/service.go:182\ngithub.com/pydio/cells/v4/common/server.(*server).Serve.func2.1\n\tgithub.com/pydio/cells/v4/common/server/server.go:109\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/sync@v0.0.0-20220907140024-f12130a52804/errgroup/errgroup.go:75\nruntime.goexit\n\truntime/asm_amd64.s:1594"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.search","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.search","msg":"{\"level\":\"info\",\"ts\":\"2022-12-23T01:58:34+01:00\",\"logger\":\"pydio.grpc.search\",\"msg\":\"ready\"}"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Applying migrations for oauth if required"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Checking if legacy migration table exists.","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"A migration table exists, checking if it is a transactional migration table.","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"An error occurred while checking for the transactional migration table, maybe it does not exist yet? Trying to create.","error":{"message":"Error 1054: Unknown column 'version_self' in 'field list'","stack_trace":"stack trace could not be recovered from error type *mysql.MySQLError"},"migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Successfully migrated legacy schema_migration to new transactional schema_migration table.","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","version":"20190100000001000000","legacy_version":"20190100000001","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190100000002","migration_table":"schema_migration","version":"20190100000002000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190100000003","migration_table":"schema_migration","version":"20190100000003000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","migration_table":"schema_migration","version":"20190100000004000000","legacy_version":"20190100000004"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","version":"20190100000005000000","legacy_version":"20190100000005","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","version":"20190100000006000000","legacy_version":"20190100000006","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190100000007","migration_table":"schema_migration","version":"20190100000007000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","version":"20190100000008000000","legacy_version":"20190100000008","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","version":"20190100000009000000","legacy_version":"20190100000009","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","migration_table":"schema_migration","version":"20190100000010000000","legacy_version":"20190100000010"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190100000011","version":"20190100000011000000","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","version":"20190100000012000000","migration_table":"schema_migration","legacy_version":"20190100000012"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","version":"20190100000013000000","legacy_version":"20190100000013","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20190100000014000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190200000001","migration_table":"schema_migration","version":"20190200000001000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190200000002","migration_table":"schema_migration","version":"20190200000002000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190200000003","version":"20190200000003000000","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190200000004","migration_table":"schema_migration","version":"20190200000004000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190300000001","migration_table":"schema_migration","version":"20190300000001000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190300000002","migration_table":"schema_migration","version":"20190300000002000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","migration_table":"schema_migration","legacy_version":"20190300000003","version":"20190300000003000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","migration_table":"schema_migration","version":"20190300000004000000","legacy_version":"20190300000004"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190300000005","migration_table":"schema_migration","version":"20190300000005000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","version":"20190300000006000000","migration_table":"schema_migration","legacy_version":"20190300000006"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","migration_table":"schema_migration","version":"20190300000007000000","legacy_version":"20190300000007"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190300000008","migration_table":"schema_migration","version":"20190300000008000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190300000009","migration_table":"schema_migration","version":"20190300000009000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","migration_table":"schema_migration","legacy_version":"20190300000010","version":"20190300000010000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190300000011","version":"20190300000011000000","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","version":"20190300000012000000","legacy_version":"20190300000012","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20190300000013000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20190300000014000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190400000001","migration_table":"schema_migration","version":"20190400000001000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","migration_table":"schema_migration","version":"20190400000002000000","legacy_version":"20190400000002"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","migration_table":"schema_migration","legacy_version":"20190400000003","version":"20190400000003000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","version":"20190400000004000000","legacy_version":"20190400000004","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190400000005","version":"20190400000005000000","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","version":"20190400000006000000","legacy_version":"20190400000006","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","version":"20190400000007000000","legacy_version":"20190400000007","migration_table":"schema_migration"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","legacy_version":"20190400000008","migration_table":"schema_migration","version":"20190400000008000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has already been applied in a legacy migration run. Updating version in migration table.","migration_table":"schema_migration","version":"20190400000009000000","legacy_version":"20190400000009"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20190400000010000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20190400000011000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20200521071434000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20200527215731000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20200527215732000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20200819163013000000"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.data.objects.local1","msg":"Starting local objects service local1 on /srv/www/pydio/.config/pydio/cells/data"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.grpc.data.objects.local1","msg":"{\"level\":\"info\",\"ts\":\"2022-12-23T01:58:34+01:00\",\"logger\":\"pydio.grpc.data.objects.local1\",\"msg\":\"Starting local objects service local1 on /srv/www/pydio/.config/pydio/cells/data\"}"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.gateway.websocket","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:34+01:00","logger":"pydio.gateway.websocket","msg":"{\"level\":\"info\",\"ts\":\"2022-12-23T01:58:34+01:00\",\"logger\":\"pydio.gateway.websocket\",\"msg\":\"ready\"}"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20200913192340000000"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20201110104000000000"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.data.objects.local1","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.data.objects.local1","msg":"{\"level\":\"info\",\"ts\":\"2022-12-23T01:58:35+01:00\",\"logger\":\"pydio.grpc.data.objects.local1\",\"msg\":\"ready\"}"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20201116133000000000"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20210928155900000000"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.data.objects.gateway1","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.data.objects.gateway1","msg":"{\"level\":\"info\",\"ts\":\"2022-12-23T01:58:35+01:00\",\"logger\":\"pydio.grpc.data.objects.gateway1\",\"msg\":\"ready\"}"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.jobs","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.jobs","msg":"{\"level\":\"info\",\"ts\":\"2022-12-23T01:58:35+01:00\",\"logger\":\"pydio.grpc.jobs\",\"msg\":\"ready\"}"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.log","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.templates","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.activity","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.user","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.user-meta","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.policy","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.gateway.data","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.graph","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.search","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.role","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20210928175900000000"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.update","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.web.statics","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.web.oauth","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.web.libreoffice","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.gateway.wopi","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.jobs","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.mailer","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.tree","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.auth","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.frontend","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.rest.workspace","msg":"Creating a Personal workspace"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.data.sync.personal","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.data.sync.personal","msg":"{\"level\":\"info\",\"ts\":\"2022-12-23T01:58:35+01:00\",\"logger\":\"pydio.grpc.data.sync.personal\",\"msg\":\"ready\"}"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.data.index.personal","msg":"ready"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.data.sync.personal","msg":"{\"level\":\"info\",\"ts\":\"2022-12-23T01:58:35+01:00\",\"logger\":\"pydio.grpc.data.index.personal\",\"msg\":\"ready\"}"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.oauth","msg":"Migration has not yet been applied, running migration.","version":"20211226155900000000"}
{"level":"error","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.oauth","msg":"Could not apply migrations","error":"error executing migrations/20211226155900000000_grant_jwk_bearer.mysql.up.sql, sql: CREATE TABLE IF NOT EXISTS hydra_oauth2_trusted_jwt_bearer_issuer\n(\n    id         VARCHAR(36)                         PRIMARY KEY,\n    issuer     VARCHAR(255)                        NOT NULL,\n    subject    VARCHAR(255)                        NOT NULL,\n    scope      TEXT                                NOT NULL,\n    key_set    varchar(255)                        NOT NULL,\n    key_id     varchar(255)                        NOT NULL,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n    expires_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n    UNIQUE (issuer, subject, key_id),\n    FOREIGN KEY (key_set, key_id) REFERENCES hydra_jwk (sid, kid) ON DELETE CASCADE\n);\n\nCREATE INDEX hydra_oauth2_trusted_jwt_bearer_issuer_expires_at_idx ON hydra_oauth2_trusted_jwt_bearer_issuer (expires_at);\n: Error 1005: Can't create table `pydio`.`hydra_oauth2_trusted_jwt_bearer_issuer` (errno: 150 \"Foreign key constraint is incorrectly formed\")","errorVerbose":"Error 1005: Can't create table `pydio`.`hydra_oauth2_trusted_jwt_bearer_issuer` (errno: 150 \"Foreign key constraint is incorrectly formed\")\nerror executing migrations/20211226155900000000_grant_jwk_bearer.mysql.up.sql, sql: CREATE TABLE IF NOT EXISTS hydra_oauth2_trusted_jwt_bearer_issuer\n(\n    id         VARCHAR(36)                         PRIMARY KEY,\n    issuer     VARCHAR(255)                        NOT NULL,\n    subject    VARCHAR(255)                        NOT NULL,\n    scope      TEXT                                NOT NULL,\n    key_set    varchar(255)                        NOT NULL,\n    key_id     varchar(255)                        NOT NULL,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n    expires_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n    UNIQUE (issuer, subject, key_id),\n    FOREIGN KEY (key_set, key_id) REFERENCES hydra_jwk (sid, kid) ON DELETE CASCADE\n);\n\nCREATE INDEX hydra_oauth2_trusted_jwt_bearer_issuer_expires_at_idx ON hydra_oauth2_trusted_jwt_bearer_issuer (expires_at);\n\ngithub.com/ory/x/popx.NewMigrationBox.func1.1\n\tgithub.com/ory/x@v0.0.368/popx/migration_box.go:80\ngithub.com/ory/x/popx.Migration.Run\n\tgithub.com/ory/x@v0.0.368/popx/migration_info.go:34\ngithub.com/ory/x/popx.(*Migrator).UpTo.func1.2\n\tgithub.com/ory/x@v0.0.368/popx/migrator.go:139\ngithub.com/ory/x/popx.(*Migrator).isolatedTransaction\n\tgithub.com/ory/x@v0.0.368/popx/migrator.go:314\ngithub.com/ory/x/popx.(*Migrator).UpTo.func1\n\tgithub.com/ory/x@v0.0.368/popx/migrator.go:138\ngithub.com/ory/x/popx.(*Migrator).exec\n\tgithub.com/ory/x@v0.0.368/popx/migrator.go:559\ngithub.com/ory/x/popx.(*Migrator).UpTo\n\tgithub.com/ory/x@v0.0.368/popx/migrator.go:92\ngithub.com/ory/x/popx.(*Migrator).Up\n\tgithub.com/ory/x@v0.0.368/popx/migrator.go:80\ngithub.com/ory/hydra/persistence/sql.(*Persister).MigrateUp\n\tgithub.com/ory/hydra@v1.11.10/persistence/sql/persister_migration.go:40\ngithub.com/pydio/cells/v4/common/auth.InitRegistry.func1.1\n\tgithub.com/pydio/cells/v4/common/auth/registry.go:177\ngithub.com/pydio/cells/v4/common/utils/std.Retry\n\tgithub.com/pydio/cells/v4/common/utils/std/func.go:32\ngithub.com/pydio/cells/v4/common/auth.InitRegistry.func1\n\tgithub.com/pydio/cells/v4/common/auth/registry.go:127\nsync.(*Once).doSlow\n\tsync/once.go:74\nsync.(*Once).Do\n\tsync/once.go:65\ngithub.com/pydio/cells/v4/common/auth.InitRegistry\n\tgithub.com/pydio/cells/v4/common/auth/registry.go:118\ngithub.com/pydio/cells/v4/idm/oauth/grpc.init.0.func1.1\n\tgithub.com/pydio/cells/v4/idm/oauth/grpc/plugins.go:90\ngithub.com/pydio/cells/v4/common/service.WithGRPC.func1.1\n\tgithub.com/pydio/cells/v4/common/service/grpc.go:42\ngithub.com/pydio/cells/v4/common/service.(*service).Start\n\tgithub.com/pydio/cells/v4/common/service/service.go:182\ngithub.com/pydio/cells/v4/common/server.(*server).Serve.func2.1\n\tgithub.com/pydio/cells/v4/common/server/server.go:109\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/sync@v0.0.0-20220907140024-f12130a52804/errgroup/errgroup.go:75\nruntime.goexit\n\truntime/asm_amd64.s:1594"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.tasks","msg":"{\"level\":\"info\",\"ts\":\"2022-12-23T01:58:35+01:00\",\"logger\":\"pydio.grpc.tasks\",\"msg\":\"ready\"}"}
{"level":"info","ts":"2022-12-23T01:58:35+01:00","logger":"pydio.grpc.tasks","msg":"ready"}

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