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


(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


(Bifur) #22

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

This worked for me. I had to do the fwconsole ma remove parts with a force flag (-f) because it complained of dependencies.

Let’s see if it continues to work.

Thank you!


(Sentinel) #23

Not working for me. I get into the firewall wizard, then get the exact same message. Ugh


(Sentinel) #24

what I notice on restore are the following issues.

No Endpoint manager installed or System Admin. After I install them, I get the Illegal string offset ‘fail2ban_ban_time’


(Sentinel) #25

yes it’s running


(Bob Reiber) #26

I ran all those commands and rebooted the pbx for good measure and no change for me.


(Sentinel) #27

Same for me.


(Franck Danard) #28

https://issues.freepbx.org/browse/FREEPBX-22651
As I’m working on this module, I assigned the ticket to me.
I will test it and fixe it asap.


(Franck Danard) #29

Can you tell me if your system is FreePBX distro or FreePBX install under another type of OS?
If sysadmin is installed or not?
Also, On the Whoops error, can you past the entier logs to get the line numbers where the issue come from.


(Franck Danard) #30

Oups I missed this part.
Yes maybe.
Sysadmin has a part of intrusion detection code.
If this one is missing at a moment, Maybe there’s something which breaks F2B.
Tell me what’s the kind of system was before (with sysadmin or without) and what’s the kind of system after (with sysadmin or without)
FreePBX distro or non-distro?


(Sentinel) #31

Distro. It was a free pbx 15 with endpoint and system admin. Even renewed them to make them current, did a fresh backup. Restore had same results