# Docker pull problem

**URL:** <https://forum.pydio.com/t/docker-pull-problem/5441>\
**Category:** Pydio Cells\
**Tags:** docker\
**Created:** [July 29, 2023, 9:12pm UTC](https://forum.pydio.com/t/docker-pull-problem/5441 "2023-07-29T21:12:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![M\_Marco](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/m_marco/32/2124_2.png) [@M\_Marco](https://forum.pydio.com/u/M_Marco)\
**Post date:** [July 29, 2023, 9:12pm UTC](https://forum.pydio.com/t/docker-pull-problem/5441/1 "2023-07-29T21:12:32Z")

</div>

Hello everyone and thanks in advance.

### Describe your issue in detail

I had a problem with the database after pulling docker compose for an error. i was updating some dockers, and i was on the wrong folder, and then my pydio cells and mysql docker were updated without been my intention.  
My docker compose:

cat docker-compose.yml  
version: ‘3.9’  
services:

cells:  
image: pydio/cells:latest  
restart: unless-stopped  
hostname: pydio-cells  
ports: [“8080:8080”]  
environment:  
- CELLS\_LOG\_LEVEL=production  
- CELLS\_EXTERNAL=[https://xxxxxxxxxx.eu:443](https://xxxxxxxxxx.eu:443)  
volumes:  
- ./data:/var/cells/data  
- ./cellsdir:/var/cells

mysql:  
image: mysql:latest  
restart: unless-stopped  
ports: [“3306:3306”]  
environment:  
MYSQL\_ROOT\_PASSWORD: xxxxxxxxxxxxxxxxx  
MYSQL\_DATABASE: cells  
MYSQL\_USER: pydio  
MYSQL\_PASSWORD: xxxxxxxxxxx  
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4\_unicode\_ci]  
volumes:  
- ./mysqldir:/var/lib/mysql

This was working a year ago till today, without any problem. What i had, is backup of all this folders and volumes, the pydio one an the mysql.

once i trigger docker-compose up -d i got this error:

> Blockquote ERROR pydio.grpc.oauth Could not apply migrations {“error”: “error executing migrations/20190400000009000000\_oauth2.mysql.up.sql, sql: \n– First we need to delete all rows that point to a non-existing oauth2 client.\nDELETE FROM hydra\_oauth2\_access WHERE NOT EXISTS (SELECT 1 FROM hydra\_client WHERE hydra\_oauth2\_access.client\_id = hydra\_client.id);\nDELETE FROM hydra\_oauth2\_refresh WHERE NOT EXISTS (SELECT 1 FROM hydra\_client WHERE hydra\_oauth2\_refresh.client\_id = hydra\_client.id);\nDELETE FROM hydra\_oauth2\_code WHERE NOT EXISTS (SELECT 1 FROM hydra\_client WHERE hydra\_oauth2\_code.client\_id = hydra\_client.id);\nDELETE FROM hydra\_oauth2\_oidc WHERE NOT EXISTS (SELECT 1 FROM hydra\_client WHERE hydra\_oauth2\_oidc.client\_id = hydra\_client.id);\nDELETE FROM hydra\_oauth2\_pkce WHERE NOT EXISTS (SELECT 1 FROM hydra\_client WHERE hydra\_oauth2\_pkce.client\_id = hydra\_client.id);\n\n– request\_id is a 40 varchar in the referenced table which is why we are resizing\n– 1. We must remove request\_ids longer than 40 chars. This should never happen as we’ve never issued them longer than this\nDELETE FROM hydra\_oauth2\_access WHERE LENGTH(request\_id) \> 40;\nDELETE FROM hydra\_oauth2\_refresh WHERE LENGTH(request\_id) \> 40;\nDELETE FROM hydra\_oauth2\_code WHERE LENGTH(request\_id) \> 40;\nDELETE FROM hydra\_oauth2\_oidc WHERE LENGTH(request\_id) \> 40;\nDELETE FROM hydra\_oauth2\_pkce WHERE LENGTH(request\_id) \> 40;\n\n– 2. Next we’re actually resizing\nALTER TABLE hydra\_oauth2\_access MODIFY request\_id varchar(40) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_refresh MODIFY request\_id varchar(40) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_code MODIFY request\_id varchar(40) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_oidc MODIFY request\_id varchar(40) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_pkce MODIFY request\_id varchar(40) NOT NULL DEFAULT ‘’;\n\n– In preparation for creating the client\_id index and foreign key, we must set it to varchar(255) which is also\n– the length of hydra\_client.id\nDELETE FROM hydra\_oauth2\_access WHERE LENGTH(client\_id) \> 255;\nDELETE FROM hydra\_oauth2\_refresh WHERE LENGTH(client\_id) \> 255;\nDELETE FROM hydra\_oauth2\_code WHERE LENGTH(client\_id) \> 255;\nDELETE FROM hydra\_oauth2\_oidc WHERE LENGTH(client\_id) \> 255;\nDELETE FROM hydra\_oauth2\_pkce WHERE LENGTH(client\_id) \> 255;\nALTER TABLE hydra\_oauth2\_access MODIFY client\_id varchar(255) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_refresh MODIFY client\_id varchar(255) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_code MODIFY client\_id varchar(255) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_oidc MODIFY client\_id varchar(255) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_pkce MODIFY client\_id varchar(255) NOT NULL DEFAULT ‘’;\n\n– Now it’s time to create the index for client\_id\nCREATE INDEX hydra\_oauth2\_access\_client\_id\_idx ON hydra\_oauth2\_access (client\_id);\nCREATE INDEX hydra\_oauth2\_refresh\_client\_id\_idx ON hydra\_oauth2\_refresh (client\_id);\nCREATE INDEX hydra\_oauth2\_code\_client\_id\_idx ON hydra\_oauth2\_code (client\_id);\nCREATE INDEX hydra\_oauth2\_oidc\_client\_id\_idx ON hydra\_oauth2\_oidc (client\_id);\nCREATE INDEX hydra\_oauth2\_pkce\_client\_id\_idx ON hydra\_oauth2\_pkce (client\_id);\n\n– Foreign keys start here\n\n– This creates a foreign key that cascade delete’s if the client\_id is removed.\nALTER TABLE hydra\_oauth2\_access ADD CONSTRAINT hydra\_oauth2\_access\_client\_id\_fk FOREIGN KEY (client\_id) REFERENCES hydra\_client(id) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_refresh ADD CONSTRAINT hydra\_oauth2\_refresh\_client\_id\_fk FOREIGN KEY (client\_id) REFERENCES hydra\_client(id) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_code ADD CONSTRAINT hydra\_oauth2\_code\_client\_id\_fk FOREIGN KEY (client\_id) REFERENCES hydra\_client(id) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_oidc ADD CONSTRAINT hydra\_oauth2\_oidc\_client\_id\_fk FOREIGN KEY (client\_id) REFERENCES hydra\_client(id) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_pkce ADD CONSTRAINT hydra\_oauth2\_pkce\_client\_id\_fk FOREIGN KEY (client\_id) REFERENCES hydra\_client(id) ON DELETE CASCADE;\n\n– This creates a foreign key that cascade delete’s if the consent associated with this is removed.\nALTER TABLE hydra\_oauth2\_access ADD CONSTRAINT hydra\_oauth2\_access\_challenge\_id\_fk FOREIGN KEY (challenge\_id) REFERENCES hydra\_oauth2\_consent\_request\_handled(challenge) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_refresh ADD CONSTRAINT hydra\_oauth2\_refresh\_challenge\_id\_fk FOREIGN KEY (challenge\_id) REFERENCES hydra\_oauth2\_consent\_request\_handled(challenge) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_code ADD CONSTRAINT hydra\_oauth2\_code\_challenge\_id\_fk FOREIGN KEY (challenge\_id) REFERENCES hydra\_oauth2\_consent\_request\_handled(challenge) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_oidc ADD CONSTRAINT hydra\_oauth2\_oidc\_challenge\_id\_fk FOREIGN KEY (challenge\_id) REFERENCES hydra\_oauth2\_consent\_request\_handled(challenge) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_pkce ADD CONSTRAINT hydra\_oauth2\_pkce\_challenge\_id\_fk FOREIGN KEY (challenge\_id) REFERENCES hydra\_oauth2\_consent\_request\_handled(challenge) ON DELETE CASCADE;\n\n: Error 1061: Duplicate key name ‘hydra\_oauth2\_access\_client\_id\_idx’”, “errorVerbose”: “Error 1061: Duplicate key name ‘hydra\_oauth2\_access\_client\_id\_idx’\nerror executing migrations/20190400000009000000\_oauth2.mysql.up.sql, sql: \n– First we need to delete all rows that point to a non-existing oauth2 client.\nDELETE FROM hydra\_oauth2\_access WHERE NOT EXISTS (SELECT 1 FROM hydra\_client WHERE hydra\_oauth2\_access.client\_id = hydra\_client.id);\nDELETE FROM hydra\_oauth2\_refresh WHERE NOT EXISTS (SELECT 1 FROM hydra\_client WHERE hydra\_oauth2\_refresh.client\_id = hydra\_client.id);\nDELETE FROM hydra\_oauth2\_code WHERE NOT EXISTS (SELECT 1 FROM hydra\_client WHERE hydra\_oauth2\_code.client\_id = hydra\_client.id);\nDELETE FROM hydra\_oauth2\_oidc WHERE NOT EXISTS (SELECT 1 FROM hydra\_client WHERE hydra\_oauth2\_oidc.client\_id = hydra\_client.id);\nDELETE FROM hydra\_oauth2\_pkce WHERE NOT EXISTS (SELECT 1 FROM hydra\_client WHERE hydra\_oauth2\_pkce.client\_id = hydra\_client.id);\n\n– request\_id is a 40 varchar in the referenced table which is why we are resizing\n– 1. We must remove request\_ids longer than 40 chars. This should never happen as we’ve never issued them longer than this\nDELETE FROM hydra\_oauth2\_access WHERE LENGTH(request\_id) \> 40;\nDELETE FROM hydra\_oauth2\_refresh WHERE LENGTH(request\_id) \> 40;\nDELETE FROM hydra\_oauth2\_code WHERE LENGTH(request\_id) \> 40;\nDELETE FROM hydra\_oauth2\_oidc WHERE LENGTH(request\_id) \> 40;\nDELETE FROM hydra\_oauth2\_pkce WHERE LENGTH(request\_id) \> 40;\n\n– 2. Next we’re actually resizing\nALTER TABLE hydra\_oauth2\_access MODIFY request\_id varchar(40) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_refresh MODIFY request\_id varchar(40) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_code MODIFY request\_id varchar(40) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_oidc MODIFY request\_id varchar(40) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_pkce MODIFY request\_id varchar(40) NOT NULL DEFAULT ‘’;\n\n– In preparation for creating the client\_id index and foreign key, we must set it to varchar(255) which is also\n– the length of hydra\_client.id\nDELETE FROM hydra\_oauth2\_access WHERE LENGTH(client\_id) \> 255;\nDELETE FROM hydra\_oauth2\_refresh WHERE LENGTH(client\_id) \> 255;\nDELETE FROM hydra\_oauth2\_code WHERE LENGTH(client\_id) \> 255;\nDELETE FROM hydra\_oauth2\_oidc WHERE LENGTH(client\_id) \> 255;\nDELETE FROM hydra\_oauth2\_pkce WHERE LENGTH(client\_id) \> 255;\nALTER TABLE hydra\_oauth2\_access MODIFY client\_id varchar(255) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_refresh MODIFY client\_id varchar(255) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_code MODIFY client\_id varchar(255) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_oidc MODIFY client\_id varchar(255) NOT NULL DEFAULT ‘’;\nALTER TABLE hydra\_oauth2\_pkce MODIFY client\_id varchar(255) NOT NULL DEFAULT ‘’;\n\n– Now it’s time to create the index for client\_id\nCREATE INDEX hydra\_oauth2\_access\_client\_id\_idx ON hydra\_oauth2\_access (client\_id);\nCREATE INDEX hydra\_oauth2\_refresh\_client\_id\_idx ON hydra\_oauth2\_refresh (client\_id);\nCREATE INDEX hydra\_oauth2\_code\_client\_id\_idx ON hydra\_oauth2\_code (client\_id);\nCREATE INDEX hydra\_oauth2\_oidc\_client\_id\_idx ON hydra\_oauth2\_oidc (client\_id);\nCREATE INDEX hydra\_oauth2\_pkce\_client\_id\_idx ON hydra\_oauth2\_pkce (client\_id);\n\n– Foreign keys start here\n\n– This creates a foreign key that cascade delete’s if the client\_id is removed.\nALTER TABLE hydra\_oauth2\_access ADD CONSTRAINT hydra\_oauth2\_access\_client\_id\_fk FOREIGN KEY (client\_id) REFERENCES hydra\_client(id) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_refresh ADD CONSTRAINT hydra\_oauth2\_refresh\_client\_id\_fk FOREIGN KEY (client\_id) REFERENCES hydra\_client(id) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_code ADD CONSTRAINT hydra\_oauth2\_code\_client\_id\_fk FOREIGN KEY (client\_id) REFERENCES hydra\_client(id) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_oidc ADD CONSTRAINT hydra\_oauth2\_oidc\_client\_id\_fk FOREIGN KEY (client\_id) REFERENCES hydra\_client(id) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_pkce ADD CONSTRAINT hydra\_oauth2\_pkce\_client\_id\_fk FOREIGN KEY (client\_id) REFERENCES hydra\_client(id) ON DELETE CASCADE;\n\n– This creates a foreign key that cascade delete’s if the consent associated with this is removed.\nALTER TABLE hydra\_oauth2\_access ADD CONSTRAINT hydra\_oauth2\_access\_challenge\_id\_fk FOREIGN KEY (challenge\_id) REFERENCES hydra\_oauth2\_consent\_request\_handled(challenge) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_refresh ADD CONSTRAINT hydra\_oauth2\_refresh\_challenge\_id\_fk FOREIGN KEY (challenge\_id) REFERENCES hydra\_oauth2\_consent\_request\_handled(challenge) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_code ADD CONSTRAINT hydra\_oauth2\_code\_challenge\_id\_fk FOREIGN KEY (challenge\_id) REFERENCES hydra\_oauth2\_consent\_request\_handled(challenge) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_oidc ADD CONSTRAINT hydra\_oauth2\_oidc\_challenge\_id\_fk FOREIGN KEY (challenge\_id) REFERENCES hydra\_oauth2\_consent\_request\_handled(challenge) ON DELETE CASCADE;\nALTER TABLE hydra\_oauth2\_pkce ADD CONSTRAINT hydra\_oauth2\_pkce\_challenge\_id\_fk FOREIGN KEY (challenge\_id) REFERENCES hydra\_oauth2\_consent\_request\_handled(challenge) ON DELETE CASCADE;\n\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:95\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:233\ngithub.com/pydio/cells/v4/common/server.(\*server).Serve.func2.1\n\tgithub.com/pydio/cells/v4/common/server/server.go:111\ngolang.org/x/sync/errgroup.(\*Group).Go.func1\n\tgolang.org/x/sync@v0.1.0/errgroup/errgroup.go:75\nruntime.goexit\n\truntime/asm\_amd64.s:1594”}

> Blockquote

### What version of Cells are you using?

latest

### What is the server OS? Database name/version? Browser name or mobile device description (if issue appears client-side)?

My server is a debian 11 based server

### What steps have you taken to resolve this issue already?

i tried to deploy new container with new database, and it works, i see all working but is empty. once i dump my database information to the new one, i had the same error than above.

any help ?

BR

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/6/61f19fa52ec15fd4250db51aea351adba0e831fd.png) [@system](https://forum.pydio.com/u/system)\
**Post date:** [September 27, 2023, 9:12pm UTC](https://forum.pydio.com/t/docker-pull-problem/5441/2 "2023-09-27T21:12:59Z")

</div>

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