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

NewRelic error causes standalone syncing server to die #92

Closed CybersShell closed 1 year ago

CybersShell commented 1 year ago

Output of ./server.sh version:

Container                             Repository                        Tag                 Image Id            Size
api-gateway-standalone                standardnotes/api-gateway         latest              5d894348c3bd        204MB
auth-standalone                       standardnotes/auth                latest              34a8dc9fb6b9        218MB
auth-worker-standalone                standardnotes/auth                latest              34a8dc9fb6b9        218MB
cache-standalone                      redis                             6.0-alpine          b5a61c880115        24.6MB
db-standalone                         mysql                             5.6                 dd3b2a5dcb48        303MB
files-standalone                      standardnotes/files               latest              99dd5d25922d        206MB
syncing-server-js-standalone          standardnotes/syncing-server-js   latest              28d59ef19e62        217MB
syncing-server-js-worker-standalone   standardnotes/syncing-server-js   latest              28d59ef19e62        217MB
workspace-standalone                  standardnotes/workspace           latest              e96e83bb8eff        216MB
workspace-worker-standalone           standardnotes/workspace           latest              e96e83bb8eff        216MB

Describe the issue When starting on a fresh install, I get an error in syncing-js-server-standalone about Newrelic not having an app name. The auth server has not started due to these errors. Syncing-js-server-standalone keeps exiting.

I have changed the URL for Syncing JS in the Docker Compose file to the name of the container syncing-server-js-standalone. Still having this issue.

Logs

syncing-server-js-standalone         | db (172.23.0.2:3306) open
syncing-server-js-standalone         | db:3306 is up - executing command
syncing-server-js-standalone         | cache (172.23.0.3:6379) open
syncing-server-js-standalone         | cache:6379 is up - executing command
syncing-server-js-standalone         | Starting Web...
syncing-server-js-standalone         | New Relic for Node.js was unable to bootstrap itself due to an error:
syncing-server-js-standalone         | Error: New Relic requires that you name this application!
syncing-server-js-standalone         | Set app_name in your newrelic.js or newrelic.cjs file or set environment variable
syncing-server-js-standalone         | NEW_RELIC_APP_NAME. Not starting!
syncing-server-js-standalone         |     at createAgent (/workspace/.yarn/cache/newrelic-npm-9.6.0-f10080c2de-eb378acde1.zip/node_modules/newrelic/index.js:141:11)
syncing-server-js-standalone         |     at initialize (/workspace/.yarn/cache/newrelic-npm-9.6.0-f10080c2de-eb378acde1.zip/node_modules/newrelic/index.js:82:15)
syncing-server-js-standalone         |     at Object.<anonymous> (/workspace/.yarn/cache/newrelic-npm-9.6.0-f10080c2de-eb378acde1.zip/node_modules/newrelic/index.js:37:3)
syncing-server-js-standalone         |     at Module._compile (node:internal/modules/cjs/loader:1159:14)
syncing-server-js-standalone         |     at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
syncing-server-js-standalone         |     at require$$0.Module._extensions..js (/workspace/.pnp.cjs:13425:33)
syncing-server-js-standalone         |     at Module.load (node:internal/modules/cjs/loader:1037:32)
syncing-server-js-standalone         |     at require$$0.Module._load (/workspace/.pnp.cjs:13263:14)
syncing-server-js-standalone         |     at Module.require (node:internal/modules/cjs/loader:1061:19)
syncing-server-js-standalone         |     at require (node:internal/modules/cjs/helpers:103:18)
syncing-server-js-standalone         | [Error] PoolCluster : Error: Access denied for user 'standard_notes_user'@'172.23.0.5' (using password: YES)
syncing-server-js-standalone         | [Error] PoolCluster : Error: Access denied for user 'standard_notes_user'@'172.23.0.5' (using password: YES)
syncing-server-js-standalone         | [Error] PoolCluster : Error: Access denied for user 'standard_notes_user'@'172.23.0.5' (using password: YES)
syncing-server-js-standalone         | [Error] PoolCluster : Error: Access denied for user 'standard_notes_user'@'172.23.0.5' (using password: YES)
syncing-server-js-standalone         | [Error] PoolCluster : Error: Access denied for user 'standard_notes_user'@'172.23.0.5' (using password: YES)
syncing-server-js-standalone         | [Error] PoolCluster : Error: Access denied for user 'standard_notes_user'@'172.23.0.5' (using password: YES)
syncing-server-js-standalone         | [Error] PoolCluster : Error: Access denied for user 'standard_notes_user'@'172.23.0.5' (using password: YES)
syncing-server-js-standalone         | [Error] PoolCluster : Error: Access denied for user 'standard_notes_user'@'172.23.0.5' (using password: YES)
syncing-server-js-standalone         | [Error] PoolCluster : Error: Access denied for user 'standard_notes_user'@'172.23.0.5' (using password: YES)
syncing-server-js-standalone         | [Error] PoolCluster : Error: Access denied for user 'standard_notes_user'@'172.23.0.5' (using password: YES)
syncing-server-js-standalone         | /workspace/.yarn/cache/mysql2-npm-2.3.3-fa543fff43-dda663a631.zip/node_modules/mysql2/lib/pool_cluster.js:37
syncing-server-js-standalone         |       return cb(new Error('Pool does Not exists.'));
syncing-server-js-standalone         |                 ^
syncing-server-js-standalone         | 
syncing-server-js-standalone         | Error: Pool does Not exists.
syncing-server-js-standalone         |     at PoolNamespace.getConnection (/workspace/.yarn/cache/mysql2-npm-2.3.3-fa543fff43-dda663a631.zip/node_modules/mysql2/lib/pool_cluster.js:37:17)
syncing-server-js-standalone         |     at /workspace/.yarn/cache/mysql2-npm-2.3.3-fa543fff43-dda663a631.zip/node_modules/mysql2/lib/pool_cluster.js:44:21
syncing-server-js-standalone         |     at /workspace/.yarn/cache/mysql2-npm-2.3.3-fa543fff43-dda663a631.zip/node_modules/mysql2/lib/pool_cluster.js:267:18
syncing-server-js-standalone         |     at /workspace/.yarn/cache/mysql2-npm-2.3.3-fa543fff43-dda663a631.zip/node_modules/mysql2/lib/pool.js:60:18
syncing-server-js-standalone         |     at PoolConnection.<anonymous> (/workspace/.yarn/cache/mysql2-npm-2.3.3-fa543fff43-dda663a631.zip/node_modules/mysql2/lib/connection.js:775:13)
syncing-server-js-standalone         |     at Object.onceWrapper (node:events:628:26)
syncing-server-js-standalone         |     at PoolConnection.emit (node:events:525:35)
syncing-server-js-standalone         |     at PoolConnection.emit (node:domain:489:12)
syncing-server-js-standalone         |     at PoolConnection._notifyError (/workspace/.yarn/cache/mysql2-npm-2.3.3-fa543fff43-dda663a631.zip/node_modules/mysql2/lib/connection.js:236:12)
syncing-server-js-standalone         |     at ClientHandshake.<anonymous> (/workspace/.yarn/cache/mysql2-npm-2.3.3-fa543fff43-dda663a631.zip/node_modules/mysql2/lib/connection.js:125:14)
syncing-server-js-standalone         | 
syncing-server-js-standalone         | Node.js v18.12.1
api-gateway-standalone               | auth:3000 is unavailable yet - waiting for it to start
workspace-standalone                 | auth:3000 is unavailable yet - waiting for it to start
auth-worker-standalone               | auth:3000 is unavailable yet - waiting for it to start
workspace-worker-standalone          | workspace:3000 is unavailable yet - waiting for it to start
syncing-server-js-worker-standalone  | syncing-server-js-standalone:3000 is unavailable yet - waiting for it to start
auth-standalone                      | syncing-server-js-standalone:3000 is unavailable yet - waiting for it to start
syncing-server-js-standalone exited with code 1
jackyzy823 commented 1 year ago

Does NEW_RELIC_ENABLED=false exists in your .env file?

CybersShell commented 1 year ago

Does NEW_RELIC_ENABLED=false exists in your .env file?

Adding it back fixed it.