etherpad-lite: Etherpad-lite version 1.9.2 doesn't work with redis database backend

Describe the bug

Somehow the connection to the redis database backend doesn’t work anymore with etherpad-lite version 1.9.2. Version 1.9.1 still works fine, so I stay a moment longer with the old version.

To Reproduce Steps to reproduce the behavior:

  1. Configure remote redis database
  2. Install etherpad-lite on a fresh system (Debian 11 Bullseye with nodejs version 18.17.1 from nodesource)
  3. Start etherpad-lite with bin/run.sh

Expected behavior A running etherpad-lite instance …

Server (please complete the following information):

  • Etherpad version: 1.9.2
  • OS: Debian 11.7
  • Node.js version (node --version): 18.17.1
  • npm version (npm --version): 9.6.7
  • Is the server free of plugins: no plugins activated

Configuration

{
  "ip": "0.0.0.0",
  "port": 9005,
  "dbType": "redis",
  "dbSettings": {
    "socket":{
      "host": "10.0.9.39",
      "port": 6384
    },
    "password": "VERYSECUREPASSWORD"
  },
  "users": {
    "superadmin": {
      "is_admin": true,
      "hash": "VERYSECUREPASSWORDHASH"
    }
  },
  "commitRateLimiting": {
    "duration": 1,
    "points": 100
  },
  "loglevel": "DEBUG"
}

Log https://paste.momou.ch/?9d5dc5bae685d476#GpRm8M7gk5dyouNGE2oDeJf6htDnKKF7GhKGfxD9B5N3

Probably the relevant part is:

[2023-08-28 11:48:56.715] [INFO] console - Your Etherpad version is 1.9.2 (b1c34b5)
[2023-08-28 11:48:56.718] [DEBUG] secret-rotation expressSessionSecrets - new secret rotator (interval 86400000, lifetime: 864000000)
[2023-08-28 11:48:56.719] [DEBUG] secret-rotation expressSessionSecrets - starting secret rotation
[2023-08-28 11:48:56.719] [DEBUG] ueberDB - GET    - expressSessionSecrets:*-null - null - from database 
[2023-08-28 11:48:56.720] [ERROR] server - Error occurred while starting Etherpad
[2023-08-28 11:48:56.720] [ERROR] server - Metrics at time of fatal error:
{
  "httpStartTime": 0,
  "memoryUsage": 153112576,
  "memoryUsageHeap": 57215112,
  "ueberdb_lockAwaits": 0,
  "ueberdb_lockAcquires": 0,
  "ueberdb_lockReleases": 0,
  "ueberdb_reads": 0,
  "ueberdb_readsFailed": 0,
  "ueberdb_readsFinished": 0,
  "ueberdb_readsFromCache": 0,
  "ueberdb_readsFromDb": 0,
  "ueberdb_readsFromDbFailed": 0,
  "ueberdb_readsFromDbFinished": 0,
  "ueberdb_writes": 0,
  "ueberdb_writesFailed": 0,
  "ueberdb_writesFinished": 0,
  "ueberdb_writesObsoleted": 0,
  "ueberdb_writesToDb": 0,
  "ueberdb_writesToDbFailed": 0,
  "ueberdb_writesToDbFinished": 0,
  "ueberdb_writesToDbRetried": 0,
  "totalUsers": 0,
  "activePads": 0
}
[2023-08-28 11:48:56.722] [ERROR] server - TypeError: Cannot read properties of null (reading 'map')
    at SecretRotator._update (/srv/etherpad-lite/src/node/security/SecretRotator.js:169:30)
    at async SecretRotator.start (/srv/etherpad-lite/src/node/security/SecretRotator.js:108:5)
    at async exports.restartServer (/srv/etherpad-lite/src/node/hooks/express.js:186:5)
    at async exports.createServer [as hook_fn] (/srv/etherpad-lite/src/node/hooks/express.js:69:3)
[2023-08-28 11:48:56.723] [INFO] server - Exiting...
[2023-08-28 11:48:56.723] [INFO] server - Waiting for Node.js to exit...
[2023-08-28 11:49:01.723] [ERROR] server - Something that should have been cleaned up during the shutdown hook (such as a timer, worker thread, or open connection) is preventing Node.js from exiting
[2023-08-28 11:49:01.723] [ERROR] server - Enable `dumpOnUncleanExit` setting to get a dump of objects preventing a clean exit
[2023-08-28 11:49:01.723] [ERROR] server - Forcing an unclean exit...

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 18 (10 by maintainers)

Most upvoted comments

Sorry I did document this somewhere but I guess it never got spotted -.-

Hm. What to do now? Will there be sometime given a bugfix release, or should I consider changing the database backend? Are there migration paths from redis to another database type?

I’ve got great news @brknkfr . It is not a bug but a feature 😄 . Try with:

 "dbSettings": {
     "url": "redis://10.0.9.39:6384",
}

and it will write to the database. I’ll fix your syntax so you will also get a connection with above solution. But this won’t be available until 1.9.3. So please use the url syntax. That will continue to work throughout the next releases.

This seems to work with src/bin/run.sh, but now my systemd unit file is broken somehow … I’ll manage to fix it. Thanks!