Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[BUG] Cannot login with latest docker containers #81

Closed
eric-pierce opened this issue Jul 25, 2022 · 40 comments
Closed

[BUG] Cannot login with latest docker containers #81

eric-pierce opened this issue Jul 25, 2022 · 40 comments
Labels
bug Something isn't working

Comments

@eric-pierce
Copy link
Contributor

eric-pierce commented Jul 25, 2022

Versions
"Latest" tags from docker hub

Describe the bug
Logging in with the latest version of the docker containers from dockerhub (new deployment method used) fails login stagek. Downgrading to the previous hardcoded version resolves the issue.

To Reproduce
Leverage the latest version of the application from dockerhub, try to log in

Expected behavior
Login successful

Logs
[ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)

Additional context
When using the latest version of the docker images login is flagged as incorrect. When downgrading to the version of the docker containers used before the recent switchover to the latest tag, login works as expected:

standardnotes/syncing-server-js:1.54.1
standardnotes/auth:1.46.2
standardnotes/api-gateway:1.40.1

@eric-pierce eric-pierce added the bug Something isn't working label Jul 25, 2022
@eric-pierce
Copy link
Contributor Author

eric-pierce commented Jul 27, 2022

This does look to be an issue with the latest set of docker images. I disabled two-factor authentication and this issue persists. I'll update the title accordingly.

Everything works fine if I downgrade to the versions listed at the bottom of my last comment. With the latest versions from dockerhub (deleted previous images, ensured the latest were pulled from dockerhub) I get the following output from the auth container:

[ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
    at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
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`.`email` = ? -- PARAMETERS: ["REDACTED"]
query: SELECT `setting`.`uuid` AS `setting_uuid`, `setting`.`name` AS `setting_name`, `setting`.`value` AS `setting_value`, `setting`.`server_encryption_version` AS `setting_server_encryption_version`, `setting`.`created_at` AS `setting_created_at`, `setting`.`updated_at` AS `setting_updated_at`, `setting`.`sensitive` AS `setting_sensitive`, `setting`.`user_uuid` AS `setting_user_uuid` FROM `settings` `setting` WHERE `setting`.`name` = ? AND `setting`.`user_uuid` = ? ORDER BY updated_at DESC LIMIT 1 -- PARAMETERS: ["MFA_SECRET","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`.`email` = ? -- PARAMETERS: ["REDACTED"]
[ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
    at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
{"level":"error","message":"ReplyError: WRONGPASS invalid username-password pair or user is disabled.\n    at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)\n    at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)"}
[ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
    at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
[ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
    at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
[ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
    at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
[ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
    at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
{"level":"error","message":"Error occurred during authentication of a user ReplyError: WRONGPASS invalid username-password pair or user is disabled.\n    at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)\n    at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14) {\n  [stack]: 'ReplyError: WRONGPASS invalid username-password pair or user is disabled.\\n' +\n    '    at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)\\n' +\n    '    at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)',\n  [message]: 'WRONGPASS invalid username-password pair or user is disabled.',\n  command: { name: 'auth', args: [ 'redis', 'REDACTED', [length]: 2 ] },\n  [name]: [Getter]\n}"}
[ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
    at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)

@eric-pierce eric-pierce changed the title [BUG] Two factor code not recognized with latest docker tags [BUG] Cannot login with latest docker containers Jul 27, 2022
@cmosetick
Copy link

I just wanted to confirm that I have the same exact problems that @eric-pierce reported. And also want to mention for others that end up here that the previous version of the docker-compose.yml file fixes this issue for me:

https://github.com/standardnotes/standalone/blob/fbcef31fc4536e887322b7faf6189ac9eb1eb735/docker-compose.yml

Additionally, I would like to know what were the reasons for dropping the specific version numbers in the image tags. I have been able to go through several successive upgrade cycles using the compose files that provide the specific versions of tags.

Anyway, thanks to all that make this amazing project a viable reality.
Truly appreciated!

@BobWs
Copy link

BobWs commented Aug 11, 2022

Any progress on this “bug”?

@eric-pierce
Copy link
Contributor Author

Any progress on this “bug”?

It doesn't look like this has been acknowledged by the SN team yet. I'm still using the old versions from the last docker-compose version specific file, but would much prefer to be able to keep the system up to date with the latest containers.

@BobWs
Copy link

BobWs commented Aug 12, 2022

I'm still using the old versions from the last docker-compose version specific file, but would much prefer to be able to keep the system up to date with the latest containers.

Same here, still using the previous version specific file. The problem with the latest tag has been around since the beginning when they switch to the new server version. I already mentioned it back in the day but nothing happened…

@jackyzy823
Copy link

I'm willing to help , but i can not reproduce this error with a clean clone and the latest image (as of 20220818).

Can anyone provide the detail image version ( by docker image ls |grep standardnotes ) and what modification are applied to docker-compose.yml and env files.

@eric-pierce
Copy link
Contributor Author

eric-pierce commented Aug 18, 2022

EDIT: just updated the latest containers to latest version - issue persists, details below

Thanks for the note @jackyzy823 - here are the details of my containers and logs:

standardnotes/auth                 latest            efdf98722019   33 hours ago    174MB
standardnotes/syncing-server-js    latest            414bcd0ce26b   2 days ago      171MB
standardnotes/api-gateway          latest            a7657d456901   2 days ago      161MB
standardnotes/web                  stable            6e0bad712847   3 weeks ago     3.33GB

Logs from my auth container with the images above:

snauth  | mariadb (172.20.0.3:3306) open
snauth  | mariadb:3306 is up - executing command
snauth  | redis (172.20.0.2:6379) open
snauth  | redis:6379 is up - executing command
snauth  | snsync:3000 is unavailable yet - waiting for it to start
snauth  | snsync (172.20.0.8:3000) open
snauth  | snsync:3000 is up - executing command
snauth  | Starting Web...
snauth  | query: SELECT VERSION() AS `version`
snauth  | INFO: All classes found using provided glob pattern "dist/migrations/*.js" : "dist/migrations/1606470249553-init_database.js,dist/migrations/1610015065194-add_revoked_sessions.js,dist/migrations/1610025371088-add_foreign_key_to_revoked_sessions.js,dist/migrations/1612191669523-add_roles_and_permissions.js,dist/migrations/1612255683992-add_roles_and_permissions_data.js,dist/migrations/1612433739754-add_more_roles_and_permissions.js,dist/migrations/1614678016791-add_user_settings.js,dist/migrations/1614771815912-add_encrypted_version.js,dist/migrations/1614775877590-add_encrypted_version_for_user.js,dist/migrations/1624434102642-update_roles_and_permissions.js,dist/migrations/1625164984414-change_setting_timestamps.js,dist/migrations/1625227894975-change_setting_value_size.js,dist/migrations/1625767770284-change_setting_value_to_nullable.js,dist/migrations/1625807999951-add_unique_setting_index.js,dist/migrations/1626268390207-remove_unique_setting_index.js,dist/migrations/1626689139110-add_user_subscriptions.js,dist/migrations/1626717016896-fix_subscription_foreign_key.js,dist/migrations/1627638504691-move_mfa_items_to_user_settings.js,dist/migrations/1629215600192-generate_user_server_key.js,dist/migrations/1629217630132-encrypt_encoded_mfa_settings.js,dist/migrations/1629223072059-flatten_mfa_setting_and_encrypt.js,dist/migrations/1629703896382-add_markdown_math.js,dist/migrations/1629705289178-add_sensitive_flag.js,dist/migrations/1629972294975-fix_basic_and_core_user.js,dist/migrations/1630661830850-fix_encryption_version_on_mfa_settings.js,dist/migrations/1630905831679-add-cancelled-flag.js,dist/migrations/1634064348750-add_offline_settings.js,dist/migrations/1634102065310-add_offline_subscriptions.js,dist/migrations/1634102764797-add_offline_user_roles.js,dist/migrations/1635167238332-remove_spreadsheets_from_plus_plan.js,dist/migrations/1635172524403-add_subscription_id.js,dist/migrations/1635344737460-add_missing_permissions.js,dist/migrations/1635860707639-add_mandatory_subscription_id.js,dist/migrations/1638388151083-add_tags_and_focus_permissions.js,dist/migrations/1639998097029-add_role_version.js,dist/migrations/1640701224273-add-smart-tags.js,dist/migrations/1640862425427-remove_no_distraction_theme.js,dist/migrations/1645094434931-add_sign_in_alerts_permission.js,dist/migrations/1646817642385-add_markdown_visual_editor_permissions.js,dist/migrations/1647253634773-fix_storage_quota_on_plans.js,dist/migrations/1647421277767-remove_user_agent.js,dist/migrations/1647862631224-add_readonly_sessions.js,dist/migrations/1648112718114-add_tag_nesting_permission.js,dist/migrations/1648458841415-add_shared_subscription_invitations.js,dist/migrations/1648550676786-add_subscription_types.js,dist/migrations/1648629732139-add_beta_files_user_role.js,dist/migrations/1649660400536-add_subscription_settings.js,dist/migrations/1649679945386-remove_files_settings_from_user_settings.js,dist/migrations/1650890853447-change_upload_quota_tiers.js,dist/migrations/1651046286472-add_2fa.js,dist/migrations/1651064332146-remove_2fa_manager.js,dist/migrations/1652258146238-add_missing_plus_permissions.js,dist/migrations/1652786070920-remove_basic_user_role.js,dist/migrations/1652880249670-add_analytics_entities.js,dist/migrations/1654760926952-add_email_backup_permission.js,dist/migrations/1654877423147-add_advanced_checklist_editor_permission.js"
snauth  | query: SELECT * FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA` = 'standardnotes' AND `TABLE_NAME` = 'migrations'
snauth  | query: SELECT * FROM `standardnotes`.`migrations` `migrations` ORDER BY `id` DESC
snauth  | No migrations are pending
snauth  | {"level":"info","message":"Server started on port 3002"}
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | 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`.`email` = ? -- PARAMETERS: ["REDACTED"]
snauth  | query: SELECT `setting`.`uuid` AS `setting_uuid`, `setting`.`name` AS `setting_name`, `setting`.`value` AS `setting_value`, `setting`.`server_encryption_version` AS `setting_server_encryption_version`, `setting`.`created_at` AS `setting_created_at`, `setting`.`updated_at` AS `setting_updated_at`, `setting`.`sensitive` AS `setting_sensitive`, `setting`.`user_uuid` AS `setting_user_uuid` FROM `settings` `setting` WHERE `setting`.`name` = ? AND `setting`.`user_uuid` = ? ORDER BY updated_at DESC LIMIT 1 -- PARAMETERS: ["MFA_SECRET","REDACTED"]
snauth  | 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`.`email` = ? -- PARAMETERS: ["REDACTED"]
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | {"level":"error","message":"ReplyError: WRONGPASS invalid username-password pair or user is disabled.\n    at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)\n    at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)"}
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)
snauth  | [ioredis] Unhandled error event: ReplyError: WRONGPASS invalid username-password pair or user is disabled.
snauth  |     at parseError (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:179:12)
snauth  |     at parseType (/workspace/.yarn/cache/redis-parser-npm-3.0.0-7ebe40abcb-89290ae530.zip/node_modules/redis-parser/lib/parser.js:302:14)

My relevant docker-compose section:

  snsync:
    container_name: snsync
    image: standardnotes/syncing-server-js
    restart: unless-stopped
    networks:
      - internal
    depends_on:
      - mariadb
      - redis
      - snext
    ports:
      - "127.0.0.1:3000:3000"
    entrypoint: [
      "./packages/syncing-server/wait-for.sh", "mariadb", "3306",
      "./packages/syncing-server/wait-for.sh", "redis", "6379",
      "./packages/syncing-server/docker/entrypoint.sh", "start-web"
    ]
    security_opt:
      - no-new-privileges:true
    environment:
      - TZ=$TZ
      - PUID=$PUID
      - PGID=$PGID
      - LOG_LEVEL=info
      - NODE_ENV=development
      - AUTH_JWT_SECRET=$AUTH_JWT_SECRET
      - EXPOSED_PORT=8007
      - PORT=3000
      - DB_PORT=3306
      - DB_HOST=mariadb
      - DB_REPLICA_HOST=mariadb
      - DB_DATABASE=standardnotes
      - DB_USERNAME=standardnotes
      - DB_PASSWORD=$MYSQL_STANDARDNOTES_PASSWORD
      - DB_DEBUG_LEVEL=all
      - DB_MIGRATIONS_PATH=dist/migrations/*.js
      - NEW_RELIC_ENABLED=false
      - NEW_RELIC_APP_NAME=Sync
      - NEW_RELIC_NO_CONFIG_FILE=true
      - REDIS_URL=redis://redis:$REDIS_PASSWORD@redis:6379
      - REDIS_EVENTS_CHANNEL=events
      - AUTH_SERVER_URL=http://snauth:3002
      - EMAIL_ATTACHMENT_MAX_BYTE_SIZE=10485760
      - REVISIONS_FREQUENCY=300
      - VERSION=local

  snsync-worker:
    container_name: snsync-worker
    image: standardnotes/syncing-server-js
    restart: unless-stopped
    networks:
      - internal
    depends_on:
      - mariadb
      - redis
      - snsync
    entrypoint: [
      "./packages/syncing-server/wait-for.sh", "mariadb", "3306",
      "./packages/syncing-server/wait-for.sh", "redis", "6379",
      "./packages/syncing-server/wait-for.sh", "snsync", "3000",
      "./packages/syncing-server/docker/entrypoint.sh", "start-worker"
    ]
    security_opt:
      - no-new-privileges:true
    environment:
      - TZ=$TZ
      - PUID=$PUID
      - PGID=$PGID
      - LOG_LEVEL=info
      - NODE_ENV=development
      - AUTH_JWT_SECRET=$AUTH_JWT_SECRET
      - EXPOSED_PORT=8007
      - PORT=3000
      - DB_PORT=3306
      - DB_HOST=mariadb
      - DB_REPLICA_HOST=mariadb
      - DB_DATABASE=standardnotes
      - DB_USERNAME=standardnotes
      - DB_PASSWORD=$MYSQL_STANDARDNOTES_PASSWORD
      - DB_DEBUG_LEVEL=all
      - DB_MIGRATIONS_PATH=dist/migrations/*.js
      - NEW_RELIC_ENABLED=false
      - NEW_RELIC_APP_NAME=SyncWorker
      - NEW_RELIC_NO_CONFIG_FILE=true
      - REDIS_URL=redis://redis:$REDIS_PASSWORD@redis:6379
      - REDIS_EVENTS_CHANNEL=events
      - AUTH_SERVER_URL=http://snauth:3002
      - EMAIL_ATTACHMENT_MAX_BYTE_SIZE=10485760
      - REVISIONS_FREQUENCY=300
      - VERSION=local

  snauth:
    container_name: snauth
    image: standardnotes/auth
    restart: unless-stopped
    networks:
      - internal
    depends_on:
      - mariadb
      - redis
      - snsync
    ports:
      - "127.0.0.1:3002:3002"
    entrypoint: [
      "./packages/auth/wait-for.sh", "mariadb", "3306",
      "./packages/auth/wait-for.sh", "redis", "6379",
      "./packages/auth/wait-for.sh", "snsync", "3000",
      "./packages/auth/docker/entrypoint.sh", "start-web"
    ]
    security_opt:
      - no-new-privileges:true
    environment:
      - TZ=$TZ
      - PUID=$PUID
      - PGID=$PGID
      - LOG_LEVEL=info
      - NODE_ENV=production
      - PORT=3002
      - JWT_SECRET=$JWT_SECRET
      - LEGACY_JWT_SECRET=$LEGACY_JWT_SECRET
      - PSEUDO_KEY_PARAMS_KEY=$PSEUDO_KEY_PARAMS_KEY
      - ENCRYPTION_SERVER_KEY=$ENCRYPTION_SERVER_KEY
      - AUTH_JWT_SECRET=$AUTH_JWT_SECRET
      - SYNCING_SERVER_URL=http://snsync:3000
      - NEW_RELIC_ENABLED=false
      - NEW_RELIC_APP_NAME=Auth
      - NEW_RELIC_NO_CONFIG_FILE=true
      - REDIS_EVENTS_CHANNEL=auth-events
      - AUTH_JWT_TTL=60000
      - ACCESS_TOKEN_AGE=5184000
      - REFRESH_TOKEN_AGE=31556926
      - MAX_LOGIN_ATTEMPTS=6
      - FAILED_LOGIN_LOCKOUT=3600
      - EPHEMERAL_SESSION_AGE=259200
      - DB_PORT=3306
      - DB_HOST=mariadb
      - DB_REPLICA_HOST=mariadb
      - DB_DATABASE=standardnotes
      - DB_USERNAME=standardnotes
      - DB_PASSWORD=$MYSQL_STANDARDNOTES_PASSWORD
      - DB_DEBUG_LEVEL=all
      - DB_MIGRATIONS_PATH=dist/migrations/*.js
      - REDIS_URL=redis://redis:$REDIS_PASSWORD@redis:6379
      - DISABLE_USER_REGISTRATION=true
      - VERSION=local

  snauth-worker:
    container_name: snauth-worker
    image: standardnotes/auth
    restart: unless-stopped
    networks:
      - internal
    depends_on:
      - mariadb
      - redis
      - snauth
    entrypoint: [
      "./packages/auth/wait-for.sh", "mariadb", "3306",
      "./packages/auth/wait-for.sh", "redis", "6379",
      "./packages/auth/wait-for.sh", "snauth", "3002",
      "./packages/auth/docker/entrypoint.sh", "start-worker"
    ]
    security_opt:
      - no-new-privileges:true
    environment:
      - TZ=$TZ
      - PUID=$PUID
      - PGID=$PGID
      - LOG_LEVEL=info
      - NODE_ENV=production
      - PORT=3002
      - JWT_SECRET=$JWT_SECRET
      - LEGACY_JWT_SECRET=$LEGACY_JWT_SECRET
      - PSEUDO_KEY_PARAMS_KEY=$PSEUDO_KEY_PARAMS_KEY
      - ENCRYPTION_SERVER_KEY=$ENCRYPTION_SERVER_KEY
      - AUTH_JWT_SECRET=$AUTH_JWT_SECRET
      - SYNCING_SERVER_URL=http://snsync:3000
      - NEW_RELIC_ENABLED=false
      - NEW_RELIC_APP_NAME=AuthWorker
      - NEW_RELIC_NO_CONFIG_FILE=true
      - REDIS_EVENTS_CHANNEL=auth-events
      - AUTH_JWT_TTL=60000
      - ACCESS_TOKEN_AGE=5184000
      - REFRESH_TOKEN_AGE=31556926
      - MAX_LOGIN_ATTEMPTS=6
      - FAILED_LOGIN_LOCKOUT=3600
      - EPHEMERAL_SESSION_AGE=259200
      - DB_PORT=3306
      - DB_HOST=mariadb
      - DB_REPLICA_HOST=mariadb
      - DB_DATABASE=standardnotes
      - DB_USERNAME=standardnotes
      - DB_PASSWORD=$MYSQL_STANDARDNOTES_PASSWORD
      - DB_DEBUG_LEVEL=all
      - DB_MIGRATIONS_PATH=dist/migrations/*.js
      - REDIS_URL=redis://redis:$REDIS_PASSWORD@redis:6379
      - DISABLE_USER_REGISTRATION=true
      - VERSION=local

  snapi:
    container_name: snapi
    image: standardnotes/api-gateway
    restart: unless-stopped
    networks:
      - traefik
      - internal
    depends_on:
      - snsync
      - snauth
      - redis
    entrypoint: [
      "./packages/api-gateway/wait-for.sh", "snauth", "3002",
      "./packages/api-gateway/wait-for.sh", "redis", "6379",
      "./packages/api-gateway/wait-for.sh", "snsync", "3000",
      "./packages/api-gateway/docker/entrypoint.sh", "start-web"
    ]
    ports:
      - 8007:3000
    security_opt:
      - no-new-privileges:true
    environment:
      - TZ=$TZ
      - PUID=$PUID
      - PGID=$PGID
      - LOG_LEVEL=info
      - NODE_ENV=production
      - NEW_RELIC_ENABLED=false
      - NEW_RELIC_APP_NAME=APIGateway
      - NEW_RELIC_NO_CONFIG_FILE=true
      - SYNCING_SERVER_JS_URL=http://snsync:3000
      - PAYMENTS_SERVER_URL=https://snext.$DOMAINNAME
      - AUTH_SERVER_URL=http://snauth:3002
      - REDIS_URL=redis://redis:$REDIS_PASSWORD@redis:6379
      - REDIS_EVENTS_CHANNEL=events
      - AUTH_JWT_SECRET=$AUTH_JWT_SECRET
      - PORT=3000
      - VERSION=local
    labels:
      - "traefik.enable=true"
      ## HTTP Routers
      - "traefik.http.routers.notesync-rtr.entrypoints=https"
      - "traefik.http.routers.notesync-rtr.rule=Host(`notesync.$DOMAINNAME`)"
      - "traefik.http.routers.notesync-rtr.tls=true"
      ## Middlewares
      - "traefik.http.routers.notesync-rtr.middlewares=chain-no-auth@file"
      - "traefik.http.routers.notesync-rtr.middlewares=middlewares-standardnotes@file"
      ## HTTP Services
      - "traefik.http.routers.notesync-rtr.service=notesync-svc"
      - "traefik.http.services.notesync-svc.loadbalancer.server.port=3000"

  standardnotes:
    container_name: standardnotes
    image: standardnotes/web:stable
    restart: unless-stopped
    command: start
    networks:
      - traefik
    depends_on:
      - snsync
    ports:
      - 8010:3001
    security_opt:
      - no-new-privileges:true
    environment:
      - TZ=$TZ
      - PUID=$PUID
      - PGID=$PGID
      - RAILS_ENV=development
      - PORT=3001
      - WEB_CONCURRENCY=0
      - SECRET_KEY_BASE=$STANDARD_NOTES_SECRET
      - APP_HOST=https://notes.$DOMAINNAME
      - RAILS_SERVE_STATIC_FILES=true
      - RAILS_LOG_TO_STDOUT=true
      - RAILS_LOG_LEVEL=INFO
      - DEFAULT_SYNC_SERVER=https://notesync.$DOMAINNAME
      - DEV_DEFAULT_SYNC_SERVER=https://notesync.$DOMAINNAME
      - DATADOG_ENABLED=false
      - ENABLE_UNFINISHED_FEATURES=false
    labels:
      - "traefik.enable=true"
      ## HTTP Routers
      - "traefik.http.routers.notes-rtr.entrypoints=https"
      - "traefik.http.routers.notes-rtr.rule=Host(`notes.$DOMAINNAME`)"
      - "traefik.http.routers.notes-rtr.tls=true"
      ## Middlewares
      - "traefik.http.routers.notes-rtr.middlewares=chain-no-auth@file"
      ## HTTP Services
      - "traefik.http.routers.notes-rtr.service=notes-svc"
      - "traefik.http.services.notes-svc.loadbalancer.server.port=3001"

  redis:
    container_name: redis
    image: redis:latest
    command: redis-server --requirepass $REDIS_PASSWORD
    restart: always
    networks:
      - internal
    security_opt:
      - no-new-privileges:true
    ports:
      - "127.0.0.1:6379:6379"
    volumes:
      - $DOCKERDIR/redis:/data
    environment:
      - TZ=$TZ
      - PUID=$PUID
      - PGID=$PGID

@jackyzy823
Copy link

jackyzy823 commented Aug 19, 2022

@eric-pierce , I think the main reason is standardnotes is using ioredis v5 now.

And According to ioredis' migrationdoc

Username in Redis URI is supported.
In v5, allowUsernameInURI is removed and the username part will always be used. If you don't want to pass username to Redis, just omit the username part in your URI: new Redis("redis://:authpassword@127.0.0.1:6380/4").

so in your docker-compose.yml, now you should replace all REDIS_URL=redis://redis:$REDIS_PASSWORD@redis:6379 to REDIS_URL=redis://:$REDIS_PASSWORD@redis:6379

I haven' tested it, but i think it will help.

@eric-pierce
Copy link
Contributor Author

@jackyzy823 I just made this update, and was able to log in without issue through both the web and mobile apps - thank you!

I also tested re-enabling 2FA, and all works as expected. Really appreciate your troubleshooting here - the standalone configuration doesn't use a redis password so it wasn't apparent that the REDIS_URL syntax was the problem.

I'll close this issue

@BobWs
Copy link

BobWs commented Aug 20, 2022

the standalone configuration doesn't use a redis password so it wasn't apparent that the REDIS_URL syntax was the problem.

I don’t use the redis password I use the standardnotes example URL REDIS_URL=redis://cache
So do I need to change this for it to work with the latest tag? Or will it work like this out of the box!

@jackyzy823
Copy link

So do I need to change this for it to work with the latest tag

I think no.

If you still have problem , paste your docker-compose.yml , env files , error logs, and images' version. I will try to help you.

@BobWs
Copy link

BobWs commented Aug 20, 2022

If you still have problem , paste your docker-compose.yml , env files , error logs, and images' version. I will try to help you.

Tried it (before your reply) this morning and I kept getting error messages and then reverted back to the "old" image tags and everything was working again.
So I don't know what the problem is with the latest tags.

With your help I'm willing to try it again!

@BobWs
Copy link

BobWs commented Aug 20, 2022

These are the errors I get when using the :latest tag but all the container are running

Errors:

auth:3000 is unavailable yet - waiting for it to start
auth:3000 is unavailable yet - waiting for it to start
auth:3000 is unavailable yet - waiting for it to start
auth:3000 is unavailable yet - waiting for it to start

## stand
db (172.18.0.8:3306) open
db:3306 is up - executing command
cache (172.18.0.5:6379) open
cache:6379 is up - executing command
auth:3000 is unavailable yet - waiting for it to start
auth:3000 is unavailable yet - waiting for it to start
auth:3000 is unavailable yet - waiting for it to start
auth:3000 is unavailable yet - waiting for it to start
auth:3000 is unavailable yet - waiting for it to start

db (172.18.0.8:3306) open
db:3306 is up - executing command
cache (172.18.0.5:6379) open
cache:6379 is up - executing command
Starting Web...

db (172.18.0.8:3306) open
db:3306 is up - executing command
cache (172.18.0.5:6379) open
cache:6379 is up - executing command
syncing-server-js:3000 is unavailable yet - waiting for it to start
syncing-server-js:3000 is unavailable yet - waiting for it to start
syncing-server-js:3000 is unavailable yet - waiting for it to start
syncing-server-js:3000 is unavailable yet - waiting for it to start

db (172.18.0.8:3306) open
db:3306 is up - executing command
cache (172.18.0.5:6379) open
cache:6379 is up - executing command
Starting Web...
{"level":"info","message":"Server started on port 3000"}

docker-compose file:

version: '3.8'

services:
  syncing-server-js:
    image: standardnotes/syncing-server-js
    container_name: standardnotes-syncing-server
    depends_on:
      - db
      - cache
    entrypoint: [
      "./packages/syncing-server/wait-for.sh", "db", "3306",
      "./packages/syncing-server/wait-for.sh", "cache", "6379",
      "./packages/syncing-server/docker/entrypoint.sh", "start-web"
    ]
    hostname: standardnotes-syncing-server
    env_file: .env
    mem_limit: 85m
    mem_reservation: 85m
    environment:
      PORT: 3000
    restart: always
    networks:
      - standardnotes_network

  syncing-server-js-worker:
    image: standardnotes/syncing-server-js
    container_name: standardnotes-worker
    depends_on:
      - db
      - cache
      - syncing-server-js
    entrypoint: [
      "./packages/syncing-server/wait-for.sh", "db", "3306",
      "./packages/syncing-server/wait-for.sh", "cache", "6379",
      "./packages/syncing-server/wait-for.sh", "syncing-server-js", "3000",
      "./packages/syncing-server/docker/entrypoint.sh", "start-worker"
    ]
    hostname: standardnotes-worker
    env_file: .env
    mem_limit: 85m
    mem_reservation: 85m
    environment:
      PORT: 3000
    restart: always
    networks:
      - standardnotes_network

  api-gateway:
    image: standardnotes/api-gateway
    container_name: standardnotes-api-gateway
    depends_on:
      - auth
      - syncing-server-js
    hostname: standardnotes-api-gateway
    env_file: api-gateway.env
    mem_limit: 85m
    mem_reservation: 85m
    ports:
      - ${EXPOSED_PORT}:3000
    environment:
      PORT: 3000
      AUTH_JWT_SECRET: '${AUTH_JWT_SECRET}'
      REDIS_URL: '${REDIS_URL}'
      FILES_SERVER_URL: '${FILES_SERVER_URL}'
    entrypoint: [
      "./packages/api-gateway/wait-for.sh", "auth", "3000",
      "./packages/api-gateway/wait-for.sh", "syncing-server-js", "3000",
      "./packages/api-gateway/wait-for.sh", "files", "3000",
      "./packages/api-gateway/docker/entrypoint.sh", "start-web"
    ]
    restart: always
    networks:
      - standardnotes_network

  auth:
    image: standardnotes/auth
    container_name: standardnotes-auth
    depends_on:
      - db
      - cache
      - syncing-server-js
    entrypoint: [
      "./packages/auth/wait-for.sh", "db", "3306",
      "./packages/auth/wait-for.sh", "cache", "6379",
      "./packages/auth/wait-for.sh", "syncing-server-js", "3000",
      "./packages/auth/docker/entrypoint.sh", "start-web"
    ]
    hostname: standardnotes-auth
    env_file: auth.env
    mem_limit: 85m
    mem_reservation: 85m
    environment:
      PORT: 3000
      DB_HOST: '${DB_HOST}'
      DB_REPLICA_HOST: '${DB_REPLICA_HOST}'
      DB_PORT: '${DB_PORT}'
      DB_DATABASE: '${DB_DATABASE}'
      DB_USERNAME: '${DB_USERNAME}'
      DB_PASSWORD: '${DB_PASSWORD}'
      DB_DEBUG_LEVEL: '${DB_DEBUG_LEVEL}'
      DB_MIGRATIONS_PATH: '${DB_MIGRATIONS_PATH}'
      REDIS_URL: '${REDIS_URL}'
      AUTH_JWT_SECRET: '${AUTH_JWT_SECRET}'
      VALET_TOKEN_SECRET: '${VALET_TOKEN_SECRET}'
    restart: always
    networks:
      - standardnotes_network

  auth-worker:
    image: standardnotes/auth
    container_name: standardnotes-auth-worker
    depends_on:
      - db
      - cache
      - auth
    entrypoint: [
      "./packages/auth/wait-for.sh", "db", "3306",
      "./packages/auth/wait-for.sh", "cache", "6379",
      "./packages/auth/wait-for.sh", "auth", "3000",
      "./packages/auth/docker/entrypoint.sh", "start-worker"
    ]
    hostname: standardnotes-auth-worker
    env_file: auth.env
    mem_limit: 85m
    mem_reservation: 85m
    environment:
      PORT: 3000
      DB_HOST: '${DB_HOST}'
      DB_REPLICA_HOST: '${DB_REPLICA_HOST}'
      DB_PORT: '${DB_PORT}'
      DB_DATABASE: '${DB_DATABASE}'
      DB_USERNAME: '${DB_USERNAME}'
      DB_PASSWORD: '${DB_PASSWORD}'
      DB_DEBUG_LEVEL: '${DB_DEBUG_LEVEL}'
      DB_MIGRATIONS_PATH: '${DB_MIGRATIONS_PATH}'
      REDIS_URL: '${REDIS_URL}'
      AUTH_JWT_SECRET: '${AUTH_JWT_SECRET}'
      VALET_TOKEN_SECRET: '${VALET_TOKEN_SECRET}'
    restart: always
    networks:
      - standardnotes_network

  files:
    image: standardnotes/files
    container_name: standardnotes-files
    entrypoint: [
      "./packages/files/wait-for.sh", "db", "3306",
      "./packages/files/wait-for.sh", "cache", "6379",
      "./packages/files/docker/entrypoint.sh", "start-web"
    ]
    hostname: standardnotes-files
    env_file: files.env
    mem_limit: 85m
    mem_reservation: 85m
    ports:
      - ${EXPOSED_FILES_PORT}:3000
    environment:
      FILE_UPLOAD_PATH: '${FILE_UPLOAD_PATH}'
      VALET_TOKEN_SECRET: '${VALET_TOKEN_SECRET}'
    volumes:
      - /volume1/docker-data/standardnotes/uploads:/var/www/${FILE_UPLOAD_PATH}
    restart: always
    networks:
      - standardnotes_network

  db:
    image: mariadb:latest
    container_name: standardnotes-db
    mem_limit: 85m
    mem_reservation: 85m
    hostname: standardnotes-db
    environment:
      MARIADB_DATABASE: '${DB_DATABASE}'
      MARIADB_USER: '${DB_USERNAME}'
      MARIADB_PASSWORD: '${DB_PASSWORD}'
      MARIADB_ROOT_PASSWORD: '${DB_ROOT_PASSWORD}'
      MARIADB_AUTO_UPGRADE: 1
    ports:
      - 3307:3306/tcp
    restart: always
    command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8 --collation-server=utf8_general_ci
    volumes:
      - /volume1/docker/mariadb/sndb/db:/var/lib/mysql:rw
      - /volume1/docker/mariadb/sndb/db/import:/docker-entrypoint-initdb.d
    restart: always
    networks:
      - standardnotes_network

  cache:
    image: redis:latest
    container_name: standardnotes-redis
    volumes:
      - /volume1/docker/redis/data:/data
    hostname: standardnotes-redis
    ports:
      - 6379:6379/tcp
    restart: always
    networks:
      - standardnotes_network

networks:
  standardnotes_network:
    name: standardnotes_network

env file:

##.env

LOG_LEVEL="info"
NODE_ENV="production"
VERSION="local"

TZ=Europe/Berlin
PUID=1026
PGID=100

AUTH_JWT_SECRET=xxxxx

EXPOSED_PORT=3000

DB_HOST=db
DB_REPLICA_HOST=db
DB_PORT=3306
DB_USERNAME=standardnotes
DB_PASSWORD=xxxxxxx
DB_DATABASE=standardnotes 
DB_DEBUG_LEVEL=all # "all" | "query" | "schema" | "error" | "warn" | "info" | "log" | "migration"
DB_MIGRATIONS_PATH=dist/migrations/*.js

REDIS_URL=redis://cache
REDIS_EVENTS_CHANNEL=events

SNS_TOPIC_ARN=
SNS_AWS_REGION=
SQS_QUEUE_URL=
SQS_AWS_REGION=
S3_AWS_REGION=
S3_BACKUP_BUCKET_NAME=

AUTH_SERVER_URL=http://auth:3000

EMAIL_ATTACHMENT_MAX_BYTE_SIZE=10485760

REVISIONS_FREQUENCY=300

# (Optional) New Relic Setup
NEW_RELIC_ENABLED=false
NEW_RELIC_APP_NAME="Syncing Server JS"
NEW_RELIC_LICENSE_KEY=
NEW_RELIC_NO_CONFIG_FILE=true
NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=false
NEW_RELIC_LOG_ENABLED=false
NEW_RELIC_LOG_LEVEL=info

# File upload path (relative to root directory)
FILE_UPLOAD_PATH=standardnotes/uploads

# File uploads
VALET_TOKEN_SECRET=xxxxxxxxxx
EXPOSED_FILES_PORT=3125
# Public-facing URL of the Files server. Endpoint on which clients will access it.
FILES_SERVER_URL=http://192.168.178.100:3125

api-gateway.env:

## api-gateway.env

LOG_LEVEL="info"
NODE_ENV="production"
VERSION="local"

TZ=Europe/Berlin
PUID=1026
PGID=100

NEW_RELIC_ENABLED=false
NEW_RELIC_APP_NAME="API Gateway"
NEW_RELIC_NO_CONFIG_FILE=true

SYNCING_SERVER_JS_URL="http://syncing-server-js:3000"
AUTH_SERVER_URL="http://auth:3000"

REDIS_EVENTS_CHANNEL="api-gateway-events"
REDIS_URL=redis://cache

auth.env file:

##auth.env

LOG_LEVEL="info"
NODE_ENV="production"
VERSION="local"

TZ=Europe/Berlin
PUID=1026
PGID=100

AUTH_JWT_TTL=60000
JWT_SECRET=xxxxxxxxx
LEGACY_JWT_SECRET=xxxxxxx

# File uploads
VALET_TOKEN_SECRET=xxxxxx
VALET_TOKEN_TTL=7200

NEW_RELIC_ENABLED=false
NEW_RELIC_APP_NAME="Auth"
NEW_RELIC_NO_CONFIG_FILE=true

REDIS_EVENTS_CHANNEL="auth-events"
REDIS_URL=redis://cache

DISABLE_USER_REGISTRATION=false

PSEUDO_KEY_PARAMS_KEY=xxxxxxx

ACCESS_TOKEN_AGE=5184000
REFRESH_TOKEN_AGE=31556926

MAX_LOGIN_ATTEMPTS=6
FAILED_LOGIN_LOCKOUT=3600

EPHEMERAL_SESSION_AGE=259200

# Must be a hex string exactly 32 bytes long
# e.g. feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
ENCRYPTION_SERVER_KEY=xxxxxxxx

SYNCING_SERVER_URL=http://syncing-server-js:3000

files.env file:

##files.env

LOG_LEVEL="info"
NODE_ENV="production"
VERSION="local"

TZ=Europe/Berlin
PUID=1026
PGID=100

PORT=3000

S3_BUCKET_NAME=
S3_AWS_REGION=
SNS_TOPIC_ARN=
SNS_AWS_REGION=

REDIS_URL=redis://cache
REDIS_EVENTS_CHANNEL=events

MAX_CHUNK_BYTES=100000000

NEW_RELIC_ENABLED=false
NEW_RELIC_APP_NAME="Files"
NEW_RELIC_NO_CONFIG_FILE=true

# File upload path (relative to root directory)
FILE_UPLOAD_PATH=standardnotes/uploads

# File uploads
VALET_TOKEN_SECRET=xxxxxxxx
EXPOSED_FILES_PORT=3125
# Public-facing URL of the Files server. Endpoint on which clients will access it.
FILES_SERVER_URL=http://files.mydomain.com

@jackyzy823
Copy link

Errors:

@BobWs depends on the output of error log , it seems no error at all ?

@BobWs
Copy link

BobWs commented Aug 21, 2022

Errors:

@BobWs depends on the output of error log , it seems no error at all ?

That is strange, but it still isn’t working for me when I use the latest tag all the client apps aren’t able to sync.
When I revert back to the version specific tags everything starts normal and I can use the client apps again.

Did you see anything out of the ordinary in my files? docker-compose, env

@jackyzy823
Copy link

Well , i set up a test env using your docker-compose.yml and envs ( only remove file-server part) , and using https://app.standardnotes.com as frontend.

It just work normally.

the docker image info

standardnotes/auth                latest          efdf98722019   4 days ago      174MB
standardnotes/syncing-server-js   latest          414bcd0ce26b   5 days ago      171MB
standardnotes/api-gateway         latest          a7657d456901   5 days ago      161MB

Can you show the http request log (like http status and response) from browser ( using Developer Tools or F12) ?

@jonwsoto
Copy link

Just to add potential considerations. I was migrating my ghost blog and there was a database update, in order to get this to work, there had to be a fix with the collation.

I noticed you using the latest tags on everything including the mariaDB. Maybe there is something throwing off your DB? Have you tried to include latest in everything except leaving your DB the same version?

Anyways, just a thought, it may be irrelevant.

@BobWs
Copy link

BobWs commented Aug 21, 2022

I noticed you using the latest tags on everything including the mariaDB

Yes that is true, but I have updated the database to the latest version, it is still the same version as when I use the version specific images.
Thanks for mentioning I did consider that it maybe could be related to the database, but then again I didn’t update the database…🤷‍♂️

@BobWs
Copy link

BobWs commented Aug 21, 2022

Can you show the http request log (like http status and response) from browser ( using Developer Tools or F12) ?

Well that’s the problem I can’t login because the server is still unavailable…the logs keep mentioning that it is starting..

@jackyzy823
Copy link

the logs keep mentioning that it is starting.

You mean the container keep restarting ?

@BobWs
Copy link

BobWs commented Aug 21, 2022

the logs keep mentioning that it is starting.

You mean the container keep restarting ?

No the container starts fine (all of them) but I the log I see

db (172.18.0.8:3306) open
db:3306 is up - executing command
cache (172.18.0.5:6379) open
cache:6379 is up - executing command
Starting Web...

and the other containers show this in the logs

auth:3000 is unavailable yet - waiting for it to start
auth:3000 is unavailable yet - waiting for it to start

syncing-server-js:3000 is unavailable yet - waiting for it to start
syncing-server-js:3000 is unavailable yet - waiting for it to start

That’s all what is happening, and and the clients (apps) give a error message that the server is offline.

So I had to revert back to the version specific tag and everything is fine and working.
Very frustrating….

@BobWs
Copy link

BobWs commented Aug 21, 2022

Maybe I should try a clean install with a new empty database…

@jackyzy823
Copy link

These logs are all ok , mine has these logs too. what do curl http://127.0.0.1:3000 on server side outputs? if it works , it should output Welcome to the Standard Notes server infrastructure. Learn more at https://docs.standardnotes.com

clients (apps)

So you're using client (like desktop /android one) , have you tried to login with web (since it is easy to debug) ?

@BobWs
Copy link

BobWs commented Aug 21, 2022

So you're using client (like desktop /android one) , have you tried to login with web (since it is easy to debug) ?

Yes clients like desktop and mobile apps.
When I tried the web version I couldn’t login…

@jackyzy823
Copy link

When I tried the web version I couldn’t login…

It would be fine If you could provide the log about this login request.

@BobWs
Copy link

BobWs commented Aug 21, 2022

It would be fine If you could provide the log about this login request.

I could but at the moment I reverted everything back to the working version so I have to start again.

@eric-pierce
Copy link
Contributor Author

@BobWs it sounds like your issue is that the auth container isn't starting as opposed to the redis issue I was facing - I don't see any of your logs from the auth container, which may hold some useful info

@BobWs
Copy link

BobWs commented Aug 23, 2022

Sorry guys for not being able to respond to your suggestions sooner, but I think I found the problem!

I did a clean install on another machine and it worked out fine. All containers started normally after the database was ready.
I was able to create a users and log in.
Did the following checks via terminal:

curl http://192.168.178.110:3000/healthcheck return OK
curl http://192.168.178.110:3000
return
Welcome to the Standard Notes server infrastructure. Learn more at https://docs.standardnotes.com

Then I activated the Subscription with the following command in the database:

INSERT INTO user_roles (role_uuid , user_uuid) VALUES ( ( select uuid from roles where name="PRO_USER" order by version desc limit 1 ) ,( select uuid from users where email="EMAIL@DOMAIN.COM" )  ) ON DUPLICATE KEY UPDATE role_uuid = VALUES(`role_uuid`);

insert into user_subscriptions set uuid = UUID() , plan_name="PRO_PLAN" , ends_at = 8640000000000000, created_at = 0 , updated_at = 0,user_uuid= (select uuid from users where email="EMAIL@DOMAIN.COM") , subscription_id=1, subscription_type="regular";

And after I restarted the containers it doesn't work anymore and everything hangs again.

So I suspect that the problem is caused by the changes in the database for subscription. And since I already had this in my production machine it didn't work.

Unfortunately I don't know how to solve this as it probably concerns the database.

@jackyzy823
Copy link

Thanks for your information.

I repeat your step , however still can not reproduce.

The only thing i concern about this SQL is ends_at maybe too big which could cause error when converting to javascript Date object. You could change ends_at to a smaller value (like 2000000000000) to test if it works.

Another thing needs to be concerned is that maybe your client version is too old ? It would be better that you could provide your client info (like android/ios/desktop/web and version)

@BobWs
Copy link

BobWs commented Aug 23, 2022

Thanks for helping!

The ends_at value is the same as is provided in official standardnotes server.sh script, I didn’t change that. But I could try your suggestion to change the value to a lower value.

about the clients I’m using the latest versions available for MacOS desktop and iOS (mobile devices). So all my clients are up to date.

Database version is mariadb 10.8 (latest docker tag).

@jackyzy823
Copy link

MacOS desktop

for electron-based application , you may toggle developer console via Menu->Help->Toggle Error Console ( appears on linux appimage version) and see what happens in Console and network Tab.

@BobWs
Copy link

BobWs commented Aug 23, 2022

So to test my own theory and to try your suggestions I took the following steps:

  • user-roles content removed
  • user_subscriptions content removed
    done using phpmyadmin

Then restarted all containers, it took a long time but finally everything booted up properly and I did the curl test

curl http://192.168.178.110:3000/healthcheck return OK
curl http://192.168.178.110:3000
return
Welcome to the Standard Notes server infrastructure. Learn more at https://docs.standardnotes.com

Then I logged in using the desktop app and could create notes, edit etc.
All this still without the subscription!

Then for SQL I changed the value to your suggestion "ends_at 20000000000" and re-imported it into the database using phpmyadmin.

After this I logged in again using the desktop app and to my surprise it just worked!

Restarted all containers just to be sure and then logged back in and everything worked! Also the components under subscription work!

So I think your idea to adjust the value has helped.

Now I just have to apply it without any problems in my production machine. I have to be careful because I have 5 users there using Standardnotes with a few hundred notes.

@jackyzy823
Copy link

I'm glad that it works again.

But I still wonder why it happens. Because it doesn't happen on web (Chromium Browser) neither Linux's AppImage Desktop Version.

Since I do not have any MacOS/iOS device, If you're willing to help out to find the real cause of this issue, Could you have a look at and screenshot the error output of Developer Console in MacOS client ( instructions above) with you test env and the origin one ends_at.

@jonwsoto
Copy link

I am following this due to my notifications lol. Anyways do you think this would be restriction/limitations from being a MariaDB vs MySQL DB. I feel through my journey in self hosting I would come across issue with a database not taking something due to character or syntax limitations and things of that nature.

@BobWs
Copy link

BobWs commented Aug 24, 2022

I'm glad that it works again.

So I guess I have cheered a little too early.
I spent last night to apply the modifications to my production machine and it didn't go quite as planned.

After I changed the database to ends_at and updated the containers to the latest version it didn't go quite as I expected.
It took an incredibly long time before all containers were properly started. Then checked if my desktop app could sync the notes and that worked, but unfortunately files didn't work anymore. I could no longer view my saved attachments in files or add anything.
I then restarted all containers and the same problem started again.

In the end I decided to restore the old specific version because otherwise my users and I could no longer use the notes.
Unfortunately files still doesn't work despite the fact that I restored the old version. I think this has to do with the change I made to the database.

@BobWs
Copy link

BobWs commented Aug 24, 2022

Developer Console in MacOS client ( instructions above)

This is the output at the moment from my MacOS desktop client on the origin (production machine with the specific versions tag)

api.mydomain.com/v2/subscriptions:1          Failed to load resource: the server responded with a status of 500 ()
snjs.js:34374 Client Displayable Error: getaddrinfo ENOTFOUND payments  
n @ snjs.js:34374
TypeError: Cannot read properties of undefined (reading 'spellcheck')
    at u.getSpellcheckStateForNote (app.js:48:368268)
    at k.reloadSpellcheck (app.js:48:71795)
    at k.reloadPreferences (app.js:48:72195)
    at k.onAppEvent (app.js:48:67091)
    at Object.callback (app.js:2:1014222)
    at l.notifyEvent (app.js:2:657755)
api.mydomain.com/v1/files/valet-tokens:1          Failed to load resource: the server responded with a status of 403 ()
snjs.js:34374 Client Displayable Error: expired-subscription  expired-subscription
n @ snjs.js:34374
api.mydomain.com/v1/files/valet-tokens:1          Failed to load resource: the server responded with a status of 403 ()
snjs.js:34374 Client Displayable Error: expired-subscription  expired-subscription
n @ snjs.js:34374

@BobWs
Copy link

BobWs commented Aug 24, 2022

Anyways do you think this would be restriction/limitations from being a MariaDB vs MySQL DB.

I don't know it could be possible. But I must say my docker containers that require a database I use Mariadb:latest without any problems so far.

@jackyzy823
Copy link

What ends_at do you set in db?
if you set 20000000000 , then it is too small -> Thu Aug 20 1970
What i mentioned is 2000000000000 -> Wed May 18 2033

@BobWs
Copy link

BobWs commented Aug 24, 2022

What i mentioned is 2000000000000 -> Wed May 18 2033

That is the value I set, in the desktop app the date 2033 was showing.
I now changed the value back to the original 8640000000000000 and now my files are showing up again.

So for now I’m not going to mess things up again I will stay on the “old” version specific tag.
Thanks for all your help so far!

@BobWs
Copy link

BobWs commented Aug 25, 2022

So I couldn't leave it alone and had the figure out what the problem was and decided to give it one more try!

The first thing I though was "let's try to remove the memory limit" and guess what...Yes it was the limitation I had added in the docker-compose file.
Apparently it didn't cause any problems with the specific versions tag but for the latest tag it did.
So after removing the memory limitations in the docker-compose file

    mem_limit: 85m
    mem_reservation: 85m

everything started just fine!!...even after a few restarts (just incase;)

Thank you all for helping!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants