OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: JohnnyBeee on September 16, 2024, 04:46:36 PM

Title: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: JohnnyBeee on September 16, 2024, 04:46:36 PM
OPNsense 24.7.4_1-amd64
FreeBSD 14.1-RELEASE-p4
OpenSSL 3.0.15
os-dnscrypt-proxy (misconfigured)   1.15_1

Problem:
Since some time after one of the upgrades from 24.1 to 24.7 (not sure at what pont exactly) the DNSCrypt-Proxy logs no longer show. The GUI just shows "Loading..."

> Logs are created and properly updated in /var/log/dnscrypt-proxy
but no longer show in the Opnsense GUI (Services, dnscrypt-proxy, Log/General, Log/Queries or Log/NX).

>>> System, Firmware, Log File also no longer shows any log entries !!!!
> System, Log Files, xxx shows logs as expected.

I'd be grateful for any suggestion helping me to solve this and see the logs again.
Title: Re: DNSCrypt-crypt logs no longer show after upgrade to 24.7
Post by: JohnnyBeee on September 18, 2024, 06:19:16 AM
Serious? Nobody has even the slightest idea?
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: Comma0280 on September 21, 2024, 10:20:04 AM
I just tried to setup dnscrypt-proxy and have exactly the same issue. I can view logs via CLI but in GUI it only shows Loading...
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: _tribal_ on September 21, 2024, 11:39:38 AM
Same issue :-\
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: JohnnyBeee on September 21, 2024, 02:10:11 PM
Thanks @Comma0280 and @_tribal_

Do you also experience the issue with the firmware log? (System, Firmware, Log File)
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: Comma0280 on September 21, 2024, 05:21:30 PM
I don't have any problems with general log files, just with the ones related to dnscrypt-proxy.

Looking at System -> Log Files -> Backend following log seems to be related:

[e60e2445-7fc5-4ad2-9283-7b48a4d2025f] Script action failed with Command '/usr/local/opnsense/scripts/syslog/queryLog.py --limit '20' --offset '0' --filter '' --module 'dnscryptproxy' --filename 'query' --severity 'Emergency,Alert,Critical,Error,Warning,Notice,Informational' --valid_from '1726845155.562'' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/actions/script_output.py", line 76, 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/syslog/queryLog.py --limit '20' --offset '0' --filter '' --module 'dnscryptproxy' --filename 'query' --severity 'Emergency,Alert,Critical,Error,Warning,Notice,Informational' --valid_from '1726845155.562'' returned non-zero exit status 1.
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: JohnnyBeee on September 21, 2024, 05:38:15 PM
Interesting. I don't have problems with general logs either, just with System, Firmware, Log File
And I get a very similar entry in System -> Log Files -> Backend  for this:

[160262b2-cb25-4ff4-8b55-ccc16ab6c450] Script action failed with Command '/usr/local/opnsense/scripts/syslog/queryLog.py --limit '20' --offset '0' --filter '' --module 'core' --filename 'pkg' --severity 'Emergency,Alert,Critical,Error,Warning' --valid_from '1726846215.194'' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/actions/script_output.py", line 76, 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/syslog/queryLog.py --limit '20' --offset '0' --filter '' --module 'core' --filename 'pkg' --severity 'Emergency,Alert,Critical,Error,Warning' --valid_from '1726846215.194'' returned non-zero exit status 1.

I have no idea what to make of this though  :(
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: Comma0280 on September 21, 2024, 05:51:35 PM
I just checked System -> Firmware -> Log File and this one works fine for me.

Comparing our logs it seems like they're related.
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: JohnnyBeee on September 21, 2024, 06:53:30 PM
In /var/log I found a symlink file that points to the wrong folder (/usr/log/dnscryptproxy/dns-proxy, instead of /usr/log/dns-proxy - see attachment.

I coudn't find a way to delete/recreate/modify this symlink.

Any ideas about this?
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: JohnnyBeee on September 21, 2024, 10:12:40 PM
I have managed to change the symlink named dnscryptproxy to have it point to /usr/log/dnscrypt-proxy and then the error in the backend log is gone but the log GUI says "nothing listed".
When I restart dnscrypt-proxy the symlink is replaced and points to /usr/log/dnscryptproxy/dns-proxy again - and I am back to square one  :-[
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: gstyle on September 22, 2024, 12:55:24 AM
I just installed the DNSCrypt plugin and I have the same problem with the logs
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: JohnnyBeee on September 23, 2024, 10:20:32 PM
Ok, so this issue arises when people install dnscrypt-proxy from scratch and there is no solution?
How does one submit this bug to the developer?
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: Comma0280 on September 24, 2024, 08:23:59 PM
I found a similar topic on this forum and solution was to change time range from "Last day" to "No limit" and indeed it works for me, logs are showing.
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: _tribal_ on September 24, 2024, 09:47:38 PM
it's not a solution, it's a trick. According to the log it does not separate date, time, event fields -  all text is a single line.
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: franco on September 24, 2024, 09:52:40 PM
There was a recent submission which probably fits here...

https://github.com/opnsense/core/commit/2a1ccae9

# opnsense-patch 2a1ccae9


Cheers,
Franco
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: Mr.Goodcat on September 25, 2024, 08:58:28 AM
Quote from: franco on September 24, 2024, 09:52:40 PM
There was a recent submission which probably fits here...

https://github.com/opnsense/core/commit/2a1ccae9

# opnsense-patch 2a1ccae9


Cheers,
Franco

This solves the issue for me, thanks!  :)
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: JohnnyBeee on September 25, 2024, 11:39:40 PM
Quote from: franco on September 24, 2024, 09:52:40 PM
There was a recent submission which probably fits here...

https://github.com/opnsense/core/commit/2a1ccae9

# opnsense-patch 2a1ccae9


Cheers,
Franco

Thanks.
I don't understand what the solution is though  :-[
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: Patrick M. Hausen on September 25, 2024, 11:53:01 PM
Quote from: JohnnyBeee on September 25, 2024, 11:39:40 PM
I don't understand what the solution is though  :-[

You are supposed to enter this command into a shell logged in as root:
opnsense-patch 2a1ccae9
Title: Re: DNSCrypt-Proxy logs no longer show after upgrade to 24.7
Post by: JohnnyBeee on September 26, 2024, 12:12:31 AM
Ok, thanks.

That seems to have solved it   :D

Thanks everyone for your help.