Re: Squid on Debian 12 not staring via systemd
On Fri, Dec 6, 2024 at 11:56 AM Timothy M Butterworth
<timothy.m.butterworth@gmail.com> wrote:
>
> On Fri, Dec 6, 2024 at 11:48 AM Jeffrey Walton <noloader@gmail.com> wrote:
>>
>> On Fri, Dec 6, 2024 at 11:29 AM Timothy M Butterworth
>> <timothy.m.butterworth@gmail.com> wrote:
>> >
>> > On Fri, Dec 6, 2024 at 11:08 AM Jeffrey Walton <noloader@gmail.com> wrote:
>> >>
>> >> On Fri, Dec 6, 2024 at 8:27 AM Timothy M Butterworth
>> >> <timothy.m.butterworth@gmail.com> wrote:
>> >> > [...]
>> >> > After troubleshooting a bit I found that squid is not binding a socket to 3128 when started manually.
>> >> >
>> >> > root@hp-debian:/home/tmb# squid -a 3128
>> >> > 2024/12/06 05:01:01| FATAL: vector::_M_range_check: __n (which is 1) >= this->size() (which is 0)
>> >> >
>> >> > squid -f /etc/squid/squid.conf
>> >> > executes but no listening socket is established.
>> >>
>> >> A similar bug report at <https://bugs.squid-cache.org/show_bug.cgi?id=5121>.
>> >
>> > Thanks, I just updated the bug report. At least it is not just me having problems.
>>
>> Squid is not my specialty, but a couple of thoughts...
>>
>> Does setting http_port to 3128 in squid.conf help?
>
> This setting is already set. I tried setting it to 127.0.0.1:3128 as well, with no luck.
>>
>> Does Squid have a user and group, like squid:squid? Would running with
>> the account (rather than root) succeed?
>
> Squid has a service account: "proxy" and group "proxy".
That may be an issue. Years ago I had MySQL failures because MySQL
startup scripts checked UID and GID were mysql. Trying to start the
server as root led to failures. You may be experiencing something
similar. You might try `su proxy` to run as the squid user.
The other thing that comes to mind is SELinux, but Debian does not
enable it by default. If it is a SELinux issue, then something like
`semanage port -a -t http_port_t -p tcp 3128` may help. (I'm not sure
what the object type should be for Squid. I'm guessing it is
http_port_t).
Jeff
Reply to: