systemd:1: Value too large for defined data type

232 views
Skip to first unread message

Heiko G

unread,
Jul 11, 2016, 7:15:24 PM7/11/16
to rspamd
Hi!
I have trouble setting up rspamd on my virtual server (virtuozzo based) running Debian stable.
I will post the dump from joournalctl for the rspamd.service using systemd.
The socket unit rspamd.socket is running fine, however no connection can be established to the rspamd server using rmilter component from my mail server (connection refused).


 rspamd_regexp_library_init: pcre is compiled with JIT for x86 64bit (little endian + unaligned)
 <azmjwb>; cfg; chartable_module_config: init internal chartable module
 <azmjwb>; cfg; dkim_module_config: init internal dkim module
 <azmjwb>; cfg; spf_module_config: init internal spf module
 <wc8y6y>; map; rspamd_map_add: added map /etc/rspamd/2tld.inc
 <cpkmpm>; map; rspamd_map_add: added map /etc/rspamd/surbl-whitelist.inc
 <azmjwb>; cfg; surbl_module_config: init internal surbls module, 14 uribl rules loaded
 <azmjwb>; cfg; regexp_module_config: init internal regexp module, 81 regexp rules and 0 lua rules are loaded
 <azmjwb>; cfg; fuzzy_check_module_config: init internal fuzzy_check module, 1 rules loaded
 <wzc84d>; map; rspamd_map_add: added map /etc/rspamd/dmarc_whitelist.inc
 <hasbnx>; map; rspamd_map_add: added map /etc/rspamd/spf_dkim_whitelist.inc
 <azmjwb>; cfg; rspamd_map_add: map '/etc/rspamd/dkim_whitelist.inc' is not found, but it can be loaded automatically
 <ka7kc4>; map; rspamd_map_add: added map /etc/rspamd/dkim_whitelist.inc
 <azmjwb>; cfg; rspamd_map_add: map '/etc/rspamd/spf_whitelist.inc' is not found, but it can be loaded automatically 
 <74qfop>; map; rspamd_map_add: added map /etc/rspamd/spf_whitelist.inc
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module whitelist
 <azmjwb>; cfg; rspamd_config_is_module_enabled: lua module trie is enabled but has not been configured
 <azmjwb>; cfg; rspamd_config_is_module_enabled: trie disabling unconfigured lua module
 <azmjwb>; cfg; rspamd_config_is_module_enabled: lua module spamassassin is enabled but has not been configured
 <azmjwb>; cfg; rspamd_config_is_module_enabled: spamassassin disabling unconfigured lua module
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module settings
 <1yi1sp>; map; rspamd_map_add: added map http://rspamd.com/update/rspamd-1.2.ucl
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module rspamd_update
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module rbl
 <azmjwb>; lua; ratelimit.lua:403: enabled rate buckets: {[1] = to_ip, [2] = to, [3] = bounce_to, [4] = to_ip_from, [
 <azmjwb>; lua; ratelimit.lua:429: no servers are specified, disabling module
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module ratelimit
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module phishing
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module once_received
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module multimap
 <qq9ypw>; map; rspamd_map_add: added map /etc/rspamd/mime_types.inc
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module mime_types
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module maillist
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module ip_score
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module hfilter
 <azmjwb>; cfg; rspamd_config_is_module_enabled: lua module fun is enabled but has not been configured
 <azmjwb>; cfg; rspamd_config_is_module_enabled: fun disabling unconfigured lua module
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module forged_recipients
 <azmjwb>; cfg; rspamd_config_is_module_enabled: lua module fann_scores is enabled but has not been configured
 <azmjwb>; cfg; rspamd_config_is_module_enabled: fann_scores disabling unconfigured lua module
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module emails
 <azmjwb>; lua; dmarc.lua:276: no servers are specified for dmarc stats
 <azmjwb>; cfg; rspamd_init_lua_filters: init lua module dmarc
 <azmjwb>; cfg; rspamd_config_is_module_enabled: lua module dcc is enabled but has not been configured
 <azmjwb>; cfg; rspamd_config_is_module_enabled: dcc disabling unconfigured lua module
 <azmjwb>; cfg; rspamd_map_add: map '/var/lib/rspamd/rspamd_dynamic' is not found, but it can be loaded automatically
 <daz6fz>; map; rspamd_map_add: added map /var/lib/rspamd/rspamd_dynamic
 rspamd_url_init: initialized trie of 8255 elements
 <azmjwb>; symcache; rspamd_symbols_cache_load_items: cannot open file /var/lib/rspamd/symbols.cache, error 2, No suc
 <af4a22>; re_cache; rspamd_re_cache_init: loaded hyperscan engine witch cpu tune 'generic' and features ''
 <13d2f8>; main; main: rspamd 1.2.8 is starting, build id: release
 <13d2f8>; main; main: cpu features: sse2, sse3
 <13d2f8>; main; main: cryptobox configuration: curve25519(donna), chacha20(sse2), poly1305(sse2), siphash(generic), 
 main: pid file is not specified, skipping writing it
 rspamd_roll_history_load: cannot load history from /var/lib/rspamd/rspamd.history: No such file or directory
 <13d2f8>; main; systemd_get_socket: systemd LISTEN_FDS does not contain the expected fd: 1
 <13d2f8>; main; spawn_workers: cannot listen on systemd socket systemd:1: Value too large for defined data type
 <13d2f8>; main; spawn_workers: cannot create listen socket for controller at systemd:1


Does anyone have a clue what's going on here?

Thank you!
Heiko

Andrew Lewis

unread,
Jul 12, 2016, 3:24:12 AM7/12/16
to rsp...@googlegroups.com
Hi,

> The socket unit rspamd.socket is running fine, however no connection can be
> established to the rspamd server using rmilter component from my mail
> server (connection refused).

If systemd socket is running you should get a connection- it might
have entered failed state. You could check `systemctl status
rspamd.socket` and `netstat -l -n -p` to confirm it's really listening.

> <13d2f8>; main; systemd_get_socket: systemd LISTEN_FDS does not contain
> the expected fd: 1

This looks like the service was started in some way other than by the socket.

Please see that you're following the appropriate instructions:
https://rspamd.com/doc/quickstart.html#running-rspamd

In case situation may be somehow wrong, you could try correct it with:

systemctl stop rspamd.service
systemctl disable rspamd.service
systemctl enable rspamd.socket
systemctl start rspamd.socket # now rspamd should be started on demand

Best,
-AL.

Heiko G

unread,
Jul 13, 2016, 4:32:19 PM7/13/16
to rspamd
Hi,
this is getting weird.. I cannot get this to work.

I did exactly what is describedin the quickstart guide:

systemctl stop rspamd.service 
systemctl disable rspamd.service 
systemctl enable rspamd.socket 
systemctl start rspamd.socket # now rspamd should be started on demand 

rspamd[14552]: (main) <9370b2>; main; systemd_get_socket: cannot get systemd variable 'LISTEN_FDS'
rspamd[14552]: (main) <9370b2>; main; spawn_workers: cannot listen on systemd socket systemd:1: No such file or directory
rspamd[14552]: (main) <9370b2>; main; spawn_workers: cannot create listen socket for controller at systemd:1

systemctl status rspamd.socket:
● rspamd.socket - rapid spam filtering system
   Loaded: loaded (/lib/systemd/system/rspamd.socket; enabled)
   Active: active (listening) since Wed 2016-07-13 22:17:17 CEST; 8min ago
   Listen: 0.0.0.0:11333 (Stream)


netstat -l -n:
tcp        0      0 0.0.0.0:11333           0.0.0.0:*               LISTEN 

There is no unix socket for "/var/lib/rspamd/rspamd.sock" listed!

I have the feeling, that there is a problem with the network local interfaces with my virtual server.
There are two local interfaces "lo" and "venet0" in this guest machine:

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:7457 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7457 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:609824 (595.5 KiB)  TX bytes:609824 (595.5 KiB)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:127.0.0.1  P-t-P:127.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.255
          inet6 addr: ::2/128 Scope:Compat
          inet6 addr: 2a01:b1c1:2:4023::65a:15/128 Scope:Global
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:86469 errors:0 dropped:0 overruns:0 frame:0
          TX packets:78084 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:8473820 (8.0 MiB)  TX bytes:12774203 (12.1 MiB)

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:XX.XX.XX.XX  P-t-P:XX.XX.XX.XX  Bcast:XX.XX.XX.XX  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

By the way:rmilter is currently running in service mode at port 10023 on my machine. When I try to start rmilter in socket mode I get the same error with this LISTEN_FDS thing.
Any ideas?

Thanks!

Andrew Lewis

unread,
Jul 13, 2016, 5:11:20 PM7/13/16
to rsp...@googlegroups.com
Hi,

> rspamd[14552]: (main) <9370b2>; main; systemd_get_socket: cannot get
> systemd variable 'LISTEN_FDS'

Oh, ok, sorry, so, in fact /this/ is what happens when rspamd is
configured for socket-activation and started in the wrong fashion
fashion...

> rspamd[14552]: (main) <9370b2>; main; spawn_workers: cannot create listen
> socket for controller at systemd:1

This looks like rspamd.socket is missing the controller socket. And
indeed, status of rspamd.socket seems to show one listening port where
there should be two.

> There is no unix socket for "/var/lib/rspamd/rspamd.sock" listed!

That is expected if rspamd is not running.

Does your system have IPv6?

Is configuration & rspamd.socket file integral?

Best,
-AL.

Andrew Lewis

unread,
Jul 13, 2016, 5:54:51 PM7/13/16
to rsp...@googlegroups.com

https://github.com/systemd/systemd/issues/2059 looks like it may be relevant.

To configure socket for IPv4 instead:

# mkdir -p /etc/systemd/system/rspamd.socket.d
# cat << EOF > /etc/systemd/system/rspamd.socket.d/my.conf
> [Socket]
> ListenStream=
> ListenStream=11333
> ListenStream=127.0.0.1:11334
> EOF
# systemctl daemon-reload

Best,
-AL.

Heiko G

unread,
Jul 13, 2016, 6:56:13 PM7/13/16
to rspamd
Hi,
I think something was also wrong with my socket file. I deleted and reinstalled the package and rebooted the machine and now I got further.
So, currently I am listening at *:11333 and I can use telnet with 127.0.0.1 and ::1 to connect to the service.

I found this useful excerpt on the web to test rspamd with some input:

telnet 127.0.0.1 11333
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
SYMBOLS RSPAMC/1.3
From: <te...@test.org>
IP: 1.1.1.1
Rcpt: <te...@test.org>
Recipient-Number: 1
Queue-Id: 196585449
Helo: Unknown
User: te...@test.org
Content-length: 6

dddddd
RSPAMD/1.3 0 EX_OK
Metric: default; True; 15.30 / 15.00 / 0.0
Action: reject
Symbol: MISSING_TO(2.00)
Symbol: R_UNDISC_RCPT(5.00)
Symbol: FORGED_SENDER(0.30)
Symbol: FORGED_RECIPIENTS(1.00)
Symbol: MISSING_MID(3.00)
Symbol: DATE_IN_PAST(1.00)
Symbol: ONCE_RECEIVED(1.00)
Symbol: MISSING_SUBJECT(2.00)
Message-ID: undef

^]
telnet> quit
Connection closed.

However I now have a new problem, when some mail arrives to postfix and gets processed by rmilter:

Jul 14 00:41:40 mars rmilter[3467]: <7f56444623>; rspamdscan: failed to scan, retry, localhost, /tmp/msg.XXpxKXD4
Jul 14 00:41:41 mars rmilter[3467]: <7f56444623>; spamdscan: start scanning message on localhost
Jul 14 00:41:41 mars rmilter[3467]: <7f56444623>; rspamd; got empty reply from localhost

And journalctl for rspamd:
task; rspamd_worker_error_handler: abnormally closing connection from: ::1, error: HTTP parser error: invalid HTTP method

Oh dear.. Would be very happy to get this working someday :)

One point: Clamav scanning through rmilter seems to work fine according to my log. So Postfix seems to hand over messages fine to rmilter, doesn't it?

THX!
Reply all
Reply to author
Forward
0 new messages