self-hosted icon indicating copy to clipboard operation
self-hosted copied to clipboard

QueryFailedError: Unknown column 'user.kp_created' in 'field list'

Open white-gecko opened this issue 4 years ago • 5 comments

Describe the issue I want to migrate from the ruby-server to the new standalone setup. But I can't login and receive an "Unknown error". The docker-compose log output reports:

QueryFailedError: Unknown column 'user.kp_created' in 'field list'

I've followed the following guides:

  • https://docs.standardnotes.org/self-hosting/docker
  • https://docs.standardnotes.org/self-hosting/legacy-migration/

Service Versions (please complete the following information):

  • syncing-server-js: 1.35.2
  • auth: 1.11.0
  • api-gateway: 1.20.0

Logs If applicable, add logs to help debug your problem.

auth_1                      | query failed: SELECT `user`.`uuid` AS `user_uuid`, `user`.`version` AS `user_version`, `user`.`email` AS `user_email`, `user`.`pw_nonce` AS `user_pw_nonce`, `user`.`encrypted_server_key` AS `user_encrypted_server_key`, `user`.`server_encryption_version` AS `user_server_encryption_version`, `user`.`kp_created` AS `user_kp_created`, `user`.`kp_origination` AS `user_kp_origination`, `user`.`pw_cost` AS `user_pw_cost`, `user`.`pw_key_size` AS `user_pw_key_size`, `user`.`pw_salt` AS `user_pw_salt`, `user`.`pw_alg` AS `user_pw_alg`, `user`.`pw_func` AS `user_pw_func`, `user`.`encrypted_password` AS `user_encrypted_password`, `user`.`created_at` AS `user_created_at`, `user`.`updated_at` AS `user_updated_at`, `user`.`locked_until` AS `user_locked_until`, `user`.`num_failed_attempts` AS `user_num_failed_attempts`, `user`.`updated_with_user_agent` AS `user_updated_with_user_agent` FROM `users` `user` WHERE `user`.`email` = ? -- PARAMETERS: ["<mylogin>"]
auth_1                      | QueryFailedError: Unknown column 'user.kp_created' in 'field list'
auth_1                      |     at new QueryFailedError (/var/www/node_modules/typeorm/error/QueryFailedError.js:11:28)
auth_1                      |     at Query.onResult (/var/www/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js:216:45)
auth_1                      |     at Query.execute (/var/www/node_modules/mysql2/lib/commands/command.js:30:14)
auth_1                      |     at PoolConnection.handlePacket (/var/www/node_modules/mysql2/lib/connection.js:425:32)
auth_1                      |     at PacketParser.onPacket (/var/www/node_modules/mysql2/lib/connection.js:75:12)
auth_1                      |     at PacketParser.executeStart (/var/www/node_modules/mysql2/lib/packet_parser.js:75:16)
auth_1                      |     at Socket.<anonymous> (/var/www/node_modules/mysql2/lib/connection.js:82:25)
auth_1                      |     at Socket.emit (node:events:378:20)
auth_1                      |     at Socket.EventEmitter.emit (node:domain:470:12)
auth_1                      |     at addChunk (node:internal/streams/readable:313:12)

white-gecko avatar Jul 18 '21 18:07 white-gecko

Sounds like there are migrations that haven't run yet. I'd try starting the setup process over again to ensure you didn't miss any steps.

moughxyz avatar Jul 19 '21 13:07 moughxyz

How can I see and verify, if all migration steps were executed?

white-gecko avatar Jul 19 '21 18:07 white-gecko

I've started the setup procedure on the server all over again, with empty mysql and redis but still get the same error on the console, when I try to log in. I even left the server do all initialization jobs and waited 10 minutes after nothing new was written to the log.

white-gecko avatar Jul 19 '21 18:07 white-gecko

The auth-worker also logs:

auth-worker_1               | No migrations are pending

white-gecko avatar Jul 19 '21 18:07 white-gecko

Ok, I gave up and started a new server with empty database and registered a new account and have restored my notes from the backup

white-gecko avatar Jul 19 '21 20:07 white-gecko