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 - beneix

#31
Development and Code Review / Re: APC UPS new plugin
August 09, 2024, 12:35:19 PM
Quote from: Monviech on August 09, 2024, 12:13:22 PM
For the blank widget to vanish you have to press "Restore default layout", since the name of the widget has been saved inside the config.xml of the firewall.
That worked, thanks. All good now.
#32
Development and Code Review / Re: APC UPS new plugin
August 09, 2024, 11:57:40 AM
Quote from: franco on August 09, 2024, 10:46:26 AM
Remove both widgets from dashboard and save. Remove manual files created from disk. Add widget. Done.


Cheers,
Franco

Thanks, but
QuoteThe blank widget can be resized and moved but it does not show the normal delete button so I can't get rid of it.
...so how can I remove it? I tried deleting the relevant files from /usr/local/opnsense/www/js/widgets and /usr/local/opnsense/www/js/widgets/Metadata, but that does not get rid of the blank widget and also means that the Apcupsd widget is not an option in the drop-down list for "Add Widget".
#33
Development and Code Review / Re: APC UPS new plugin
August 09, 2024, 10:45:13 AM
I just updated to 24.7.1. Now I have a blank widget where my APC widget used to be. I can then use GUI to add the APCUPSd widget, which shows successfully next to the blank widget, but when I click "Save" the button just shows a spinning wheel and upon refresh I'm back to the single blank widget. The blank widget can be resized and moved but it does not show the normal delete button so I can't get rid of it.

Any suggestions?
#34
Development and Code Review / Re: APC UPS new plugin
August 07, 2024, 06:22:51 PM
Quote from: mickgotwings on August 07, 2024, 05:39:10 PM
The culprit was this line in my case:

rows.push([this.translations['t_int_temp'], this.data['status']['ITEMP']['value']]);

Apcupsd status page does not report the ITEMP metric, which leads to js error.
I've simply commented the line out and now the widget works perfectly fine!
Thanks! I had two values that were not in my apcupsd list, so I removed the corresponding lines. Since I also wanted to add the remaining battery percentage, I added a line both to the Apcupsd.js and Apcupsd.xml with that, now it all works!

Quote
You can try to determine the culprit in your case by opening dev console
Basic question: can I look at the dev console via SSH, or do I need to use the serial console?

I just went to the Services > Apcupsd > Status page and looked there at what values were available and determined that way which the culprits were.
#35
24.1, 24.4 Legacy Series / Re: Upgraders beware
August 07, 2024, 05:21:08 PM
Quote from: Patrick M. Hausen on February 14, 2024, 06:01:49 PM
Not to my knowledge. At least basic Internet access should work so you can update to 23.7-latest first.

BTW: I run APU4D4 with ZFS and OPNsense - the performance and memory of the device itself is definitely sufficient.
I just wanted to say thanks to Patrick – I took the plunge, reinstalled my APU2E4 with ZFS and 24.7, and not only did I get everything to work (including the rollback availability) but the system boots up noticeably faster as well. Great stuff! 👏👏🙏
#36
I have been running migumail's AdGuardHome plugin for a couple of years on OPNSense, without any issues. Then around the time of updates from 23.7.10_1 to the next version, I suddenly started having a strange issue. For most attempts to access a site, the first attempt fails (screenshot attached). When you refresh the web page, or when a device (such as one of my Squeezebox players) attempts a second time to access a stream, then it works.

