Hello,
On 25.1.2 dnsmasq will not start, I am seeing the following errors -:
[04-Mar-2025 10:27:33 Europe/London] PHP Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /usr/local/etc/inc/plugins.inc.d/dnsmasq.inc:234
Stack trace:
#0 /usr/local/etc/inc/plugins.inc.d/dnsmasq.inc(234): explode(',', Array)
#1 /usr/local/etc/inc/plugins.inc.d/dnsmasq.inc(199): _dnsmasq_add_host_entries()
#2 /usr/local/etc/inc/util.inc(229): dnsmasq_configure_do()
#3 /usr/local/sbin/pluginctl(261): service_control_start('dnsmasq', Array)
#4 {main}
thrown in /usr/local/etc/inc/plugins.inc.d/dnsmasq.inc on line 234
This is on my secondary unit, my primary is still on 25.1.1 and seems to be fine.
Any ideas?
Hi,
Thanks for the report! Can you run the following command and let us know the output?
# /usr/local/opnsense/mvc/script/run_migrations.php
Cheers,
Franco
root@fw-sec:~ # /usr/local/opnsense/mvc/script/run_migrations.php
Migrated OPNsense\Unbound\Unbound from 1.0.11 to 1.0.12
Migrated OPNsense\Dnsmasq\Dnsmasq from <unversioned> to 1.0.0
And the service starts now :)
Upgraded my primary and it's fine, that migration was done as part of the upgrade, no idea what happened to the secondary!
Thank for the help though, appreciated!
Maybe the primary is pushing the dnsmasq config to the backup reverting it again later? I would recommend updating the master too.
Edit: posted before your other reply
Cheers,
Franco
Quote from: franco on March 04, 2025, 12:33:31 PMMaybe the primary is pushing the dnsmasq config to the backup reverting it again later? I would recommend updating the master too.
Edit: posted before your other reply
Cheers,
Franco
Hmm, yes maybe, I updated the secondary and held off on the primary until users went out to work/school so they wouldn't complain.
Then once I noticed dnsmasq was broken on the secondary I didn't want to do the primary incase it broken on that too :)
Mental note made to do primary first in future
Same issue here, after applying 25.1.2 Dnsmasq will not start.
Dnsmasq Log shows:
FAILED to start up
dnsmasq bad command line options: Name does not resolve
running #/usr/local/opnsense/mvc/script/run_migrations.php didn't produce any output.
Can you share your config?
# pluginctl -g dnsmasq
and the error?
# opnsense-log | grep returned.exit.code
Cheers,
Franco
Quote from: franco on March 05, 2025, 06:20:56 PMCan you share your config?
# pluginctl -g dnsmasq
and the error?
# opnsense-log | grep returned.exit.code
Cheers,
Franco
Got it resolved.
The domains tab had one entry where instead of IP address, exclamation character was listed. Replaced it with IP address and Dnsmasq now starts properly.
Quote from: newber on March 05, 2025, 06:32:53 PMQuote from: franco on March 05, 2025, 06:20:56 PMCan you share your config?
# pluginctl -g dnsmasq
and the error?
# opnsense-log | grep returned.exit.code
Cheers,
Franco
Got it resolved.
The domains tab had one entry where instead of IP address, exclamation character was listed. Replaced it with IP address and Dnsmasq now starts properly.
I encountered the same error. In the previous versions, one could enter ! As a valid character, but during import on 25.1.2, dnsmasq fails to load.
However, the GUI in 25.1.2 still supports entering the character ! (Instead of leaving it blank), but does not show the ! Character after saving. It is a bit confusing...
I think the help text on dnsmasq domain GUI page could be modified to reflect this new behaviour.
Quote from: gspannu on March 05, 2025, 09:18:07 PMQuote from: newber on March 05, 2025, 06:32:53 PMQuote from: franco on March 05, 2025, 06:20:56 PMCan you share your config?
# pluginctl -g dnsmasq
and the error?
# opnsense-log | grep returned.exit.code
Cheers,
Franco
Got it resolved.
The domains tab had one entry where instead of IP address, exclamation character was listed. Replaced it with IP address and Dnsmasq now starts properly.
I encountered the same error. In the previous versions, one could enter ! As a valid character, but during import on 25.1.2, dnsmasq fails to load.
However, the GUI in 25.1.2 still supports entering the character ! (Instead of leaving it blank), but does not show the ! Character after saving. It is a bit confusing...
I think the help text on dnsmasq domain GUI page could be modified to reflect this new behaviour.
Hi. I hit this pretty crippling bug after upgrading
I concur with user gspannu. The solution for me was to edit every line of the domains tab that included the exclamation mark, and save it without any change. That removed the ! character from the domains tab and allowed dnsmasq to start
When editing, removing ! does not work bc an empty field is not allowed. Replacing ! with a blank allows saving but I did not check if dnsmasq would work in this case
The help tips are not in line with what's required of the user
Thanks to all!
Quote from: epoch on March 21, 2025, 11:40:03 AMHi. I hit this pretty crippling bug after upgrading
I concur with user gspannu. The solution for me was to edit every line of the domains tab that included the exclamation mark, and save it without any change. That removed the ! character from the domains tab and allowed dnsmasq to start
When editing, removing ! does not work bc an empty field is not allowed. Replacing ! with a blank allows saving but I did not check if dnsmasq would work in this case
The help tips are not in line with what's required of the user
Thanks to all!
You can still enter the
! character and hit Save. The issue only happens when you are upgrading to 25.x. The
! will be accepted but not shown once saved.