Hi I'm running a selfhosted instance using docker ...
# infisical-help
p
Hi I'm running a selfhosted instance using docker I just upgraded from 0.132.4-postgres to whatever 'docker-compose pull' gives Now when I try to start it up it is in some kind of migration loop that never ends. One key point in the output seems to be an error
Copy code
infisical-backend | {"level":30,"time":1759350362085,"pid":1,"hostname":"c3037a7e57ec","reqId":"UNKNOWN_REQUEST_ID","severity":"INFO","msg":"Finished inserting folder checkpoints - batch 1 of 2"}
infisical-db | 2025-10-01 20:26:03.890 UTC [467] ERROR:  null value in column "folderCommitId" of relation "folder_commit_changes" violates not-null constraint
infisical-db | 2025-10-01 20:26:03.890 UTC [467] DETAIL:  Failing row contains (c21a897a-1bd3-43c4-9b23-e504d220c02d, null, add, f, 5e5a85a3-4a08-4459-8995-a60e8fe78afb, null, 2025-10-01 20:25:54.012586+00, 2025-10-01 20:25:54.012586+00).
infisical-db | 2025-10-01 20:26:03.890 UTC [467] STATEMENT:  insert into "folder_commit_changes" ("changeType", "folderCommitId", "folderVersionId", "isUpdate", "secretVersionId") values ($1, $2, DEFAULT, $3,
...
What did I miss?
✅ 1
v
Hi @Peter Sjoberg! @Daniel Hougaard should be able to help with this. Maybe we should move this to the main channel we have?
p
put it here since it's my private setup
d
Hi @Peter Sjoberg, could I please ask you to try and upgrade to version
v0.133.0-postgres
, and let me know if you see the same error? If that succeeds, you can then try to upgrade to the latest version!
p
Tried, got same error btw, I noticed that latest version of docker-compose.prod.yml doesn't have db-migration, should I remove it?
Copy code
root@ds9:/data/infisical# docker-compose up -d;docker-compose logs -f #INFISICAL_START
Creating infisical-db        ... done
Creating infisical-dev-redis ... done
Creating infisical-db-migration ... done

ERROR: for backend  Container "7ebe27739490" exited with code 1.
ERROR: Encountered errors while bringing up the project.
Attaching to infisical-db-migration, infisical-dev-redis, infisical-db
infisical-db-migration |
infisical-db-migration | > backend@1.0.0 migration:latest
infisical-db-migration | > node ./dist/db/rename-migrations-to-mjs.mjs && npm run auditlog-migration:latest && knex --knexfile ./dist/db/knexfile.mjs --client pg migrate:latest
infisical-db-migration |
infisical-db-migration |
infisical-db-migration | > backend@1.0.0 auditlog-migration:latest
infisical-db-migration | > node ./dist/db/rename-migrations-to-mjs.mjs && knex --knexfile ./dist/db/auditlog-knexfile.mjs --client pg migrate:latest
infisical-db-migration |
infisical-db-migration | Working directory changed to /backend/dist/db
infisical-db-migration | Dedicated audit log database not found. No further migrations necessary
infisical-db-migration | npm notice
infisical-db-migration | npm notice New major version of npm available! 10.8.2 -> 11.6.1
infisical-db-migration | npm notice Changelog: <https://github.com/npm/cli/releases/tag/v11.6.1>
infisical-db-migration | npm notice To update run: npm install -g npm@11.6.1
infisical-db-migration | npm notice
infisical-db-migration | Working directory changed to /backend/dist/db
infisical-db-migration | Using environment: production
infisical-db-migration | {"level":30,"time":1759408226612,"pid":64,"hostname":"7ebe27739490","reqId":"UNKNOWN_REQUEST_ID","severity":"INFO","msg":"Starting secret version fix migration"}
infisical-db-migration | {"level":30,"time":1759408226766,"pid":64,"hostname":"7ebe27739490","reqId":"UNKNOWN_REQUEST_ID","severity":"INFO","msg":"Found 54799 shared secrets to process"}
infisical-db-migration | {"level":30,"time":1759408226767,"pid":64,"hostname":"7ebe27739490","reqId":"UNKNOWN_REQUEST_ID","severity":"INFO","msg":"Processing chunk 1 of 11"}
...
infisical-db-migration | {"level":30,"time":1759408234261,"pid":64,"hostname":"7ebe27739490","reqId":"UNKNOWN_REQUEST_ID","severity":"INFO","msg":"Finished inserting folder checkpoints - batch 1 of 2"}
infisical-db-migration | migration file "20250602155452_pit-projects-commits-initialization.mjs" failed
infisical-db-migration | migration failed with error: insert into "folder_commit_changes" ("changeType", "folderCommitId", "folderVersionId", "isUpdate", "secretVersionId") values ($1, $2, DEFAULT, $3, $4), ($5
...
DEFAULT, $3003, $3004), ($3005, DEFAULT, DEFAULT, $3006, $3007), ($3008, DEFAULT, DEFAULT, $3009, $3010), ($3011, DEFAULT, DEFAULT, $3012, $3013) - null value in column "folderCommitId" of relation "folder_commit_changes" violates not-null constraint
infisical-db-migration | insert into "folder_commit_changes" ("changeType", "folderCommitId", "folderVersionId", "isUpdate", "secretVersionId") values ($1, $2, DEFAULT, $3, $4), ($5, $6, DEFAULT, $7, $8), ($9, $10, DEFAULT, $11, $12), ($13, $14, DEFAULT, $15, $16), ($17, $18, DEFAULT, 
...
5, DEFAULT, DEFAULT, $3006, $3007), ($3008, DEFAULT, DEFAULT, $3009, $3010), ($3011, DEFAULT, DEFAULT, $3012, $3013) - null value in column "folderCommitId" of relation "folder_commit_changes" violates not-null constraint
infisical-db-migration | Failing row contains (1cd0c8ab-c390-4a60-9055-b71da24825d4, null, add, f, 5e5a85a3-4a08-4459-8995-a60e8fe78afb, null, 2025-10-02 12:30:26.019647+00, 2025-10-02 12:30:26.019647+00).
infisical-db-migration | error: insert into "folder_commit_changes" ("changeType", "folderCommitId", "folderVersionId", "isUpdate", "secretVersionId") values ($1, $2, DEFAULT, $3, $4), ($5, $6, DEFAULT, $7, $8)
...
Did a quick test, all with infisical/infisical:v0.132.4-postgres 1 - removed db-migration from docker-compose.yml 2 - backup the db (pg_dump) 3 - stop infisical 4 - renamed my data directory and created an empty one (I'm using files on disk instead of docker volumens) 5 - started up just the database (now completely empty) 6 - import the backup 7 - stop db 8 - start infisical all good so far 9 - stop infisical 10 changed to 0.133.0 11 - start infisical same issue,
Copy code
...
 $3007), ($3008, DEFAULT, DEFAULT, $3009, $3010), ($3011, DEFAULT, DEFAULT, $3012, $3013) - null value in column \"folderCommitId\" of relation \"folder_commit_changes\" violates not-null constraint\n    at Parser.parseErrorMessage (/backend/node_modules/pg-protocol/src/parser.ts:368:69)\n    at Parser.handlePacket (/backend/node_modules/pg-protocol/src/parser.ts:187:21)\n    at Parser.parse (/backend/node_modules/pg-protocol/src/parser.ts:102:30)\n    at Socket.<anonymous> (/backend/node_modules/pg-protocol/src/index.ts:7:48)\n    at Socket.emit (node:events:524:28)\n    at Socket.emit (node:domain:489:12)\n    at addChunk (node:internal/streams/readable:561:12)\n    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n    at Readable.push (node:internal/streams/readable:392:5)\n    at TCP.onStreamRead (node:internal/stream_base_commons:191:23)","length":394,"name":"error","severity":"ERROR","code":"23502","detail":"Failing row contains (e5a9c9b0-2a18-478d-ac27-7d3636c41318, null, add, f, 5e5a85a3-4a08-4459-8995-a60e8fe78afb, null, 2025-10-02 14:40:55.746451+00, 2025-10-02 14:40:55.746451+00).","schema":"public","table":"folder_commit_changes","column":"folderCommitId","file":"execMain.c","line":"1886","routine":"ExecConstraints"},"msg":"Boot up migration failed"}
infisical-backend exited with code 1
infisical-backend | 0 added, 0 removed; done.