Subsequent accesses in the same session (or on the same day, I haven't quite figured out the pattern) all work as expected.

The issue does not happen for all web sites; I have not yet figured out what determines when it works and when it does not.

The thing is, when I get one of these failures, if I then check the AdGuardHome query log, it shows neither a blocked nor a processed query request, so it is as if that first (and failed) request never reached AdGuardHome. The subsequent (successful) requests do show in the AdGUardHome query log.

This is why I am posting a question here rather than in the AdGuardHome forums – I do not think the problem lies with AdGuardHome, instead I suspect there must be some setting in OPNSense that is wrong (and probably changed with one of the upgrades). What can I do to investigate the issue?
#37
Development and Code Review / Re: APC UPS new plugin
August 07, 2024, 04:25:26 PM
Great work on creating a new widget! I followed the instructions but I get "Failed to load widget" showing in the widget frame. I tried refreshing, removing and re-adding, logging out and in, and rebooting, none of which fixed the issue.

Interestingly, during the reboot process, the dashboard was initially showing (before the APC UPS Daemon had started) "Unable to connect", so at that point the widget was working. Then, after reboot was complete and all the services had started, the widget is back to "Failed to load widget".
#38
24.1, 24.4 Legacy Series / Re: Periodic Speedtest
July 28, 2024, 12:53:59 PM
My nightly cron job also stopped working. I did not have a duplicate header in speedtest.csv but decided to try @zz00mm's approach, so I deleted speedtest.csv and ran "python3 opn_speedtest.py". This did not perform a speedtest, but did create a new speedtest.csv with only a header in. It also gave the following errors:

Traceback (most recent call last):
  File "/usr/local/opnsense/scripts/OPNsense/speedtest/opn_speedtest.py", line 183, in <module>
    result = json.loads(subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True).stdout.decode('utf-8'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


Any suggestions what these errors mean?
#39
In my log file System > Log files > Backend, I have thousands of entries like this:

Date SeverityProcess Line
2024-07-17T10:48:10 Error api no active session, user not found
2024-07-17T10:48:10 Error api no active session, user not found
2024-07-17T10:48:08 Error api no active session, user not found
2024-07-17T10:48:07 Error api no active session, user not found
2024-07-17T10:48:06 Error api no active session, user not found
2024-07-17T10:48:05 Error api no active session, user not found
2024-07-17T10:48:05 Error api no active session, user not found
2024-07-17T10:48:03 Error api no active session, user not found
2024-07-17T10:48:02 Error api no active session, user not found
2024-07-17T10:48:01 Error api no active session, user not found


Should I be concerned about this? Any way to diagnose and track down the cause?
#40
Development and Code Review / Re: APC UPS new plugin
April 12, 2024, 06:21:29 PM
Just installed an RJ45 --> USB cable between my APC CS 500 and my OPNSense. What am I supposed to choose in the settings for (current choice):

UPS cable type (Smart)
UPS type (apcsmart)

#41
We had a power cut. My APC UPS decided that this was the time to start beeping continuously, probably due to an old battery that needs to be replaced. After I reconnected power, my APU2E4 with OPNSense would not start properly. I connected via serial console and saw the following in the eternal boot loop :

>>> Invoking backup script 'netflow'
panic: ufs_dirbad: /: bad dir ino 6250145 at offset 512: mangled entry


I rebooted into single user mode and ran the following:

root@:/ # fsdb /dev/gpt/rootfs
** /dev/gpt/rootfs
Editing file system `/dev/gpt/rootfs'
Last Mounted on /mnt
current inode: directory
I=2 MODE=40755 SIZE=1024
        BTIME=Mar 22 08:21:31 2022 [0 nsec]
        MTIME=Mar 31 14:59:14 2024 [717610000 nsec]
        CTIME=Mar 31 14:59:14 2024 [717610000 nsec]
        ATIME=Dec 18 20:12:01 2023 [0 nsec]
OWNER=root GRP=wheel LINKCNT=22 FLAGS=0 BLKCNT=8 GEN=3eb55a60
fsdb (inum: 2)> inode 6250145
current inode: directory
I=6250145 MODE=40750 SIZE=1024
        BTIME=Nov 26 19:06:09 2022 [668628000 nsec]
        MTIME=Mar 31 12:25:14 2024 [721933000 nsec]
        CTIME=Mar 31 12:25:14 2024 [721933000 nsec]
        ATIME=Mar 31 12:25:10 2024 [0 nsec]
OWNER=root GRP=wheel LINKCNT=2 FLAGS=0 BLKCNT=8 GEN=2e8cf21a
fsdb (inum: 6250145)> clri 6250145
fsdb (inum: 6250145)> quit

***** FILE SYSTEM STILL DIRTY *****
*** FILE SYSTEM MARKED DIRTY
*** BE SURE TO RUN FSCK TO CLEAN UP ANY DAMAGE
*** IF IT IS MOUNTED, RE-MOUNT WITH -u -o reload
root@:/ # fsck -y -t ufs /dev/gpt/rootfs
** /dev/gpt/rootfs
** SU+J Recovering /dev/gpt/rootfs

USE JOURNAL? yes

** Reading 33554432 byte journal from inode 4.

RECOVER? yes

** Building recovery table.
** Resolving unreferenced inode list.
** Processing journal entries.

WRITE CHANGES? yes


***** FILE SYSTEM IS CLEAN *****
** 197 journal records in 22016 bytes for 28.63% utilization
** Freed 10 inodes (0 dirs) 9 blocks, and 11 frags.

***** FILE SYSTEM MARKED CLEAN *****
root@:/ # exit


Now the system is up and running, but I assume I still need to fix the following issue that was showing in the boot read-out on the console:

>>> Invoking backup script 'netflow'
./var/netflow/: Can't create 'var/netflow': No such file or directory
./var/netflow/metadata.sqlite: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/src_addr_details_086400.sqlite: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/src_addr_000300.sqlite: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/src_addr_003600.sqlite: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/src_addr_086400.sqlite: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/dst_port_000300.sqlite: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/dst_port_003600.sqlite: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/dst_port_086400.sqlite: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/interface_000030.sqlite: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/interface_000300.sqlite: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/interface_003600.sqlite: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/interface_086400.sqlite: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/src_addr_details_086400.sqlite-journal: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/src_addr_000300.sqlite-journal: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/src_addr_003600.sqlite-journal: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/src_addr_086400.sqlite-journal: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/dst_port_000300.sqlite-journal: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/dst_port_003600.sqlite-journal: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/dst_port_086400.sqlite-journal: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/interface_000030.sqlite-journal: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/interface_000300.sqlite-journal: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/interface_003600.sqlite-journal: Failed to create dir 'var/netflow': No such file or directory
./var/netflow/interface_086400.sqlite-journal: Failed to create dir 'var/netflow': No such file or directory
tar: Error exit delayed from previous errors.


What would be the best way to deal with this?
#42
General Discussion / Re: Install PiHole on Opnsense
February 25, 2024, 09:16:13 AM
Before I got myself an OPNSense router, I ran piHole on an RPi. When I switched to OPNSense, I went for AdGuardHome running on the same APU as OPNSense and I am very happy with the result, performance, blocking and GUI. I recommend trying it out.
#43
24.1, 24.4 Legacy Series / Re: Upgraders beware
February 16, 2024, 01:44:19 PM
I think what would be useful would be to have a "Report 24.1 upgrade issues here" thread. This would not be for just venting, it should specifically contain issues encountered as a result of the nominated upgrade – and offer a place for support with such issues.

Perhaps the naming "Upgraders beware" in itself is slightly charged, leading to venting...
#44
24.1, 24.4 Legacy Series / Re: Upgraders beware
February 14, 2024, 06:41:37 PM
OK, I will try when I get a moment. On the APU, how does one choose a boot environment after creating multiple ones using bectl? Is that done via the serial console?
#45
24.1, 24.4 Legacy Series / Re: Upgraders beware
February 14, 2024, 05:56:04 PM
Quote from: Patrick M. Hausen on February 14, 2024, 05:49:30 PM
You can always perform a fresh install and import a saved configuration.
Thanks Patrick, I found your guide on ZFS and roll-back. Just one question: I am on 23.7.10_1. The only install I can download on 23.7 is...23.7. Will importing a configuration backed up from 23.7.10_1 to a 23.7 install cause issues?