Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - r.vandijk

#1
Hi Franco,

I just updated and so far it seems to be working!
Thanks a lot, I appreciate it!
#2
Hi Franco,

Thank you very much!
If you need anything, let me know.
#3
Hi,

I have 1 managed machine that can't display the metrics on the Status > Resources tab of OPNCentral.
The backend log on the affected machine creates the following log:
Script action failed with Command '/usr/local/opnsense/scripts/OPNcentral/collect_metrics ''' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/actions/script_output.py", line 78, in execute subprocess.check_call(script_command, env=self.config_environment, shell=True, File "/usr/local/lib/python3.11/subprocess.py", line 413, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/usr/local/opnsense/scripts/OPNcentral/collect_metrics ''' returned non-zero exit status 1.

When manually running the /usr/local/opnsense/scripts/OPNcentral/collect_metrics script on the affected machine gives the following output:
Traceback (most recent call last):
  File "/usr/local/opnsense/scripts/OPNcentral/collect_metrics", line 24, in <module>
    print(ujson.dumps(metric_collector(2)))
                      ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/opnsense/scripts/OPNcentral/metrics/__init__.py", line 70, in metric_collector
    getattr(collector, action)()
  File "/usr/local/opnsense/scripts/OPNcentral/metrics/firewall.py", line 68, in pre
    self.pftop('pre')
  File "/usr/local/opnsense/scripts/OPNcentral/metrics/firewall.py", line 52, in pftop
    port = min([int(x.split('[')[-1].split(':')[-1].replace(']', '')) for x in addrs])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/opnsense/scripts/OPNcentral/metrics/firewall.py", line 52, in <listcomp>
    port = min([int(x.split('[')[-1].split(':')[-1].replace(']', '')) for x in addrs])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '4161)'


It seems that it returns a ")" somewhere, but I can't figure out what's wrong.
Running the script multiple times gives a different number but always with the ")" at the end.

I have taken the following steps in trying to solve the issue:
1. Run the Health, Security and Upgrade audits -> No issues found and not fixed
2. Rebooting the firewall -> For some reason the metrics were shown for a short while, but after a couple of minutes it stopped working again


Can someone help me troubleshooting this issue further?

Thanks in advance!
#4
More information:
https://forum.opnsense.org/index.php?topic=46798.0
A possible fix is on the way as far as I can see.
#6
Hi,

Thanks for replying.
The firewall itself is the only device managed by OPNcentral. No other firewalls are involved.
#7
Hi all,

I just updated our OPNsense firewall to the new 25.4 business edition.
The firewall hung during the update, I had to pull the plug to restart it. The update continued and finished successfull.

I have installed OPNCentral on the 24.10 release and it was working as expected. We only have the local firewall as managed host.
After the update, I only see "No results found or missing access rights.".
Services and Resources are also empty.
When I remove the "Admins" group from the Host Group I can see the managed host again.
Creating a new group under System > Access > Groups, adding my user that I login with to that group, and adding that group to the OPNCentral Host Group has the same effect, I can't see the managed host anymore. The same after logging out and back in.
Rebooting the OPNsense again also doesn't solve this issue.

Anyone else sees this behaviour?