OPNsense Forum

Archive => 20.7 Legacy Series => Topic started by: sjjh on November 24, 2020, 06:37:12 pm

Title: How to manually start squid from command line?
Post by: sjjh on November 24, 2020, 06:37:12 pm
Squid blocks IPs I don't want to get blocked. To troubleshoot the situation I'd like to start squid in debug mode. I couldn't find an option in the web GUI and thus want to start squid manually from command line. Unfortunately squid complains about a missing PID file and terminates:
Code: [Select]
$ sudo squid -k debug -f /usr/local/etc/squid/squid.conf
2020/11/24 18:28:47| FATAL: failed to open /var/run/squid/squid.pid: (2) No such file or directory
    exception location: File.cc(190) open
How to correctly start squid from command line on OPNsense?

Thanks in advance!
Simon

PS: Sorry if this question has been answered before, I tried the forum search, but didn't find a post.
Title: Re: How to manually start squid from command line?
Post by: Fright on November 24, 2020, 08:35:38 pm
why not to use "debug_options 28,3" or some?
you can add .conf file with option to /usr/local/etc/squid/pre-auth/*.conf and restart squid
Title: Re: How to manually start squid from command line?
Post by: sjjh on November 24, 2020, 08:57:25 pm
I had a look at https://wiki.squid-cache.org/SquidFaq/SquidAcl#I_set_up_my_access_controls.2C_but_they_don.27t_work.21__why.3F (https://wiki.squid-cache.org/SquidFaq/SquidAcl#I_set_up_my_access_controls.2C_but_they_don.27t_work.21__why.3F) and added
Code: [Select]
debug_options ALL,1 33,2and
Code: [Select]
debug_options ALL,1 33,2 28,9and reloaded squid via the web GUI. But no additional information showed up in the access.log file.
Title: Re: How to manually start squid from command line?
Post by: Fright on November 24, 2020, 09:25:29 pm
its in cache.log
Title: Re: How to manually start squid from command line?
Post by: sjjh on November 24, 2020, 10:39:59 pm
thx for the pointer. Now I just need to understand the log... :o