Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5
-
Same here after upgrading from 2.6.0 to 2.7.0. Line 5310 is about collecting dhcpd info, but my server does not have dhcp server configured..
5310: if (is_array($dhcp['staticmap'])) { foreach ($dhcp['staticmap'] as $smap) { $local_hosts[$smap['ipaddr']] = strtolower("{$smap['hostname']}"); } }
Any ideas how to fix it?
-
@octopilami I was able to fix it by adding this extra check:
if (isset($dhcp['staticmap']) && is_array($dhcp['staticmap'])) {
-
@jazzl0ver said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
@octopilami I was able to fix it by adding this extra check:
if (isset($dhcp['staticmap']) && is_array($dhcp['staticmap'])) {
Thanks!!!!!! it works and they didn't fix it yet in version pfblockerng-devel-3.2.0_6
-
@alkon_rojo said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
they didn't fix it yet in version pfblockerng-devel-3.2.0_6
You should have ad @BBcan177 to your thread so he can get informed that there is an issue!
-
@fireodo said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
@alkon_rojo said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
they didn't fix it yet in version pfblockerng-devel-3.2.0_6
You should have ad @BBcan177 to your thread so he can get informed that there is an issue!
Hi, Exist this two tickets already @BBcan177 :
https://redmine.pfsense.org/issues/14554
https://redmine.pfsense.org/issues/14230 -
@alkon_rojo said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
pfBlockerNG-devel 3.2.0_5
BTW: the actual version is 3.2.0_6
-
@fireodo said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
@alkon_rojo said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
pfBlockerNG-devel 3.2.0_5
BTW: the actual version is 3.2.0_6
Yeah, that's why I said -> The workaround is still need it in version pfblockerng-devel-3.2.0_6. I've been months without the service started, and it was because of this.
@alkon_rojo said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
@jazzl0ver said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
@octopilami I was able to fix it by adding this extra check:
if (isset($dhcp['staticmap']) && is_array($dhcp['staticmap'])) {
Thanks!!!!!! it works and they didn't fix it yet in version pfblockerng-devel-3.2.0_6
-
@alkon_rojo I can send a PR for merging, but the actual merging is up to the repository maintainers.
-
Pull request sent: https://github.com/pfsense/FreeBSD-ports/pull/1305
-
We have two 1537's set up and running pfsense+ 23.09.1 properly in HA mode. We call them pf1 and pf2 (with a carp of just "pf"). We decided it was time to explore using PFBlocker. Having never done this before, we decided to load the package (3.2.0_7) on our backup Netgate (pf2) first and see the options available. We don't have pfblocker fully configured yet, just looking around some. Since it is pf2, it is not actually being used in production (unless of course pf1 goes down).
Anyway, when we were clicking through the tabs, and we click on the Firewall> pfBlocker> Reports tab, this is what appears on the screen:
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/pfblockerng/pfblockerng.inc:5310 Stack trace: #0 /usr/local/www/pfblockerng/pfblockerng_alerts.php(1726): pfb_collect_localhosts() #1 {main} thrown in /usr/local/pkg/pfblockerng/pfblockerng.inc on line 5310 PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 5310, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/pfblockerng/pfblockerng.inc:5310 Stack trace: #0 /usr/local/www/pfblockerng/pfblockerng_alerts.php(1726): pfb_collect_localhosts() #1 {main} thrown
It also sends us a notification. Does this every time that tab is clicked on. This seems to match the same stuff on this thread. So I decided to post here as a "me too." Since we are not sure if there is some major problem that should stop us from trying to implement pfBlocker right now, or if we have some misconfiguration, or if the error can just be ignored, I opened a ticket with Netgate. Will report back any findings. UPDATE: Ooops, I don't think TAC Lite/pfSense+ comes with Email support. They will probably ignore the ticket I created :)
-
@markdavis yeah, I've been working with BBcan177 in a larger patch set for pfBlockerNG, but I'm gonna suggest this gets merged and released first.
I've been a bit short on time to complete the full patch set.
-
@andrebrait said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
@markdavis yeah, I've been working with BBcan177 in a larger patch set for pfBlockerNG, but I'm gonna suggest this gets merged and released first.
I've been a bit short on time to complete the full patch set.
Do you think it is safe for us to just ignore the issue with the "reports" tab and move forward with implementation? Kinda makes me nervous, though :)
-
@markdavis it should be. AFAICT the error is only for that tab. Well, there was another thing too, but nonetheless, it's for presentation on the screen. It doesn't affect the actual blocking or anything, IIRC.
-
@markdavis re HA be aware pfB sync doesn’t work unless you force reload on the primary.
https://forum.netgate.com/topic/179060/pfblockerng-sync-not-working/ (there’s a typo fix but it still doesn’t work) -
@andrebrait said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
@markdavis it should be. AFAICT the error is only for that tab. Well, there was another thing too, but nonetheless, it's for presentation on the screen. It doesn't affect the actual blocking or anything, IIRC.
Thanks. It is odd that nobody else reported what we are seeing with the reports tab. But it seems to be the same error as the OP, only in a different situation.
-
@SteveITS said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
@markdavis re HA be aware pfB sync doesn’t work unless you force reload on the primary.
https://forum.netgate.com/topic/179060/pfblockerng-sync-not-working/ (there’s a typo fix but it still doesn’t work)Wow, thanks.... yet more stuff to consider! I don't think I would have ever known that without you pointing that out.
-
@markdavis definitely not something for production, but if you want, you can test the pfBlockerNG-devel from this repo/branch:
https://github.com/andrebrait/FreeBSD-ports/tree/pfblockerng-adblock
In Python mode, it's also capable of parsing more types of AdBlock-style lists, including exclusions and whatnot. Should be stable, but probably needs more testing.
-
@markdavis said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
@andrebrait said in Error on pfblockerng.inc:5310 pfBlockerNG-devel 3.2.0_5:
@markdavis it should be. AFAICT the error is only for that tab. Well, there was another thing too, but nonetheless, it's for presentation on the screen. It doesn't affect the actual blocking or anything, IIRC.
Thanks. It is odd that nobody else reported what we are seeing with the reports tab. But it seems to be the same error as the OP, only in a different situation.
We have a test pfsense install and the errors don't occur on that one. So we suspect it is because we have multiple WANs and/or HA, and/or complex interface configs, dhcp running, static mappings, and/or whatnot on our production servers (dual Netgate 1537's with 10Gb LAGG, VLANs, etc).
Anyway, we installed the System_Patches package and created a patch based on other postings:
https://redmine.pfsense.org/issues/14230 and applied it and it immediately solved the problems we had with the reports tab and also getting an error every hour (when pfblocker updates).Thanks to those who helped. Looks like @andrebrait is still working on getting it into official.
-
@markdavis yes, I am. We're currently reviewing the changes that will be merged and addressing some small concerns regarding logging.
-
@andrebrait
Ive taken a look at your pull requests so this is very interesting to see the development going on in the package.
Regarding logging, not sure whats being addressed but is there a capability to have the logging rollover each day? Right now everything gets appended to a single logfile.