Open AdamXweb opened 5 months ago
Docker-compose.yml contains:
services:
server:
image: standardnotes/server
env_file: .env
container_name: server_self_hosted
restart: unless-stopped
ports:
- 3088:3000
- 3125:3104
volumes:
- ./logs:/var/lib/server/logs
- ./uploads:/opt/server/packages/files/dist/uploads
networks:
- standardnotes_self_hosted
localstack:
image: localstack/localstack:1.3
container_name: localstack_self_hosted
expose:
- 4566
restart: unless-stopped
environment:
- SERVICES=sns,sqs
- HOSTNAME_EXTERNAL=localstack
- LS_LOG=warn
volumes:
- ./localstack_bootstrap.sh:/etc/localstack/init/ready.d/localstack_bootstrap.sh
networks:
- standardnotes_self_hosted
db:
image: mysql:8
container_name: db_self_hosted
environment:
- MYSQL_DATABASE=standard_notes_db
- MYSQL_USER=std_notes_user
- MYSQL_ROOT_PASSWORD=<<redacted>>
- MYSQL_PASSWORD=<<redacted>>
expose:
- 3306
restart: unless-stopped
command: --mysql-native-password=ON --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
volumes:
- ./data/mysql:/var/lib/mysql
- ./data/import:/docker-entrypoint-initdb.d
networks:
- standardnotes_self_hosted
cache:
image: redis:6.0-alpine
container_name: cache_self_hosted
volumes:
- ./data/redis/:/data
expose:
- 6379
restart: unless-stopped
networks:
- standardnotes_self_hosted
networks:
standardnotes_self_hosted:
name: standardnotes_self_hosted
and .env
######
# DB #
######
DB_HOST=db
DB_PORT=3306
DB_USERNAME=<<redacted>>
DB_PASSWORD=<<redacted>>
DB_DATABASE=standard_notes_db
DB_TYPE=mysql
#########
# CACHE #
#########
REDIS_PORT=6379
REDIS_HOST=cache
CACHE_TYPE=redis
########
# KEYS #
########
AUTH_JWT_SECRET=<<redacted>>
AUTH_SERVER_ENCRYPTION_SERVER_KEY=<<redacted>>
VALET_TOKEN_SECRET=<<redacted>>
PUBLIC_FILES_SERVER_URL=http://<<hostname>>:3125
Revisions-worker.log
{"level":"error","message":"Error occured while handling SQS message: SQSError: SQS receive message failed: getaddrinfo EAI_AGAIN localstack\n at toSQSError (/opt/server/.yarn/__virtual__/sqs-consumer-virtual-a292e446e4/0/cache/sqs-consumer-npm-8.1.0-acaed020b6-7fe1c17b9f.zip/node_modules/sqs-consumer/dist/errors.js:47:22)\n at Consumer.receiveMessage (/opt/server/.yarn/__virtual__/sqs-consumer-virtual-a292e446e4/0/cache/sqs-consumer-npm-8.1.0-acaed020b6-7fe1c17b9f.zip/node_modules/sqs-consumer/dist/consumer.js:189:43)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {\n code: 'Error',\n statusCode: undefined,\n retryable: undefined,\n service: undefined,\n fault: undefined,\n time: 2024-06-05T11:37:41.275Z\n}","service":"revisions:worker"}
syncing-server-worker.log
{"level":"error","message":"Error occured while handling SQS message: SQSError: SQS receive message failed: connect ECONNREFUSED 172.24.0.5:4566\n at toSQSError (/opt/server/.yarn/__virtual__/sqs-consumer-virtual-a292e446e4/0/cache/sqs-consumer-npm-8.1.0-acaed020b6-7fe1c17b9f.zip/node_modules/sqs-consumer/dist/errors.js:47:22)\n at Consumer.receiveMessage (/opt/server/.yarn/__virtual__/sqs-consumer-virtual-a292e446e4/0/cache/sqs-consumer-npm-8.1.0-acaed020b6-7fe1c17b9f.zip/node_modules/sqs-consumer/dist/consumer.js:189:43)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {\n code: 'Error',\n statusCode: undefined,\n retryable: undefined,\n service: undefined,\n fault: undefined,\n time: 2024-06-05T08:58:02.305Z\n}","service":"syncing-server:worker"}
files-worker.log
{"level":"error","message":"Error occured while handling SQS message: SQSError: SQS receive message failed: connect ECONNREFUSED 172.24.0.5:4566\n at toSQSError (/opt/server/.yarn/__virtual__/sqs-consumer-virtual-a292e446e4/0/cache/sqs-consumer-npm-8.1.0-acaed020b6-7fe1c17b9f.zip/node_modules/sqs-consumer/dist/errors.js:47:22)\n at Consumer.receiveMessage (/opt/server/.yarn/__virtual__/sqs-consumer-virtual-a292e446e4/0/cache/sqs-consumer-npm-8.1.0-acaed020b6-7fe1c17b9f.zip/node_modules/sqs-consumer/dist/consumer.js:189:43)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {\n code: 'Error',\n statusCode: undefined,\n retryable: undefined,\n service: undefined,\n fault: undefined,\n time: 2024-06-05T11:05:01.489Z\n}","service":"files:worker"}
auth.log
query: SELECT `session`.`uuid` AS `session_uuid`, `session`.`user_uuid` AS `session_user_uuid`, `session`.`hashed_access_token` AS `session_hashed_access_token`, `session`.`hashed_refresh_token` AS `session_hashed_refresh_token`, `session`.`access_expiration` AS `session_access_expiration`, `session`.`refresh_expiration` AS `session_refresh_expiration`, `session`.`api_version` AS `session_api_version`, `session`.`user_agent` AS `session_user_agent`, `session`.`created_at` AS `session_created_at`, `session`.`updated_at` AS `session_updated_at`, `session`.`readonly_access` AS `session_readonly_access` FROM `sessions` `session` WHERE `session`.`uuid` = ? -- PARAMETERS: ["<<redacted>>"]
query: 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` FROM `users` `user` WHERE `user`.`uuid` = ? -- PARAMETERS: ["<<redacted>>"]
query: SELECT `roles`.`uuid` AS `roles_uuid`, `roles`.`name` AS `roles_name`, `roles`.`version` AS `roles_version`, `roles`.`created_at` AS `roles_created_at`, `roles`.`updated_at` AS `roles_updated_at` FROM `roles` `roles` INNER JOIN `user_roles` `user_roles` ON `user_roles`.`user_uuid` IN (?) AND `user_roles`.`role_uuid`=`roles`.`uuid` -- PARAMETERS: ["6bac8da5-2d5d-451a-888c-ca2ce4d31637"]
query: SELECT `shared_vault_user`.`uuid` AS `shared_vault_user_uuid`, `shared_vault_user`.`shared_vault_uuid` AS `shared_vault_user_shared_vault_uuid`, `shared_vault_user`.`user_uuid` AS `shared_vault_user_user_uuid`, `shared_vault_user`.`permission` AS `shared_vault_user_permission`, `shared_vault_user`.`is_designated_survivor` AS `shared_vault_user_is_designated_survivor`, `shared_vault_user`.`created_at_timestamp` AS `shared_vault_user_created_at_timestamp`, `shared_vault_user`.`updated_at_timestamp` AS `shared_vault_user_updated_at_timestamp` FROM `auth_shared_vault_users` `shared_vault_user` WHERE `shared_vault_user`.`user_uuid` = ? -- PARAMETERS: ["<<redacted>>"]
@AdamXweb did you ever get this resolved? I have the same issue of duplicating notes, but LocalStack has no errors.
I do though have the same errors in Revisions-worker.log
I ended up switching away from StandardNotes to FSnotes which simplified everything
I think the issue is narrowed down to localstack, as this is the error i'm getting:
The latest note has been duplicated thousands of times, and i've now run into thousands of items.
Not sure what else I can provide, but it's causing the app to crash and display a white box. I also can't delete them as selecting too many notes is crashing the app.
The console log shows these errors.
In network, there are a constant stream of requests to {{URL}}/v1/items with about 149 items of the same entry
While writing this, it has continued to increase. It looks like its adding entries to the trash?
My client is running standardnotes on MacOS Version 3.194.0
Please let me know what other information I can provide