Whoops \ Exception \ ErrorException (E_WARNING) Illegal string offset 'fail2ban_ban_time'


(Sentinel) #1

New install but restoring from backup. I get this message when trying to access the firewall


(Franck Danard) #2

Hi.

Can you tell us from which version you tried to restore and to which version you are using ?


(Sentinel) #3

15 to 15


(Franck Danard) #4

Ok I will open a ticket to check
https://issues.freepbx.org/browse/FREEPBX-22651


(Sentinel) #5

The odd thing after restore was I had to install endpoint manager and sysadmin. Related?


(Franck Danard) #6

I think your system must be up to date any time before restore.


(Sentinel) #7

It was


(Franck Danard) #8

Ok anyway, a ticket is opened to check your issue.


(Sentinel) #9

Thanks. How long does that usually take to get a response?


(Greg Snover) #10

Is Fail2Ban actually running? You are probably missing the file /etc/fail2ban/filter.d/zulu.conf - It’s missing after about 90% of my restores - recreate it and put this in it:

[INCLUDES]
[Definition]
#_daemon = zulu
failregex = Authentication failure from
ignoreregex =

Save it and restart the firewall and you should be fine - I don’t know why it gets lost…


(Sentinel) #11

I have it. Shows:

[INCLUDES]
[Definition]
#_daemon = zulu
failregex = Authentication failure from
ignoreregex =


(Greg Snover) #12

And F2B is running?


(Greg Snover) #13

Related perhaps? Just did a Backup and Restore - fail2ban wouldn’t start with this new error:

[root@freepbx ~]# journalctl -xe
– Subject: Unit fail2ban.service has begun start-up
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit fail2ban.service has begun starting up.
Jul 15 18:49:14 freepbx.sangoma.local fail2ban-client[11394]: ERROR Found no accessible config files for ‘filter.d/apache-api’ under /etc/fail2ban
Jul 15 18:49:14 freepbx.sangoma.local fail2ban-client[11394]: ERROR Unable to read the filter
Jul 15 18:49:14 freepbx.sangoma.local fail2ban-client[11394]: ERROR Errors in jail ‘apache-api’. Skipping…
Jul 15 18:49:14 freepbx.sangoma.local systemd[1]: fail2ban.service: control process exited, code=exited status=255
Jul 15 18:49:14 freepbx.sangoma.local systemd[1]: Failed to start Fail2Ban Service.

File didn’t exist so I created it and put this in it:

[INCLUDES]
[Definition]

Saved and then fail2ban will start - Don’t know why this is happening…


(Simon Telephonics) #15

There are a couple other threads from the past two days on this issue.


(Sentinel) #16

No one has responded. Any ideas? I need to migrate this box


(Yois) #17

(Simon Telephonics) #18

I am getting this (“Illegal string offset…”) on a fresh install of 15. Running that sysadmin hook doesn’t help here.


(Kamil) #19

Same problem after backup restoration on a fresh install.
Below fixed my issue:
fwconsole ma disable extensionroutes
fwconsole ma remove firewall sysadmin
fwconsole reload
fwconsole ma downloadinstall sysadmin firewall
fwconsole ma enable extensionroutes
fwconsole reload
/var/www/html/admin/modules/sysadmin/hooks/fail2ban-apache-config
service fail2ban start

Obviously I’ve lost my firewall configuration but not a big deal for me, what matters is that it works again. Hope it helps you too.


Fail2ban wont start
(Simon Telephonics) #20

Removing firewall & sysadmin and then reinstalling them worked for me. Thanks.

Note that this was not a backup/restore… I do not know how this server got into this state.


(Sentinel) #21

Does not work for me. I ran all your commands and still get same error