I had a VM die today. The install was an older FreePbx 16 and I decided to fire up a new VM and do an clean install of FreePbx 17 then do a restore of the old config.
After I do a restore, there is no audio either direction, so I headed over to the firewall to start troubleshooting and got this error message.
I then went back to a clean install and confirmed I could get to the firewall in the GUI. And I could.
I then did a restore and came up with the same result. The firewall throws error messages in the GUI.
root@ORD-PBX-GigRent-003:~# fwconsole ma downloadinstall firewall --tag= 17.0.1.32 && fwconsole reload
No repos specified, using: [standard] from last GUI settings
Downloading module 'firewall'
Processing firewall
Downloading...
1211709/1211709 [============================] 100%
Finished downloading
Extracting...Done
Download completed in 4 seconds
Generating CSS...Done
Module firewall version 17.0.1.30 successfully installed
Downloading module '17.0.1.32'
The following error(s) occured:
- Retrieved Module XML Was Empty
root@ORD-PBX-GigRent-003:~# ^C
The GUI still throws this error message when trying to access the firewall
Whoops\Exception\ErrorException thrown with message "A non-numeric value encountered"
Stacktrace:
#5 Whoops\Exception\ErrorException in /var/www/html/admin/modules/firewall/Firewall.class.php:2306
#4 Whoops\Run:handleError in /var/www/html/admin/modules/firewall/Firewall.class.php:2306
#3 FreePBX\modules\Firewall:inRange in /var/www/html/admin/modules/firewall/Firewall.class.php:2268
#2 FreePBX\modules\Firewall:isTrusted in /var/www/html/admin/modules/firewall/Firewall.class.php:797
#1 FreePBX\modules\Firewall:showLockoutWarning in /var/www/html/admin/modules/firewall/page.firewall.php:23
#0 include in /var/www/html/admin/config.php:658
That did allot of stuff… but the error is still there.
root@ORD-PBX-GigRent-003:~# fwconsole ma refreshsignatures
fwconsole ma --edge upgradeall
fwconsole chown
fwconsole r --verbose
Getting Data from Online Server...
Done
Checking Signatures of Modules...
Checking accountcodepreserve...
Good
Checking adv_recovery...
Good
Checking allowlist...
Good
Checking amd...
Good
Checking announcement...
Good
Checking api...
Good
Checking areminder...
Good
Checking arimanager...
Good
Checking asterisk-cli...
Good
Checking asteriskinfo...
Good
Checking backup...
Good
Checking blacklist...
Good
Checking broadcast...
Good
Checking builtin...
Checking bulkhandler...
Good
Checking calendar...
Good
Checking callaccounting...
Good
Checking callback...
Good
Checking callerid...
Good
Checking callforward...
Good
Checking calllimit...
Good
Checking callrecording...
Good
Checking callwaiting...
Good
Checking cdr...
Good
Checking cdrpro...
Good
Checking cel...
Good
Checking certman...
Good
Checking cidlookup...
Good
Checking conferences...
Good
Checking conferencespro...
Good
Checking configedit...
Good
Checking contactmanager...
Good
Checking core...
Good
Checking cos...
Good
Checking customappsreg...
Good
Checking customcontexts...
Good
Checking dashboard...
Good
Checking daynight...
Good
Checking dictate...
Good
Checking directory...
Good
Checking disa...
Good
Checking donotdisturb...
Good
Checking dynroute...
Good
Checking endpoint...
Good
Checking extensionroutes...
Good
Checking extensionsettings...
Good
Checking fax...
Good
Checking faxpro...
Good
Checking featurecodeadmin...
Good
Checking filestore...
Good
Checking findmefollow...
Good
Checking firewall...
Good
Checking framework...
Good
Checking hotelwakeup...
Good
Checking iaxsettings...
Good
Checking infoservices...
Good
Checking ivr...
Good
Checking languages...
Good
Checking logfiles...
Good
Checking manager...
Good
Checking miscapps...
Good
Checking miscdests...
Good
Checking missedcall...
Good
Checking music...
Good
Checking oracle_connector...
Good
Checking outcnam...
Good
Checking outroutemsg...
Good
Checking paging...
Good
Checking pagingpro...
Good
Checking parking...
Good
Checking parkpro...
Good
Checking pbxmfa...
Good
Checking phpinfo...
Good
Checking pinsets...
Good
Checking pinsetspro...
Good
Checking pm2...
Good
Checking pms...
Good
Checking presencestate...
Good
Checking printextensions...
Good
Checking queueprio...
Good
Checking queues...
Good
Checking queuestats...
Good
Checking qxact_reports...
Good
Checking recording_report...
Good
Checking recordings...
Good
Checking restapps...
Good
Checking ringgroups...
Good
Checking sangomaconnect...
Good
Checking sangomacrm...
Good
Checking sangomartapi...
Good
Checking scribe...
Good
Checking setcid...
Good
Checking sipsettings...
Good
Checking sipstation...
Good
Checking sms...
Good
Checking smsplus...
Good
Checking soundlang...
Good
Checking superfecta...
Good
Checking sysadmin...
Good
Checking timeconditions...
Good
Checking tts...
Good
Checking ttsengines...
Good
Checking ucp...
Good
Checking userman...
Good
Checking vmblast...
Good
Checking vmnotify...
Good
Checking voicemail...
Good
Checking voicemail_report...
Good
Checking voipinnovations...
Good
Checking vqplus...
Good
Checking weakpasswords...
Good
Checking webcallback...
Good
Checking webrtc...
Good
Done
Updating Hooks...Done
Edge repository temporarily enabled
No repos specified, using: [standard] from last GUI settings
Module(s) requiring upgrades: cdr, cdrpro, endpoint, firewall, queues, sangomartapi
Upgrading module 'cdr' from 17.0.4.33 to 17.0.4.34
Downloading module 'cdr'
Processing cdr
Downloading...
243352/243352 [============================] 100%
Finished downloading
Extracting...Done
Download completed in 0 seconds
Removed Job and added cron
Checking if field cnum is present in cdr table..OK!
Checking if field cnam is present in cdr table..OK!
Checking if field outbound_cnum is present in cdr table..OK!
Checking if field outbound_cnam is present in cdr table..OK!
Checking if field dst_cnam is present in cdr table..OK!
Checking if field linkedid is present in cdr table..OK!
Checking if field peeraccount is present in cdr table..OK!
Checking if field sequence is present in cdr table..OK!
Generating CSS...Done
Module cdr version 17.0.4.34 successfully installed
Updating Hooks...Done
Chowning directories...Done
Upgrading module 'cdrpro' from 17.0.4.5 to 17.0.4.6
Downloading module 'cdrpro'
Processing cdrpro
Downloading...
1356526/1356526 [============================] 100%
Finished downloading
Extracting...Done
Download completed in 1 seconds
Updating tables cdrpro_report_scheduler, cdrpro_score_mes, cdrpro_processed_uniqueids, cdrpro_unprocessed_uniqueids, cdrpro_cdr, cdrpro_email_templates...Done
Cdrpro is not licensed.
Stopping CDRpro Service
Generating CSS...Done
Module cdrpro version 17.0.4.6 successfully installed
Updating Hooks...Done
Chowning directories...Done
Upgrading module 'endpoint' from 17.0.2 to 17.0.2.6
Downloading module 'endpoint'
Processing endpoint
Downloading...
94994234/94994234 [============================] 100%
Finished downloading
Extracting...Done
Download completed in 7 seconds
Create symlink...Done
Checking database tables...Done
Migrating tables as required...Done
Checking Settings and Defaults...Done
Generating Configs...Done
Downloading Firmware...Done (Background)
updating Logout phones config...(Background)Generating CSS...Done
Module endpoint version 17.0.2.6 successfully installed
Updating Hooks...Done
Chowning directories...Done
Upgrading module 'firewall' from 17.0.1.30 to 17.0.1.32
Downloading module 'firewall'
Processing firewall
Downloading...
1211484/1211484 [============================] 100%
Finished downloading
Extracting...Done
Download completed in 0 seconds
Generating CSS...Done
Module firewall version 17.0.1.32 successfully installed
Updating Hooks...Done
Chowning directories...Done
Upgrading module 'queues' from 17.0.1.13 to 17.0.2
Downloading module 'queues'
Processing queues
Downloading...
432324/432324 [============================] 100%
Finished downloading
Extracting...Done
Download completed in 0 seconds
Updating tables queues_details, queues_config...Done
Generating CSS...Done
Module queues version 17.0.2 successfully installed
Updating Hooks...Done
Chowning directories...Done
Upgrading module 'sangomartapi' from 17.0.9 to 17.0.9.1
Downloading module 'sangomartapi'
Processing sangomartapi
Downloading...
800967/800967 [============================] 100%
Finished downloading
Extracting...Done
Download completed in 1 seconds
Updating tables restapps_rtapi_conferences, sangomartapi_registry, sangomartapi_login_register, chat_push_tokens, sangomartapi_call_queue_members...Done
Installing/Updating Required Libraries. This may take a while...The following messages are ONLY FOR DEBUGGING. Ignore anything that says 'WARN' or is just a warning
Running installation..
Broadcast message from root@ORD-PBX-GigRent-003 (somewhere) (Mon Feb 3 10:49:3
Firewall service now starting.
npm WARN deprecated [email protected]: The sprintf package is deprecated in favor of sprintf-js.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: No longer maintained, please upgrade to swagger-client@3.
added 260 packages, and audited 261 packages in 16s
26 packages are looking for funding
run `npm fund` for details
8 moderate severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
Finished updating libraries!
Begin setting up Chat database...
Done setting up Chat database.
Begin setting up Queue database...
Done setting up Queue database...
Restarting Sangoma RT API Server
Stopping Sangoma RT API Server...
Stopped Sangoma RT API Server
Starting Sangoma RT API Server...
Started Sangoma RT API Server. PID is 12389
Generating CSS...Done
Module sangomartapi version 17.0.9.1 successfully installed
Updating Hooks...Done
Chowning directories...Done
All upgrades completed successfully!
Updating Hooks...Done
Chowning directories...Done
Chowning directories...Done
Chowning directories...Done
Chowning directories...Done
Chowning directories...Done
Chowning directories...Done
Resetting temporarily repository state
Taking too long? Customize the chown command, See https://sangomakb.atlassian.net/wiki/spaces/FP/pages/10289397/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done in 6 seconds
Setting specific permissions...
15249 [============================]
Finished setting permissions
Reload Started
Reload Complete
root@ORD-PBX-GigRent-003:~#
And the error…
Whoops\Exception\ErrorException thrown with message "A non-numeric value encountered"
Stacktrace:
#5 Whoops\Exception\ErrorException in /var/www/html/admin/modules/firewall/Firewall.class.php:2345
#4 Whoops\Run:handleError in /var/www/html/admin/modules/firewall/Firewall.class.php:2345
#3 FreePBX\modules\Firewall:inRange in /var/www/html/admin/modules/firewall/Firewall.class.php:2307
#2 FreePBX\modules\Firewall:isTrusted in /var/www/html/admin/modules/firewall/Firewall.class.php:797
#1 FreePBX\modules\Firewall:showLockoutWarning in /var/www/html/admin/modules/firewall/page.firewall.php:23
#0 include in /var/www/html/admin/config.php:658
fwconsole chown
Taking too long? Customize the chown command, See https://sangomakb.atlassian.net/wiki/spaces/FP/pages/10289397/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done in 5 seconds
Setting specific permissions...
15249 [============================]
Finished setting permissions
root@ORD-PBX-GigRent-003:~# fwconsole r --verbose
Reload Started
Reload Complete
root@ORD-PBX-GigRent-003:~#
If that’s the rule, you can try this (using SSH as root)
1: fwconsole m
2: Type this:
UPDATE kvstore_FreePBX_modules_Firewall
SET val = REPLACE(val, ',"all.sipis.acrobits.cz":"internal"', '')
WHERE `key` = 'networkmaps';
After that, try to access to the Firewall module in your browser.
If not, you can just go ahead and remove the firewall module and re-install it.
fwconsole ma remove firewall --force && fwconsole ma downloadinstall firewall && fwconsole reload