standardnotes / self-hosted

[Legacy] Self-host your own Standard Notes server for end-to-end encrypted notes and files
https://github.com/standardnotes/server
GNU Affero General Public License v3.0
343 stars 39 forks source link

Revisions DB not starting properly: Is revisions required? #112

Closed macdonaldj closed 1 year ago

macdonaldj commented 1 year ago

Service Versions (please complete the following information):

./server.sh version
CONTAINER                              REPOSITORY                        TAG                 IMAGE ID            SIZE
api-gateway-self-hosted                standardnotes/api-gateway         latest              691d160ab707        207MB
auth-self-hosted                       standardnotes/auth                latest              69adf8a89074        222MB
auth-worker-self-hosted                standardnotes/auth                latest              69adf8a89074        222MB
cache-self-hosted                      redis                             6.0-alpine          374a6ec6dd63        26.3MB
db-self-hosted                         mysql                             5.6                 dd3b2a5dcb48        303MB
files-self-hosted                      standardnotes/files               latest              8613abf8ad9a        208MB
files-worker-self-hosted               standardnotes/files               latest              8613abf8ad9a        208MB
revisions-db-self-hosted               mysql                             8                   7484689f290f        538MB
revisions-self-hosted                  standardnotes/revisions           latest              ed0b47a8e2f4        217MB
revisions-worker-self-hosted           standardnotes/revisions           latest              ed0b47a8e2f4        217MB
self-hosted-localstack-1               localstack/localstack             latest              3e0023483779        1.86GB
syncing-server-js-self-hosted          standardnotes/syncing-server-js   latest              997036d1a7f3        219MB
syncing-server-js-worker-self-hosted   standardnotes/syncing-server-js   latest              997036d1a7f3        219MB

Describe the issue Running through steps from https://docs.standardnotes.com/self-hosting/docker/

Revision DB never starts properly. All else seems to start properly. Is revisions required?

Logs

revisions-db-self-hosted  | 2023-01-12T17:49:41.396242251Z 2023-01-12 17:49:41+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
revisions-db-self-hosted  | 2023-01-12T17:49:42.503659708Z 2023-01-12 17:49:42+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
revisions-db-self-hosted  | 2023-01-12T17:49:42.563887176Z 2023-01-12 17:49:42+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
revisions-db-self-hosted  | 2023-01-12T17:49:42.983374327Z 2023-01-12 17:49:42+00:00 [Note] [Entrypoint]: Initializing database files
revisions-db-self-hosted  | 2023-01-12T17:49:43.017483108Z 2023-01-12T17:49:43.007912Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
revisions-db-self-hosted  | 2023-01-12T17:49:43.017508378Z 2023-01-12T17:49:43.011119Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
revisions-db-self-hosted  | 2023-01-12T17:49:43.017515068Z 2023-01-12T17:49:43.011174Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.31) initializing of server in progress as process 80
revisions-db-self-hosted  | 2023-01-12T17:49:43.017520888Z 2023-01-12T17:49:43.014054Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
revisions-db-self-hosted  | 2023-01-12T17:49:43.017527018Z 2023-01-12T17:49:43.014064Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8mb3_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
revisions-db-self-hosted  | 2023-01-12T17:49:43.040022905Z 2023-01-12T17:49:43.039757Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
revisions-db-self-hosted  | 2023-01-12T17:49:44.935534013Z 2023-01-12T17:49:44.932631Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
revisions-db-self-hosted  | 2023-01-12T17:49:48.455243059Z 2023-01-12T17:49:48.455085Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
revisions-db-self-hosted  | 2023-01-12T20:42:51.540795793Z 2023-01-12 20:42:51+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
revisions-db-self-hosted  | 2023-01-12T20:42:52.786515305Z 2023-01-12 20:42:52+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
revisions-db-self-hosted  | 2023-01-12T20:42:52.883030468Z 2023-01-12 20:42:52+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
revisions-db-self-hosted  | 2023-01-12T20:42:53.319627011Z '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
revisions-db-self-hosted  | 2023-01-12T20:42:53.705708132Z 2023-01-12T20:42:53.695264Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
revisions-db-self-hosted  | 2023-01-12T20:42:53.707059838Z 2023-01-12T20:42:53.697596Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
revisions-db-self-hosted  | 2023-01-12T20:42:53.707069148Z 2023-01-12T20:42:53.699417Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31) starting as process 1
revisions-db-self-hosted  | 2023-01-12T20:42:53.707073448Z 2023-01-12T20:42:53.701424Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
revisions-db-self-hosted  | 2023-01-12T20:42:53.707088598Z 2023-01-12T20:42:53.701439Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8mb3_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
revisions-db-self-hosted  | 2023-01-12T20:42:53.731585396Z 2023-01-12T20:42:53.731354Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
revisions-db-self-hosted  | 2023-01-12T20:42:53.960038021Z 2023-01-12T20:42:53.959850Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
revisions-db-self-hosted  | 2023-01-12T20:42:54.359747267Z 2023-01-12T20:42:54.359639Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
revisions-db-self-hosted  | 2023-01-12T20:42:54.362504880Z 2023-01-12T20:42:54.360017Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
revisions-db-self-hosted  | 2023-01-12T20:42:54.362529761Z 2023-01-12T20:42:54.360055Z 0 [ERROR] [MY-010119] [Server] Aborting
revisions-db-self-hosted  | 2023-01-12T20:42:54.362536221Z 2023-01-12T20:42:54.360650Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.31)  MySQL Community Server - GPL.
jonwsoto commented 1 year ago

Was asked on discord. Here's what karol said.

"we will be moving all revisions (aka note history) to a separate database and a separate microservice will be handling it"

jackyzy823 commented 1 year ago

currently no, but future yes.

currently snjs using v1 endpoint which locates in syncserver microservice

Someday snjs will use v2 endpoint which in revisions microservice separately.

Besides, I hope that standardnotes developers could provide a migration script (because two revision table have different schema) to help move revision data from one db to another new db.

macdonaldj commented 1 year ago

ok, so current snjs doenst use it, so not having it shouldnt affect my server