You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Martin Puppe <pu...@jam-software.com> on 2016/03/14 12:08:29 UTC

DnsResolver warning

Hello,

with SpamAssassin 3.4.1, we frequently get the following warning:

```
Fri Mar 11 00:05:06 2016 [-8128] warn: error creating a DNS resolver socket: Only one usage of each socket address (protocol/network address/port) is normally permitted.
                                        at Mail/SpamAssassin/DnsResolver.pm line 434, <GEN38> line 843.
Fri Mar 11 00:05:06 2016 [-8128] warn: dns: unable to connect to [127.0.0.1]:53, failing over to [192.168.123.254]:53
```

This didn't happen with 3.4.0.

Has anyone else seen this issue? Does anybody have an idea what has changed?

An answer on Stack Overflow [^1] suggests that too many sockets are opened in a short amount of time. But why hasn't this been a problem before?

Regards
Martin Puppe

[^1]: <http://stackoverflow.com/a/1339240>

________________________________



--------------------------------------------------------
JAM Software GmbH
Managing Director: Joachim Marder
Am Wissenschaftspark 26 * 54296 Trier * Germany
Phone: +49 (0)651-145 653 -0 * Fax: +49 (0)651-145 653 -29
Commercial register number HRB 4920 (AG Wittlich) http://www.jam-software.com

________________________________



----------------------------------------------------
JAM Software GmbH
Geschäftsführer: Joachim Marder
Am Wissenschaftspark 26 * 54296 Trier * Germany
Tel: 0651-145 653 -0 * Fax: 0651-145 653 -29
Handelsregister Nr. HRB 4920 (AG Wittlich) http://www.jam-software.de

Re: DnsResolver warning

Posted by Alarig Le Lay <al...@swordarmor.fr>.
On Mon Mar 14 11:08:29 2016, Martin Puppe wrote:
> Fri Mar 11 00:05:06 2016 [-8128] warn: dns: unable to connect to [127.0.0.1]:53, failing over to [192.168.123.254]:53

Hi,

Did you configured localhost as a resolver in /etc/resolv.conf or in the
spamassassin conf? If so, do you have a recursive server listening on
localhost?

-- 
alarig

Re: DnsResolver warning

Posted by Reindl Harald <h....@thelounge.net>.

Am 14.03.2016 um 12:08 schrieb Martin Puppe:
> with SpamAssassin 3.4.1, we frequently get the following warning:
>
> ```
> Fri Mar 11 00:05:06 2016 [-8128] warn: error creating a DNS resolver socket: Only one usage of each socket address (protocol/network address/port) is normally permitted.
>                                          at Mail/SpamAssassin/DnsResolver.pm line 434, <GEN38> line 843.
> Fri Mar 11 00:05:06 2016 [-8128] warn: dns: unable to connect to [127.0.0.1]:53, failing over to [192.168.123.254]:53

* what type of dns-server is running on 127.0.0.1
* how is that one configured
* with unbound and 127.0.0.1 the only server in /etc/resolv.conf
   there is normally no problerm

> This didn't happen with 3.4.0.

don't happen here with 3.4.1 too

> Has anyone else seen this issue? Does anybody have an idea what has changed?

maybe the amount of queries due new/extended rules

your problem is for sure your local resolver

> An answer on Stack Overflow [^1] suggests that too many sockets are opened in a short amount of time. But why hasn't this been a problem before?

maybe it was and didn't get logged

look at your resolver config and consider raise "num-threads: 1" to the 
number of cores which should allow with the config below 512 x number of 
cores dns requests at the same time

[root@mail-gw:~]$ cat unbound.conf
server:
  verbosity: 1
  statistics-interval: 86400
  statistics-cumulative: no
  extended-statistics: no

  num-threads: 1
  outgoing-range: 1024
  num-queries-per-thread: 512
  msg-cache-slabs: 8
  rrset-cache-slabs: 8
  infra-cache-slabs: 8
  key-cache-slabs: 8
  so-rcvbuf: 4m
  so-sndbuf: 4m
  minimal-responses: yes

  msg-cache-size: 32m
  neg-cache-size: 32m
  rrset-cache-size: 64m
  cache-min-ttl: 90
  cache-max-ttl: 10800

  interface: 127.0.0.1
  access-control: 127.0.0.0/8 allow
  interface-automatic: no
  port: 53
  do-ip4: yes
  do-ip6: no
  do-udp: yes
  max-udp-size: 1024
  edns-buffer-size: 1024
  do-tcp: yes