Fail2ban: JSON dumps fails

Created on 4 Apr 2018  Â·  5Comments  Â·  Source: fail2ban/fail2ban

Environment:

  • Fail2Ban version (including any possible distribution suffixes):
  • OS, including release name/version:
  • [ ] Fail2Ban installed via OS/distribution mechanisms
  • [X] You have not applied any additional foreign patches to the codebase
  • [ ] Some customizations were done to the configuration (provide details below is so)

I have installed from the tar because I have to use the Ipv6 version and in Ubuntu 16 the packed is to old. The issue was not found in the logs before version 0.10.3 and I have also installed 0.10.1 and 2 befor.

The issue:

since the update to 0.10.3 when banning ssh faules the log say something like this:
fail2ban.log:2018-04-04 21:07:26,420 fail2ban.database       [26384]: ERROR   json dumps failed: set([u'admin']) is not JSON serializable
fail2ban.log:2018-04-04 21:10:26,704 fail2ban.database       [26384]: ERROR   json dumps failed: set([u'mythtv']) is not JSON serializable
fail2ban.log:2018-04-04 21:23:03,310 fail2ban.database       [27707]: ERROR   json dumps failed: set([u'suzanne']) is not JSON serializable

The sting between the ‘‘ seams to be the trying username.

Thanks for help, Alex

All 5 comments

Nice catch.
I'll try to fix it soon.

Oh, cool thanks. It‘s realy a bug, I was afraid it might be mine.

I could reproduce it, fixed and covered in test-cases now in 34b586b51ebc2ca914bdc9e0a4a943481866745d for all python versions.
I'm waiting for the test-cases, then have to release 0.10.3.1 if succeeded.

Done

Works fine, thank you!

Was this page helpful?
0 / 5 - 0 ratings