[Rspamd-Users] constant redis/lua errors in rspamd logs
Michal Soltys
msoltyspl at yandex.pl
Wed Dec 11 15:18:38 UTC 2024
Hi,
While trying to learn spam/ham messages via rspamc, I've noticed that I
*always* get 404 - whether it's spam or ham, whether the messages are
new or not. Not sure when exactly that started happening. Other parts of
rspamd ecosystem has issues with redis as well (see the bottom of the mail).
The relevant configurations in rspamd are pretty basic:
/etc/rspamd/local.d/redis.conf:
expand_keys = true;
servers = "127.0.0.1";
/etc/rspamd/local.d/classifier-bayes.conf:
expire = 2678400;
The rspamd is from the official repo: 3.10.2-1~b8a232043~bullseye
In rspamd logs though, each logged attempt includes lua errors when
trying to access redis.
learn_spam example:
command:
# rspamc learn_spam spam_156846
Results for file: spam_156846 (0.004 seconds)
HTTP error: 404,
<930565058.2337393.1733922940330 at vogelsangusa-com.mail.protection.outlook.com>
has been already learned as spam, ignore it
and related logs (see "call to redis failed:
/usr/share/rspamd/lualib/lua_redis.lua:654: attempt to compare number
with nil" in 5th and 7th line):
2024-12-11 15:41:32 #605(controller) <40cbfb>; csession;
rspamd_controller_check_password: allow unauthorized connection from a
trusted IP 127.0.0.1
2024-12-11 15:41:32 #605(controller) <40cbfb>; csession;
rspamd_task_load_message: loaded message from zstd compressed stream;
compressed: 2995; uncompressed: 8776
2024-12-11 15:41:32 #605(controller) <40cbfb>; csession;
rspamd_message_parse: loaded message; id:
<930565058.2337393.1733922940330 at vogelsangusa-com.mail.protection.outlook.com>;
queue-id: <undef>; size: 8776; checksum: <2765fca1382a4d782f2ff8097e3fe748>
2024-12-11 15:41:32 #605(controller) <40cbfb>; csession;
rspamd_mime_part_detect_language: detected part language: en
2024-12-11 15:41:32 #605(controller) <40cbfb>; csession;
rspamd_redis_process_tokens: call to redis failed:
/usr/share/rspamd/lualib/lua_redis.lua:654: attempt to compare number
with nil; trace: [1]:{/usr/share/rspamd/lualib/lua_redis.lua:654 -
<unknown> [Lua]}; [2]:{/usr/share/rspamd/lualib/lua_redis.lua:850 -
get_key_indexes [Lua]}; [3]:{/usr/share/rspamd/lualib/lua_redis.lua:986
- rspamd_redis_make_request [Lua]};
[4]:{/usr/share/rspamd/lualib/lua_redis.lua:1501 - do_call [Lua]};
[5]:{/usr/share/rspamd/lualib/lua_redis.lua:1515 - exec_redis_script
[Lua]}; [6]:{/usr/share/rspamd/lualib/lua_bayes_redis.lua:39 - <unknown>
[Lua]};
2024-12-11 15:41:32 #605(controller) <40cbfb>; csession;
rspamd_stat_classifiers_process: skip statistics as SPAM class is missing
2024-12-11 15:41:32 #605(controller) <40cbfb>; csession;
rspamd_stat_cache_redis_check: call to redis failed:
/usr/share/rspamd/lualib/lua_redis.lua:654: attempt to compare number
with nil; trace: [1]:{/usr/share/rspamd/lualib/lua_redis.lua:654 -
<unknown> [Lua]}; [2]:{/usr/share/rspamd/lualib/lua_redis.lua:850 -
get_key_indexes [Lua]}; [3]:{/usr/share/rspamd/lualib/lua_redis.lua:986
- rspamd_redis_make_request [Lua]};
[4]:{/usr/share/rspamd/lualib/lua_redis.lua:1501 - do_call [Lua]};
[5]:{/usr/share/rspamd/lualib/lua_redis.lua:1515 - exec_redis_script
[Lua]}; [6]:{/usr/share/rspamd/lualib/lua_bayes_redis.lua:196 -
<unknown> [Lua]};
2024-12-11 15:41:32 #605(controller) <40cbfb>; csession;
rspamd_task_process: learn error:
<930565058.2337393.1733922940330 at vogelsangusa-com.mail.protection.outlook.com>
has been already learned as spam, ignore it
2024-12-11 15:41:32 #605(controller) <40cbfb>; csession;
rspamd_controller_learn_fin_task: cannot learn
<930565058.2337393.1733922940330 at vogelsangusa-com.mail.protection.outlook.com>:
<930565058.2337393.1733922940330 at vogelsangusa-com.mail.protection.outlook.com>
has been already learned as spam, ignore it
Other parts of rspamd also seem to have issues with redis for some reason:
2024-12-11 15:47:59 #606(normal) lua_redis_push_error: call to callback
failed: /usr/share/rspamd/lualib/lua_redis.lua:1465: bad format string
type: nil; trace: [1]:{[C]:-1
- infox [C]}; [2]:{/usr/share/rspamd/lualib/lua_redis.lua:1465 -
callback [Lua]}; [3]:{/usr/share/rspamd/lualib/lua_redis.lua:1063 -
<unknown> [Lua]};
2024-12-11 15:49:32 #606(normal) <333d22>; task;
lua_metric_symbol_callback: call to (NEURAL_LEARN) failed (2):
/usr/share/rspamd/lualib/lua_redis.lua:654: attempt to compare number
with nil; trace: [1]:{/usr/share/rspamd/lualib/lua_redis.lua:654 -
<unknown> [Lua]}; [2]:{/usr/share/rspamd/lualib/lua_redis.lua:850 -
get_key_indexes [Lua]}; [3]:{/usr/share/rspamd/lualib/lua_redis.lua:986
- rspamd_redis_make_request [Lua]};
[4]:{/usr/share/rspamd/lualib/lua_redis.lua:1501 - do_call [Lua]};
[5]:{/usr/share/rspamd/lualib/lua_redis.lua:1515 - exec_redis_script
[Lua]}; [6]:{/usr/share/rspamd/plugins/neural.lua:301 -
ann_push_task_result [Lua]};
[7]:{/usr/share/rspamd/plugins/neural.lua:871 - <unknown> [Lua]}
More information about the Users
mailing list