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

#1
If you install the os-smart plugin you can go and find the Info for each drive using the smartctl command via the GUI. It will give you data like this:

smartctl 7.4 2023-08-01 r5530 [FreeBSD 14.2-RELEASE-p2 amd64] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Crucial/Micron Client SSDs
Device Model:     CT480BX500SSD1
Serial Number:    2415E8A612C5
LU WWN Device Id: 5 00a075 1e8a612c5
Firmware Version: M6CR072
User Capacity:    480,103,981,056 bytes [480 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available
Device is:        In smartctl database 7.3/5528
ATA Version is:   ACS-3 T13/2161-D revision 4
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Apr  7 12:16:30 2025 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
#2
Is there a chance we could get an interim patch to fix the broken browsers? I am more than willing to collect data needed as I can reproduce this.
#3
So I just tried to clone, edit, save an existing firewall rule and I've done this hundreds of times before 25.1 upgrade but in Chrome I couldn't hit the save button. Nothing happened so I tried MSEdge, same process nothing happened. I tried creating a new rule in both browsers and had no luck even with new rule creation but then I floated over to Firefox and it worked as expected. All three browsers are running the latest and greatest versions in Windows. Is this a bug or something else?
#4
I've noticed today, after upgrading from 24.7.5 to 24.7.6, that NUT on startup is complaining that the UPS is unavailable.

I confirmed the service was running and then from the web UI went to NUT and observed the client was running there according to the settings but it wasn't until I hit the "Apply" button did it start to fully work. I use an SNMP configuration and it seems that during upgrade the ups.conf isn't properly written or something of that nature until I go in an re-apply the settings. They seem to be there from the previous upgrade configuration but I just need to rebuild the ups.conf it seems via the Apply process.

I am more than happy to provide any insight for troubleshooting.

Thanks!
#5
My bare metal didn't reboot either after update and I have crowds installed.

I also saw a few segfaults from a few daemons on boot up:


pid 32801 (squid), jid 0, uid 100: exited on signal 11 (no core dump - bad address)
pid 28907 (ntpd), jid 0, uid 0: exited on signal 11 (no core dump - bad address)
pid 29870 (ntpd), jid 0, uid 0: exited on signal 11 (no core dump - bad address)
#6
Still seeing this issue, I also as a tested reset my RRD data via the webUI and it still is happening.
#7
24.7, 24.10 Legacy Series / Re: Backup API
July 27, 2024, 11:11:50 PM
So the instructions need to include restarting the webGUI AFTER applying the patch. After doing that I am able to backup now.
#8
24.7, 24.10 Legacy Series / Re: Backup API
July 27, 2024, 11:09:27 PM
Quote from: franco on July 27, 2024, 10:13:16 AM
Thanks, will be hotfixed on Monday.


Cheers,
Franco

I have this same issue and using the same patch but still get the errors in the UI:


[26-Jul-2024 14:27:41 America/New_York] ArgumentCountError: Too few arguments to function OPNsense\Mvc\Response::setContentType(), 1 passed in /usr/local/opnsense/mvc/app/controllers/OPNsense/Core/Api/BackupController.php on line 200 and exactly 2 expected in /usr/local/opnsense/mvc/app/library/OPNsense/Mvc/Response.php:64
Stack trace:
#0 /usr/local/opnsense/mvc/app/controllers/OPNsense/Core/Api/BackupController.php(200): OPNsense\Mvc\Response->setContentType('application/oct...')
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Mvc/Dispatcher.php(165): OPNsense\Core\Api\BackupController->downloadAction('this')
#2 /usr/local/opnsense/mvc/app/library/OPNsense/Mvc/Router.php(156): OPNsense\Mvc\Dispatcher->dispatch(Object(OPNsense\Mvc\Request), Object(OPNsense\Mvc\Response), Object(OPNsense\Mvc\Session))
#3 /usr/local/opnsense/mvc/app/library/OPNsense/Mvc/Router.php(139): OPNsense\Mvc\Router->performRequest(Object(OPNsense\Mvc\Dispatcher))
#4 /usr/local/opnsense/www/api.php(36): OPNsense\Mvc\Router->routeRequest('/api/core/backu...', Array)
#5 {main}


Do I need to restart anything?

My script:


#!/bin/bash

# Since we need curl let's see if it is installed
if cmd=$(command -v curl); then
        CURL=$cmd
else
        echo "$(date "+[%Y-%m-%d - %H:%M:%S%p]"): ERROR: Required binary curl is missing, please install it" > $LOG 2>&1
        exit 1
fi

# Slack notification function
notify () {
        message=$1
        curl -s https://api.pushover.net/1/messages.json -d "token=${apitoken}&user=${userkey}&title=OPNSense%20Backup&message=${message}&timestamp=${ts}&device=${device}"
        echo "$message" | mailx -r opnsense-backup@domain.com -s "OPNsense Backup" user@domain.com
}

# Variables
PINGHOST=192.168.xx.1
HOST=$PINGHOST
PFPATH=/mnt/scripts/opnsense
ts=$(date +%s)

# api access
# Backup user
key="redacted"
secret="redacted"

# pushover settings
userkey="redacted"
apitoken="redacted"
device="redacted"

# Check to make sure firewall is up
ping -c 1 -W 5 $PINGHOST &>/dev/null
if [ $? -ne 0 ] ; then
   echo "$PINGHOST is down! bailing"
   notify "$PINGHOST is down! Check to make sure firewall is online"
   exit
fi

# Clean up old files
find $PFPATH -name "*.xml" -mtime +7 -exec rm -rf {} \;

# Download the config
# Pre 23.7.8, this is now native in the API
#/usr/bin/curl -k -u "$key":"$secret" https://$HOST/api/backup/backup/download -o $PFPATH/$(/bin/date +%Y%m%d).xml
/usr/bin/curl -k -u "$key":"$secret" https://$HOST/api/core/backup/download/this -o $PFPATH/$(/bin/date +%Y%m%d).xml

# Check if the configuration is the right size...
XML_CHECK=$(grep -c "?xml" $PFPATH/`date +%Y%m%d`.xml)
SIZE=$(stat -c %s $PFPATH/`date +%Y%m%d`.xml)


# File must be zero size...
if [ $SIZE -eq 0 ]; then
        notify "Configuration download was ZERO bytes, check the backup process!"
        exit
fi
if [ $XML_CHECK -eq 0 ]; then
        notify "Configuration download did not meet expected XML format, check the backup process!"
        exit
fi
notify "Backup of Firewall completed on $(date)"


I run my script from a Debian 12 host and it worked just fine in 24.1 for every release.
#9
So I was doing some other poking around and see what is new in 24.7 and noticed that in the reporting health dashboard there are odd gaps of data even though the firewall was online and running without issues. I checked various sections (e.g., Packets, Traffic, System, etc.) and it is all there. I upgraded my firewall last night starting around 18:44 and you can clearly see in the attachments the data and displaying of that data was rock solid and after the upgrade there are around 30 minutes of data missing every other 30 minutes.

Let me know if any additional information is needed but I thought it was report worthy.

#10
Quote from: jazix on July 26, 2024, 03:12:55 PM
Changing line 200 in /usr/local/opnsense/mvc/app/controllers/OPNsense/Core/Api/BackupController.php to this fixes the issue:

$this->response->setContentType('application/octet-stream', 'UTF-8');

Or just pulling that Git commit haha.

I did but it doesn't touch that file. Also this suggested change doesn't fix the error code I am reporting, I modified the file by hand for line 200 and still doesn't resolve it and throws the same issue. I wonder if my CURL for the backup call needs to be updated to 24.7 so asking that question again.


root@firewall:~ # opnsense-patch 897d3cce
Found local copy of 897d3cce, skipping fetch.
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|From 897d3cce3a0b5117450ff6c36db0635cf2e19591 Mon Sep 17 00:00:00 2001
|From: Ad Schellevis <ad@opnsense.org>
|Date: Fri, 26 Jul 2024 10:22:24 +0200
|Subject: [PATCH] MVC: Response->setContentType() default to empty,  closes
| https://github.com/opnsense/core/pull/7655
|
|---
| src/opnsense/mvc/app/library/OPNsense/Mvc/Response.php | 2 +-
| 1 file changed, 1 insertion(+), 1 deletion(-)
|
|diff --git a/src/opnsense/mvc/app/library/OPNsense/Mvc/Response.php b/src/opnsense/mvc/app/library/OPNsense/Mvc/Response.php
|index 4efd7b6069..b003b25b54 100644
|--- a/src/opnsense/mvc/app/library/OPNsense/Mvc/Response.php
|+++ b/src/opnsense/mvc/app/library/OPNsense/Mvc/Response.php
--------------------------
Patching file opnsense/mvc/app/library/OPNsense/Mvc/Response.php using Plan A...
Reversed (or previously applied) patch detected!  Assuming -R.Hunk #1 succeeded at 61.
done
All patches have been applied successfully.  Have a nice day.
root@firewall:~ #
#11
Quote from: franco on July 26, 2024, 01:38:58 PM
Maybe applied twice? Worth checking the error log as it mentions... :)

