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

[BUG] issues launching when creating new server #115

Closed csayre closed 1 year ago

csayre commented 1 year ago

Service Versions (please complete the following information):

syncing-server-js-self-hosted         | Error: Environment variable DB_REPLICA_HOST not set
syncing-server-js-self-hosted         |     at Env.get (/workspace/packages/syncing-server/dist/src/Bootstrap/Env.js:23:19)
syncing-server-js-self-hosted         |     at Object.<anonymous> (/workspace/packages/syncing-server/dist/src/Bootstrap/DataSource.js:29:27)
syncing-server-js-self-hosted         |     at Module._compile (node:internal/modules/cjs/loader:1159:14)
syncing-server-js-self-hosted         |     at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
syncing-server-js-self-hosted         |     at require$$0.Module._extensions..js (/workspace/.pnp.cjs:13506:33)
syncing-server-js-self-hosted         |     at Module.load (node:internal/modules/cjs/loader:1037:32)
syncing-server-js-self-hosted         |     at require$$0.Module._load (/workspace/.pnp.cjs:13344:14)
syncing-server-js-self-hosted         |     at Module.require (node:internal/modules/cjs/loader:1061:19)
syncing-server-js-self-hosted         |     at require (node:internal/modules/cjs/helpers:103:18)
syncing-server-js-self-hosted         |     at Object.<anonymous> (/workspace/packages/syncing-server/dist/src/Bootstrap/Container.js:48:22)

Describe the bug It appears that DB_REPLICA_HOST is required to be set. Adding DB_REPLICA_HOST to both the ,env and the .env.sample file seems make the issue go to the auth-self-hosted container with the same error.

To Reproduce Steps to reproduce the behavior: Run ./server.sh start and then view the logs.

Expected behavior Brand new installation, I'd expect everything to come up without issue, when I attempt to go my external DNS I get an error saying the site is not up. Viewing the logs I get the error below.

Logs

syncing-server-js-self-hosted         | Error: Environment variable DB_REPLICA_HOST not set
syncing-server-js-self-hosted         |     at Env.get (/workspace/packages/syncing-server/dist/src/Bootstrap/Env.js:23:19)
syncing-server-js-self-hosted         |     at Object.<anonymous> (/workspace/packages/syncing-server/dist/src/Bootstrap/DataSource.js:29:27)
syncing-server-js-self-hosted         |     at Module._compile (node:internal/modules/cjs/loader:1159:14)
syncing-server-js-self-hosted         |     at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
syncing-server-js-self-hosted         |     at require$$0.Module._extensions..js (/workspace/.pnp.cjs:13506:33)
syncing-server-js-self-hosted         |     at Module.load (node:internal/modules/cjs/loader:1037:32)
syncing-server-js-self-hosted         |     at require$$0.Module._load (/workspace/.pnp.cjs:13344:14)
syncing-server-js-self-hosted         |     at Module.require (node:internal/modules/cjs/loader:1061:19)
syncing-server-js-self-hosted         |     at require (node:internal/modules/cjs/helpers:103:18)
syncing-server-js-self-hosted         |     at Object.<anonymous> (/workspace/packages/syncing-server/dist/src/Bootstrap/Container.js:48:22)

Screenshots Can provide if needed

Additional context Did a ./server.sh update and I am now running into this issue. I started from scratch too to see if that would fix this problem. It does not seem to have resolved the issue. When I attempt to set the DB_REPLICA_HOST in the .env file, I get the following message.

The .env file contains different amount of lines than .env.sample. This may be caused by the fact that there is a new environment variable to configure. Please update your environment file and try again.
csayre commented 1 year ago

Just a point of clarification:

Additional context Did a ./server.sh update and I am now running into this issue. I started from scratch too to see if that would fix this problem. It does not seem to have resolved the issue. When I attempt to set the DB_REPLICA_HOST in the .env file, I get the following message.

So I was running on the wrong version of standard notes (Not the self-hosted version, but the standalone version) I have this issue with both versions, the issue started after the update of the standalone version, and continued when I used the self-hosted version. Sorry for the confusion there.

csayre commented 1 year ago

I removed all of the docker containers and the docker images for standard notes and re-reran ./server.sh start and forced a redownload of all the images and this fixed the issue.