OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: senseuser on January 29, 2022, 09:32:31 AM

Title: Missing logs in web proxy (SOLVED)
Post by: senseuser on January 29, 2022, 09:32:31 AM
In version 22.1, for some reason, all the logs disappeared. This sign with the inscription "loading" constantly hangs. In version 21.7.7 everything was fine. Something broke? :)
(https://i.ibb.co/VTjSmn3/22.png) (https://ibb.co/VTjSmn3)
Title: Re: Missing logs in web proxy
Post by: senseuser on January 29, 2022, 10:00:18 AM
The system log keeps spamming the same error:

2022-01-29T13:15:11 Error   configd.py [46978012-1faf-48bd-bd39-12d8bf5b80ad] Script action failed with Command '/usr/local/opnsense/scripts/systemhealth/queryLog.py --limit '20' --offset '0' --filter '' --module 'squid' --filename 'access' --severity 'Notice'' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 478, in execute subprocess.check_call(script_command, env=self.config_environment, shell=True, File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/usr/local/opnsense/scripts/systemhealth/queryLog.py --limit '20' --offset '0' --filter '' --module 'squid' --filename 'access' --severity 'Notice'' returned non-zero exit status 1.
Title: Web proxy logs not showing
Post by: senseuser on January 30, 2022, 10:09:48 AM
The logs are still not showing up. What to do then?  :)
Title: Re: Missing logs in web proxy
Post by: senseuser on January 30, 2022, 10:19:12 AM
All logs are written to the file normally  /var/log/squid/access.log  But nothing is showing up in the web interface.
Title: Re: Missing logs in web proxy
Post by: Fright on January 30, 2022, 11:08:36 AM
can you "clear log" and try again?
in Severity filter try to switch multiselect toggle to 'on' and deselect all options
Title: Re: Missing logs in web proxy
Post by: Fright on January 30, 2022, 02:16:58 PM
opnsense-patch f530e4f
Title: Re: Missing logs in web proxy
Post by: senseuser on February 16, 2022, 02:40:02 PM
Yes, I have tried clearing the log. Also tried the "opnsense-patch f530e4f patch". This endless "loading" keeps hanging in the web interface :(
(https://i.ibb.co/g6PCmfs/334455.png) (https://ibb.co/g6PCmfs)
Title: Re: Missing logs in web proxy
Post by: senseuser on February 16, 2022, 02:46:20 PM
opnsense-patch f530e4f
(https://i.ibb.co/YTb7F1p/patch.png) (https://ibb.co/YTb7F1p)
Title: Re: Missing logs in web proxy
Post by: franco on February 16, 2022, 03:27:09 PM
If you upgraded to 22.1.1 and applied the patch you have effectively removed the patch...


Cheers,
Franco
Title: Re: Missing logs in web proxy
Post by: Fright on February 16, 2022, 03:31:03 PM
and please, what
/usr/local/opnsense/scripts/systemhealth/queryLog.py --limit '20' --offset '0' --filter '' --module 'squid' --filename 'access' --severity 'Notice'
returns in shell?
Title: Re: Missing logs in web proxy
Post by: senseuser on February 16, 2022, 03:38:09 PM
the actions were:
1. installed 22.1 - "loading" hangs
2. updated to 22.1.1 - "loading" hangs
3. went to the forum, saw this patch in the answers, applied it - "loading" continues to hang.
Title: Re: Missing logs in web proxy
Post by: senseuser on February 16, 2022, 03:41:57 PM
SYSTEM: LOG FILES: BACKEND

2022-02-16T19:40:08   Error   configd.py   [bcc01257-1469-43aa-bebd-c5f7f864aafb] Script action failed with Command '/usr/local/opnsense/scripts/systemhealth/queryLog.py --limit '20' --offset '0' --filter '' --module 'squid' --filename 'access' --severity ''' returned non-zero exit status 1. at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 478, in execute subprocess.check_call(script_command, env=self.config_environment, shell=True, File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '/usr/local/opnsense/scripts/systemhealth/queryLog.py --limit '20' --offset '0' --filter '' --module 'squid' --filename 'access' --severity ''' returned non-zero exit status 1.
Title: Re: Missing logs in web proxy
Post by: Fright on February 16, 2022, 03:46:23 PM
is it possible to execute a command in a shell? what it returns?

/usr/local/opnsense/scripts/systemhealth/queryLog.py --limit '20' --offset '0' --filter '' --module 'squid' --filename 'access' --severity 'Notice'
Title: Re: Missing logs in web proxy
Post by: senseuser on February 16, 2022, 03:51:20 PM
root@DELL:~ # /usr/local/opnsense/scripts/systemhealth/queryLog.py --limit '20' --offset '0' --filter '' --module 'squid' --filename 'access' --severity 'Notice'
Traceback (most recent call last):
  File "/usr/local/opnsense/scripts/systemhealth/queryLog.py", line 123, in <module>
    record['line'] = frmt.line
  File "/usr/local/opnsense/scripts/systemhealth/logformats/squid.py", line 78, in line
    return line.replace(grp, '')
NameError: name 'line' is not defined
root@DELL:~ #
Title: Re: Missing logs in web proxy
Post by: Fright on February 16, 2022, 04:05:21 PM
ah. using extended format?
looks like a little typo in code. try to use standar "file" access log format or please try with
opnsense-patch -a kulikov-a 5a87eaf
will make a pr.

if you decide to switch log format - dont forget to clear logs  ;)
Title: Re: Missing logs in web proxy
Post by: senseuser on February 16, 2022, 04:55:40 PM
Hmm ... Indeed, in the "file" mode everything works, but in the "extended file" mode this endless "loading" hangs.
After applying the patch "opnsense-patch -a kulikov-a 5a87eaf" the "extended file" mode works. All is well and thanks for the help: Fright  :)
Title: Re: Missing logs in web proxy (SOLVED)
Post by: Fright on February 16, 2022, 08:33:49 PM
@senseuser
cool!)
for reference, @AdSchellevis already merged this
opnsense-patch 542dbbb