This is the error reported by the CRASH reporter, there are no other errors in any other logs.


[26-Jul-2024 05:02:45 America/New_York] ArgumentCountError: Too few arguments to function OPNsense\Mvc\Response::setContentType(), 1 passed in /usr/local/opnsense/mvc/app/controllers/OPNsense/Core/Api/BackupController.php on line 200 and exactly 2 expected in /usr/local/opnsense/mvc/app/library/OPNsense/Mvc/Response.php:64
Stack trace:
#0 /usr/local/opnsense/mvc/app/controllers/OPNsense/Core/Api/BackupController.php(200): OPNsense\Mvc\Response->setContentType('application/oct...')
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Mvc/Dispatcher.php(165): OPNsense\Core\Api\BackupController->downloadAction('this')
#2 /usr/local/opnsense/mvc/app/library/OPNsense/Mvc/Router.php(156): OPNsense\Mvc\Dispatcher->dispatch(Object(OPNsense\Mvc\Request), Object(OPNsense\Mvc\Response), Object(OPNsense\Mvc\Session))
#3 /usr/local/opnsense/mvc/app/library/OPNsense/Mvc/Router.php(139): OPNsense\Mvc\Router->performRequest(Object(OPNsense\Mvc\Dispatcher))
#4 /usr/local/opnsense/www/api.php(36): OPNsense\Mvc\Router->routeRequest('/api/core/backu...', Array)
#5 {main}
#12
Quote from: franco on July 26, 2024, 11:47:13 AM
Likely https://github.com/opnsense/core/commit/897d3cce

# opnsense-patch 897d3cce


Cheers,
Franco

Same error after applying the patch. Do I need to restart any services for it to take affect?
#13
I use the backup api to pull a configuration file down and store it elsewhere as a precaution but this stopped working after the upgrade. Here is the command I am using to pull the backup config via API:


/usr/bin/curl -k -u "$key":"$secret" https://$HOST/api/core/backup/download/this -o $PFPATH/$(/bin/date +%Y%m%d).xml


I am getting an error back now:


{"errorMessage":"Unexpected error, check log for details"}


I can't find anything in any log on the OS level showing anything strange.

Thanks!
#14
I don't use any Aliases in the NAT section with IPs but do with ports. It seems this is working as expected after upgrading.

I do use IPs in aliases on rules and those are fine for me.

Just different points of data.
#15
Had the same issue...

I saw running NTP processes listening on the selected interfaces but looks like on initial boot maybe the service checker didn't align?

I was able to force kill the PIDS from the command line and restart NTP from the web UI and its reflected properly now.