Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

No ability to change the database (db) container- / hostname #95

Open
mhellmeier opened this issue Sep 29, 2021 · 2 comments
Open

No ability to change the database (db) container- / hostname #95

mhellmeier opened this issue Sep 29, 2021 · 2 comments
Assignees

Comments

@mhellmeier
Copy link

The default docker-compose.yml file creates a db container for the database. Currently it isn't possible to change the container- / hostname of this db container.

If I change the name from db to foo everywhere (in the docker-compose.yml and the .env file), the syncing-server-js doesn't start and loops the following error log:

[Error] PoolCluster : Error: getaddrinfo ENOTFOUND db
[Error] PoolCluster : Error: getaddrinfo ENOTFOUND db
[Error] PoolCluster : Error: getaddrinfo ENOTFOUND db
[Error] PoolCluster : Error: getaddrinfo ENOTFOUND db
[Error] PoolCluster : Error: getaddrinfo ENOTFOUND db
[Error] PoolCluster : Error: getaddrinfo ENOTFOUND db
[Error] PoolCluster : Error: getaddrinfo ENOTFOUND db
[Error] PoolCluster : Error: getaddrinfo ENOTFOUND db
[Error] PoolCluster : Error: getaddrinfo ENOTFOUND db
[Error] PoolCluster : Error: getaddrinfo ENOTFOUND db
/var/www/node_modules/mysql2/lib/pool_cluster.js:36
      return cb(new Error('Pool does Not exists.'));
                ^

Error: Pool does Not exists.
    at PoolNamespace.getConnection (/var/www/node_modules/mysql2/lib/pool_cluster.js:36:17)
    at /var/www/node_modules/mysql2/lib/pool_cluster.js:43:21
    at /var/www/node_modules/mysql2/lib/pool_cluster.js:210:18
    at /var/www/node_modules/mysql2/lib/pool.js:60:18
    at PoolConnection.<anonymous> (/var/www/node_modules/mysql2/lib/connection.js:739:13)
    at Object.onceWrapper (node:events:485:26)
    at PoolConnection.emit (node:events:390:22)
    at PoolConnection.EventEmitter.emit (node:domain:470:12)
    at PoolConnection._notifyError (/var/www/node_modules/mysql2/lib/connection.js:225:12)
    at PoolConnection._handleFatalError (/var/www/node_modules/mysql2/lib/connection.js:156:10)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@karolsojko
Copy link
Member

Hi @mhellmeier ,

did you try to kill the existing containers and rebuild them? Maybe docker-compose kill && docker-compose build will help before starting the container again. Judging by the logs seems like the container has the old value still.

Also it's worth mentioning that this repository is for development purposes only. If you'd like to self host our infrastructure please refer to: https://github.com/standardnotes/standalone and respective documentation: https://docs.standardnotes.com/self-hosting/getting-started

@mhellmeier
Copy link
Author

Thanks a lot for your quick feedback, @karolsojko .

After some debugging, I found another place where I missed replacing the value of the container. Aftward I was able to successfully change the name.

Nevertheless, it would be great to see a piece of meaningful information in the logs like "Couldn't find or connect to the database DB-NAME" instead of a looping exception.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants