OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • [SOLVED] Netflow Error on Reboot
« previous next »
  • Print
Pages: [1]

Author Topic: [SOLVED] Netflow Error on Reboot  (Read 7255 times)

tillsense

  • Sr. Member
  • ****
  • Posts: 325
  • Karma: 49
    • View Profile
[SOLVED] Netflow Error on Reboot
« on: December 28, 2016, 08:08:01 pm »
hi,
on a boot/reboot, these messages are displayed.

Quote
configd.py: error generating template OPNsense/Netflow : Traceback (most recent call last): File "/usr/local/opnsense/service/modules/template.py", line 301, in generate for filename in self._generate(template_name, create_directory): File "/usr/local/opnsense/service/modules/template.py", line 236, in _generate raise Exception("%s %s %s" % (module_name, template_filename, render_exception)) Exception: OPNsense/Netflow OPNsense/Netflow/netflow.conf 'collections.OrderedDict object' has no attribute 'egress_only'

cheers till

--------------------------------------------------------------------
OPNsense 17.1.b_73-amd64
FreeBSD 11.0-RELEASE-p5
OpenSSL 1.0.2j 26 Sep 2016
« Last Edit: December 31, 2016, 04:01:36 pm by franco »
Logged

AdSchellevis

  • Administrator
  • Hero Member
  • *****
  • Posts: 907
  • Karma: 184
    • View Profile
Re: Netflow Error on Reboot
« Reply #1 on: December 30, 2016, 05:47:53 pm »
Hi till,

It looks like a bug, when no "egress_only" interfaces are provided it fails generating the template.

You should be able to fix this using the following patch https://github.com/opnsense/core/commit/5f3936ab3696f384f29bb5ee1290f4c4c4c1572a

On the command line, just run the following command to patch your version.
Code: [Select]
opnsense-patch 5f3936ab36

Best regards,

Ad
Logged

tillsense

  • Sr. Member
  • ****
  • Posts: 325
  • Karma: 49
    • View Profile
Re: Netflow Error on Reboot
« Reply #2 on: December 30, 2016, 07:01:14 pm »
Hi Ad,

that looks good! thanks

cheers till

-------------------------------------
OPNsense 17.1.b_74-amd64
FreeBSD 11.0-RELEASE-p6
OpenSSL 1.0.2j 26 Sep 2016
Logged

tillsense

  • Sr. Member
  • ****
  • Posts: 325
  • Karma: 49
    • View Profile
Re: [SOLVED] Netflow Error on Reboot
« Reply #3 on: January 02, 2017, 07:45:19 pm »
Hi Ad,

the file (command)

Code: [Select]
/usr/local/bin/python2.7
/usr/local/opnsense/scripts/netflow/flowd_aggregate.py

caused since the changes quite high cpu last (eg 46.39% idle client usage)

cheers till

-------------------------------------
OPNsense 17.1.b_82-amd64
FreeBSD 11.0-RELEASE-p6
OpenSSL 1.0.2j 26 Sep 2016
« Last Edit: January 02, 2017, 07:51:03 pm by tillsense »
Logged

AdSchellevis

  • Administrator
  • Hero Member
  • *****
  • Posts: 907
  • Karma: 184
    • View Profile
Re: [SOLVED] Netflow Error on Reboot
« Reply #4 on: January 02, 2017, 07:55:03 pm »
Hi till,

Then it probably is catching up after some time of not being active.
You can always remove the unprocessed entries by removing all of /var/log/flowd.log* and restart both flowd and the aggregator.

If netflow is active and the aggregator isn't running, it will parse the missed items when starting again, which can be quite heavy (and usually gets back to normal load when done).

Best regards,

Ad
Logged

tillsense

  • Sr. Member
  • ****
  • Posts: 325
  • Karma: 49
    • View Profile
Re: [SOLVED] Netflow Error on Reboot
« Reply #5 on: January 03, 2017, 06:33:54 pm »
Hi Ad,

that was the problem (/var/log/flowd.log*). Thanks for the quick help!

cheers till

-------------------------------------
OPNsense 17.1.b_86-amd64
FreeBSD 11.0-RELEASE-p6
OpenSSL 1.0.2j 26 Sep 2016
Logged

tillsense

  • Sr. Member
  • ****
  • Posts: 325
  • Karma: 49
    • View Profile
Re: [SOLVED] Netflow Error on Reboot
« Reply #6 on: January 10, 2017, 08:46:09 pm »
Hi Ad,

i can confirm this https://forum.opnsense.org/index.php?topic=4235.0 under 17.1 there must still be a problem.
(cpu last is also there again)

cheers till


-------------------------------------------
OPNsense 17.1.b_105-amd64
FreeBSD 11.0-RELEASE-p6
OpenSSL 1.0.2j 26 Sep 2016
Logged

AdSchellevis

  • Administrator
  • Hero Member
  • *****
  • Posts: 907
  • Karma: 184
    • View Profile
Re: [SOLVED] Netflow Error on Reboot
« Reply #7 on: January 11, 2017, 08:43:10 am »
Hi till,

If the aggregator is running and there is traffic in the flow log there probably isn't really an issue.... netflow aggregation is a pretty consuming job, if the aggregation daemons dies, you could try to run in it a console and check its output.

Regards,

Ad
Logged

tillsense

  • Sr. Member
  • ****
  • Posts: 325
  • Karma: 49
    • View Profile
Re: [SOLVED] Netflow Error on Reboot
« Reply #8 on: January 21, 2017, 08:17:48 pm »
Ok, back to Python 2.7.12: (https://forum.opnsense.org/index.php?topic=4295.0) (e.g. 16.7.13: https://forum.opnsense.org/index.php?topic=4235.0)

Code: [Select]
pkg add -f https://pkg.opnsense.org/FreeBSD:11:amd64/17.1/MINT/17.1.b/OpenSSL/All/python27-2.7.12.txzseems to be the first solution.

cheers till

-------------------------------------------
OPNsense 17.1.r-amd64
FreeBSD 11.0-RELEASE-p7
OpenSSL 1.0.2j 26 Sep 2016
Logged

tillsense

  • Sr. Member
  • ****
  • Posts: 325
  • Karma: 49
    • View Profile
Re: [SOLVED] Netflow Error on Reboot
« Reply #9 on: February 22, 2017, 07:51:07 pm »
Hi,

wow. the first reboot with 17.1.2 on dev apu (1d) shows no more cpu consuming job for aggregate. realtek driver?

cheers till
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17703
  • Karma: 1616
    • View Profile
Re: [SOLVED] Netflow Error on Reboot
« Reply #10 on: February 22, 2017, 08:13:35 pm »
Hi Till,

Likely candidate, yet still hard to believe. In any case, happy about the development here.


Cheers,
Franco
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • [SOLVED] Netflow Error on Reboot
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2