haraka / Haraka

A fast, highly extensible, and event driven SMTP server
https://haraka.github.io
MIT License
5.09k stars 662 forks source link

TypeError: this.merge_redis_ini is not a function #3243

Closed Pacerino closed 1 year ago

Pacerino commented 1 year ago

Describe the bug

When trying to start up Haraka, i get following error:

loaded TLD files:
  1=1470
  2=9768
  3=5119
loaded 9027 Public Suffixes
loglevel: INFO
log format: DEFAULT
Starting up Haraka version 3.0.2
[INFO] [-] [core] Loading plugins
[INFO] [-] [core] Loading plugin: process_title
[INFO] [-] [core] Loading plugin: dnsbl
[INFO] [-] [core] Loading plugin: helo.checks
[INFO] [-] [core] Loading plugin: auth/flat_file
[INFO] [-] [core] Loading plugin: rcpt_to.in_host_list
[INFO] [-] [core] Loading plugin: headers
[INFO] [-] [core] Loading plugin: redis
[INFO] [-] [core] Loading plugin: queue/smtp_forward
[NOTICE] [-] [core] the plugin max_unrecognized_commands has been replaced by 'limit'. Please update config/plugins
[INFO] [-] [core] Loading plugin: limit
[CRIT] [-] [core] TypeError: this.merge_redis_ini is not a function
[CRIT] [-] [core]     at exports.load_limit_ini (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-limit/index.js:93:10)
[CRIT] [-] [core]     at exports.register (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-limit/index.js:9:10)
[CRIT] [-] [core]     at plugins._register_plugin (/usr/lib/node_modules/Haraka/plugins.js:400:12)
[CRIT] [-] [core]     at plugins.load_plugin (/usr/lib/node_modules/Haraka/plugins.js:374:17)
[CRIT] [-] [core]     at /usr/lib/node_modules/Haraka/plugins.js:319:21
[CRIT] [-] [core]     at Array.forEach (<anonymous>)
[CRIT] [-] [core]     at plugins.load_plugins (/usr/lib/node_modules/Haraka/plugins.js:315:17)
[CRIT] [-] [core]     at Server.createServer (/usr/lib/node_modules/Haraka/server.js:309:20)
[CRIT] [-] [core]     at Object.<anonymous> (/usr/lib/node_modules/Haraka/haraka.js:83:8)
[CRIT] [-] [core]     at Module._compile (node:internal/modules/cjs/loader:1241:14)
[NOTICE] [-] [core] Shutting down

Expected behavior

Normal startup of Haraka

Observed behavior

Error message at the top

Steps To Reproduce

  1. Install Haraka
  2. Configure Haraka with Redis and LImit plugin
  3. Try to start

System Info:

Haraka Haraka.js — Version: 3.0.2
Node v20.9.0
OS Linux mail 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux
openssl OpenSSL 3.0.11 19 Sep 2023 (Library: OpenSSL 3.0.11 19 Sep 2023)

Additional context

I could not install the node hiredis Package as required in the documentation. I'm running Debian 12 and with that, Python2.7 has been removed from the OS. Python 3 is not supported by hiredis. Even that, hiredis is deprecated since at least 4 years.

Pacerino commented 1 year ago

Found the issue! [NOTICE] [-] [core] the plugin max_unrecognized_commands has been replaced by 'limit'. Please update config/plugins

Removing this plugin from the config resolved the problem and the server has started. I will see if it even works without hiredis.