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

No no, it’s for Sentinelace’s case.
For the rest, just update it on the current system. That’s all.

I’ve got the same problem restoring a fully updated 10.13.66-22 backup to a new FreePBX 15 machine.

This appears to have fixed it for me. I followed the above steps with the (-f) and when the Active Firewall Wizard started I chose to “Abort”. Typically if I ran the Wizard I would see network info from the old sever while choosing to trust new networks or not. Once the Wizard completed the Web Interface would brake with the same error. This time I aborted and went to the Firewall menu directly and manually enabled the active firewall. I did not see any of the OLD networks this time. So far so good.

Just to make it more confusing I rolled back to a snapshot and tried the import again and this time I had to go through the wizard to not get the error. Choosing abort caused it this time when I turned on the active firewall after. :man_facepalming:

Can you share which steps exactly you followed?

After the last command the system said fail2ban was already running. When opening the web interface the active firewall wizard comes up. I need to test from snapshots a few more times. But of the two times I’ve had it work, once I was successful choosing “Abort” then turning firewall on from the module and once from actually following the wizard. Though I’ve had it fail back to the original error both ways too.

I encountered on a test restore of 13 to 15 and the latest edge did the trick for me

edge update to sysadmin 15.0.21.70 fixed it

ty @danardf

1 Like

I also tried edge sysadmin and that fixed the problem with import. Though turning on “White List Sync” broke fail2ban. Following my previous steps did fix the issue though all my previous settings for firewall trusted networks were lost. Seems there is something imported that gives the whitelist sync a fit.

@danardf the tickets you have referenced in this thread are now hidden as FREEI tickets.

I am still facing issues with this “Illegal string offset” problem.

What is the root cause of it? If this is solved in the edge modules, what is the timeline to get these verified for stable?

edge does fix most but agree fail2ban is still broken

Lets’s see how your shell responds to

php -v
fail2ban-client -V

PHP 5.6.40 (cli) (built: Jan 22 2019 23:51:52)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologie

Fail2Ban v0.8.14

Copyright (c) 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors
Copyright of modifications held by their respective authors.
Licensed under the GNU General Public License v2 (GPL).

Written by Cyril Jaquier [email protected].
Many contributions by Yaroslav O. Halchenko <[email protected]

Now I have fail2ban that will not start and no firewall in the gui

Sorry , I can’t answer to that , Fail2ban stopped distributing or supporting 0.8 six years ago. php stopped distributing or supporting 5.6 three years ago I would take both issues up with Sangoma (but they are ham-strung by Zend which they chose to protect their apparently still broken php code (that means that nobody but them can help you here ) but as Zend is no longer a thing then go figure Yossarian . . . :wink: )

This does not fix it for me and still doesn’t start. Journalctl -xe output:

-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fail2ban.service has finished shutting down.
Aug 04 15:16:33 PBXphoneSystem systemd[1]: Starting Fail2Ban Service...
-- 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.
Aug 04 15:16:33 PBXphoneSystem fail2ban-client[12677]: ERROR  Found no accessible config files for 'filter.d/zulu' under /etc/fail2ban
Aug 04 15:16:33 PBXphoneSystem fail2ban-client[12677]: ERROR  Unable to read the filter
Aug 04 15:16:33 PBXphoneSystem fail2ban-client[12677]: ERROR  Errors in jail 'zulu'. Skipping...
Aug 04 15:16:33 PBXphoneSystem systemd[1]: fail2ban.service: control process exited, code=exited status=255
Aug 04 15:16:33 PBXphoneSystem systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fail2ban.service has failed.
-- 
-- The result is failed.
Aug 04 15:16:33 PBXphoneSystem systemd[1]: Unit fail2ban.service entered failed state.
Aug 04 15:16:33 PBXphoneSystem systemd[1]: fail2ban.service failed.
Aug 04 15:16:33 PBXphoneSystem systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Aug 04 15:16:33 PBXphoneSystem systemd[1]: Stopped Fail2Ban Service.
-- Subject: Unit fail2ban.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fail2ban.service has finished shutting down.
Aug 04 15:16:33 PBXphoneSystem systemd[1]: Starting Fail2Ban Service...
-- 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.
Aug 04 15:16:34 PBXphoneSystem fail2ban-client[12681]: ERROR  Found no accessible config files for 'filter.d/zulu' under /etc/fail2ban
Aug 04 15:16:34 PBXphoneSystem fail2ban-client[12681]: ERROR  Unable to read the filter
Aug 04 15:16:34 PBXphoneSystem fail2ban-client[12681]: ERROR  Errors in jail 'zulu'. Skipping...
Aug 04 15:16:34 PBXphoneSystem systemd[1]: fail2ban.service: control process exited, code=exited status=255
Aug 04 15:16:34 PBXphoneSystem systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fail2ban.service has failed.
-- 
-- The result is failed.
Aug 04 15:16:34 PBXphoneSystem systemd[1]: Unit fail2ban.service entered failed state.
Aug 04 15:16:34 PBXphoneSystem systemd[1]: fail2ban.service failed.
Aug 04 15:16:34 PBXphoneSystem systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Aug 04 15:16:34 PBXphoneSystem systemd[1]: Stopped Fail2Ban Service.
-- Subject: Unit fail2ban.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fail2ban.service has finished shutting down.
Aug 04 15:16:34 PBXphoneSystem systemd[1]: start request repeated too quickly for fail2ban.service
Aug 04 15:16:34 PBXphoneSystem systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fail2ban.service has failed.
-- 
-- The result is failed.
Aug 04 15:16:34 PBXphoneSystem systemd[1]: Unit fail2ban.service entered failed state.
Aug 04 15:16:34 PBXphoneSystem systemd[1]: fail2ban.service failed.

I might be missing something incredibly complicated, but have you tried creating the “filter.d/zulu” file using ‘touch’?

yes, I even deleted the log file and recreated it with touch and did a chown. Same result

Are you using the latest Zulu version i.e. v14.0.58.11 or v15.0.58.12 (depends on your pbx version)? If not then please update to the latest version and give try.

thanks.

I ran all updates with yum and fwconsole. Is there an update not part of this?

I was finally able to resolve this by copying a working zulu.conf file from a working PBX. Then running the following:

/var/www/html/admin/modules/sysadmin/hooks/fail2ban-apache-config
sudo -u asterisk touch /var/log/asterisk/zulu_out.log

Sangoma is aware of the issue and is working on a fix I’m told. For now this works.