In my case the warning was:
WARNING Determined IP using DNS Lookup: localhost = ['127.0.0.1', '127.0.0.1', '::1']
This appeared every 10s. Setting usedns=no
was no option as I wanted to get the root cause - after all somewhere in my logs this "localhost" appeared. After trying a bunch of logs I took the "brute force" way:
find /var/log -type f -name '*.log' | xargs grep localhost -l
which gave me all the log files containing that "localhost" (which were only two, one of them the fail2ban.log
itself).
It turned out that the "mysql/error.log" was the one. I dropped a database without stopping the service (omg...) which lead to (every 10s):
2021-01-20T05:31:17.784116Z 2680 [Note] Access denied for user 'myserviceaccount'@'localhost' (using password: YES)
.
In the end - no need to stop the warnings (just stop the service ;-) ).