Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #275335 > unrolled thread

Squid on Debian 12 not staring via systemd

Started byTimothy M Butterworth <timothy.m.butterworth@gmail.com>
First post2024-12-06 11:10 +0100
Last post2024-12-06 17:00 +0100
Articles 15 — 7 participants

Back to article view | Back to linux.debian.user


Contents

  Squid on Debian 12 not staring via systemd Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2024-12-06 11:10 +0100
    Re: Squid on Debian 12 not staring via systemd Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2024-12-06 11:30 +0100
      Re: Squid on Debian 12 not staring via systemd Jeffrey Walton <noloader@gmail.com> - 2024-12-06 17:30 +0100
        Re: Squid on Debian 12 not staring via systemd Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2024-12-06 18:20 +0100
          Re: Squid on Debian 12 not staring via systemd Jeffrey Walton <noloader@gmail.com> - 2024-12-06 19:20 +0100
            Re: Squid on Debian 12 not staring via systemd Charles Curley <charlescurley@charlescurley.com> - 2024-12-06 20:10 +0100
        Re: Squid on Debian 12 not staring via systemd Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2024-12-06 22:40 +0100
          Re: Squid on Debian 12 not staring via systemd Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2024-12-06 23:40 +0100
            Re: Squid on Debian 12 not staring via systemd "Andrew M.A. Cater" <amacater@einval.com> - 2024-12-07 00:20 +0100
              Re: Squid on Debian 12 not staring via systemd Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2024-12-07 12:40 +0100
            Re: Squid on Debian 12 not staring via systemd Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2024-12-07 04:00 +0100
              Re: Squid on Debian 12 not staring via systemd Andy Smith <andy@strugglers.net> - 2024-12-07 04:20 +0100
              Re: Squid on Debian 12 not staring via systemd Greg Wooledge <greg@wooledge.org> - 2024-12-07 04:40 +0100
              Re: Squid on Debian 12 not staring via systemd Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2024-12-07 05:00 +0100
    Re: Squid on Debian 12 not staring via systemd Stefan Monnier <monnier@iro.umontreal.ca> - 2024-12-06 17:00 +0100

#275335 — Squid on Debian 12 not staring via systemd

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2024-12-06 11:10 +0100
SubjectSquid on Debian 12 not staring via systemd
Message-ID<JQDrz-e87r-5@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hello,

Is anyone running Squid on Debian 12? I installed it but I can not get it
to start via systemd.

root@hp-debian:/home/tmb# systemctl status squid.service
× squid.service - Squid Web Proxy Server
    Loaded: loaded (/lib/systemd/system/squid.service; enabled; preset:
enabled)
    Active: failed (Result: timeout) since Fri 2024-12-06 04:34:58 EST; 20s
ago
      Docs: man:squid(8)
   Process: 24544 ExecStartPre=/usr/sbin/squid --foreground -z
(code=exited, status=0/SUCCESS)
   Process: 24547 ExecStart=/usr/sbin/squid --foreground -sYC (code=exited,
status=1/FAILURE)
  Main PID: 24547 (code=exited, status=1/FAILURE)
       CPU: 186ms

Dec 06 04:33:28 hp-debian squid[24549]: Finished loading MIME types and
icons.
Dec 06 04:33:28 hp-debian squid[24549]: HTCP Disabled.
Dec 06 04:34:58 hp-debian systemd[1]: squid.service: start operation timed
out. Terminating.
Dec 06 04:34:58 hp-debian squid[24547]: Squid Parent: squid-1 process 24549
exited due to signal 15 with status 0
Dec 06 04:34:58 hp-debian squid[24547]: Exiting due to unexpected forced
shutdown
Dec 06 04:34:58 hp-debian squid[24547]: Removing PID file (/run/squid.pid)
Dec 06 04:34:58 hp-debian systemd[1]: squid.service: Main process exited,
code=exited, status=1/FAILURE
Dec 06 04:34:58 hp-debian systemd[1]: squid.service: Killing process 24551
(pinger) with signal SIGKILL.
Dec 06 04:34:58 hp-debian systemd[1]: squid.service: Failed with result
'timeout'.
Dec 06 04:34:58 hp-debian systemd[1]: Failed to start squid.service - Squid
Web Proxy Server.

root@hp-debian:/home/tmb# journalctl -xeu squid.service
Dec 06 04:33:28 hp-debian squid[24549]: Process ID 24549
Dec 06 04:33:28 hp-debian squid[24549]: Process Roles: worker
Dec 06 04:33:28 hp-debian squid[24549]: With 1024 file descriptors available
Dec 06 04:33:28 hp-debian squid[24549]: Initializing IP Cache...
Dec 06 04:33:28 hp-debian squid[24549]: DNS Socket created at [::], FD 8
Dec 06 04:33:28 hp-debian squid[24549]: DNS Socket created at 0.0.0.0, FD 9
Dec 06 04:33:28 hp-debian squid[24549]: Adding nameserver 192.168.195.2
from /etc/resolv.conf
Dec 06 04:33:28 hp-debian squid[24549]: Adding nameserver
2600:380:8c28:f0aa::df from /etc/resolv.conf
Dec 06 04:33:28 hp-debian squid[24549]: Logfile: opening log
daemon:/var/log/squid/access.log
Dec 06 04:33:28 hp-debian squid[24549]: Logfile Daemon: opening log
/var/log/squid/access.log
Dec 06 04:33:28 hp-debian squid[24549]: Local cache digest enabled;
rebuild/rewrite every 3600/3600 sec
Dec 06 04:33:28 hp-debian squid[24549]: Store logging disabled
Dec 06 04:33:28 hp-debian squid[24549]: Swap maxSize 0 + 262144 KB,
estimated 20164 objects
Dec 06 04:33:28 hp-debian squid[24549]: Target number of buckets: 1008
Dec 06 04:33:28 hp-debian squid[24549]: Using 8192 Store buckets
Dec 06 04:33:28 hp-debian squid[24549]: Max Mem  size: 262144 KB
Dec 06 04:33:28 hp-debian squid[24549]: Max Swap size: 0 KB
Dec 06 04:33:28 hp-debian squid[24549]: Using Least Load store dir selection
Dec 06 04:33:28 hp-debian squid[24549]: Set Current Directory to
/var/spool/squid
Dec 06 04:33:28 hp-debian squid[24549]: Finished loading MIME types and
icons.
Dec 06 04:33:28 hp-debian squid[24549]: HTCP Disabled.
Dec 06 04:34:58 hp-debian systemd[1]: squid.service: start operation timed
out. Terminating.
Dec 06 04:34:58 hp-debian squid[24547]: Squid Parent: squid-1 process 24549
exited due to signal 15 with status 0
Dec 06 04:34:58 hp-debian squid[24547]: Exiting due to unexpected forced
shutdown
Dec 06 04:34:58 hp-debian squid[24547]: Removing PID file (/run/squid.pid)
Dec 06 04:34:58 hp-debian systemd[1]: squid.service: Main process exited,
code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStart= process belonging to unit squid.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Dec 06 04:34:58 hp-debian systemd[1]: squid.service: Killing process 24551
(pinger) with signal SIGKILL.
Dec 06 04:34:58 hp-debian systemd[1]: squid.service: Failed with result
'timeout'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit squid.service has entered the 'failed' state with result
'timeout'.
Dec 06 04:34:58 hp-debian systemd[1]: Failed to start squid.service - Squid
Web Proxy Server.
░░ Subject: A start job for unit squid.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit squid.service has finished with a failure.
░░
░░ The job identifier is 28852 and the job result is failed.

Squid starts via command line.
root@hp-debian:/home/tmb# squid
root@hp-debian:/home/tmb# squid
2024/12/06 04:41:16| FATAL: Squid is already running: Found fresh instance
PID file (/run/squid.pid) with PID 24701
   exception location: Instance.cc(121) ThrowIfAlreadyRunningWith

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

[toc] | [next] | [standalone]


#275336

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2024-12-06 11:30 +0100
Message-ID<JQDKV-e8nh-5@gated-at.bofh.it>
In reply to#275335

[Multipart message — attachments visible in raw view] — view raw

On Fri, Dec 6, 2024 at 4:42 AM Timothy M Butterworth <
timothy.m.butterworth@gmail.com> wrote:

> Hello,
>
> Is anyone running Squid on Debian 12? I installed it but I can not get it
> to start via systemd.
>
> root@hp-debian:/home/tmb# systemctl status squid.service
> × squid.service - Squid Web Proxy Server
>     Loaded: loaded (/lib/systemd/system/squid.service; enabled; preset:
> enabled)
>     Active: failed (Result: timeout) since Fri 2024-12-06 04:34:58 EST;
> 20s ago
>       Docs: man:squid(8)
>    Process: 24544 ExecStartPre=/usr/sbin/squid --foreground -z
> (code=exited, status=0/SUCCESS)
>    Process: 24547 ExecStart=/usr/sbin/squid --foreground -sYC (code=exited,
> status=1/FAILURE)
>   Main PID: 24547 (code=exited, status=1/FAILURE)
>        CPU: 186ms
>
> Dec 06 04:33:28 hp-debian squid[24549]: Finished loading MIME types and
> icons.
> Dec 06 04:33:28 hp-debian squid[24549]: HTCP Disabled.
> Dec 06 04:34:58 hp-debian systemd[1]: squid.service: start operation
> timed out. Terminating.
> Dec 06 04:34:58 hp-debian squid[24547]: Squid Parent: squid-1 process
> 24549 exited due to signal 15 with status 0
> Dec 06 04:34:58 hp-debian squid[24547]: Exiting due to unexpected forced
> shutdown
> Dec 06 04:34:58 hp-debian squid[24547]: Removing PID file (/run/squid.pid)
> Dec 06 04:34:58 hp-debian systemd[1]: squid.service: Main process exited,
> code=exited, status=1/FAILURE
> Dec 06 04:34:58 hp-debian systemd[1]: squid.service: Killing process
> 24551 (pinger) with signal SIGKILL.
> Dec 06 04:34:58 hp-debian systemd[1]: squid.service: Failed with result
> 'timeout'.
> Dec 06 04:34:58 hp-debian systemd[1]: Failed to start squid.service -
> Squid Web Proxy Server.
>
> root@hp-debian:/home/tmb# journalctl -xeu squid.service
> Dec 06 04:33:28 hp-debian squid[24549]: Process ID 24549
> Dec 06 04:33:28 hp-debian squid[24549]: Process Roles: worker
> Dec 06 04:33:28 hp-debian squid[24549]: With 1024 file descriptors
> available
> Dec 06 04:33:28 hp-debian squid[24549]: Initializing IP Cache...
> Dec 06 04:33:28 hp-debian squid[24549]: DNS Socket created at [::], FD 8
> Dec 06 04:33:28 hp-debian squid[24549]: DNS Socket created at 0.0.0.0, FD
> 9
> Dec 06 04:33:28 hp-debian squid[24549]: Adding nameserver 192.168.195.2
> from /etc/resolv.conf
> Dec 06 04:33:28 hp-debian squid[24549]: Adding nameserver
> 2600:380:8c28:f0aa::df from /etc/resolv.conf
> Dec 06 04:33:28 hp-debian squid[24549]: Logfile: opening log
> daemon:/var/log/squid/access.log
> Dec 06 04:33:28 hp-debian squid[24549]: Logfile Daemon: opening log
> /var/log/squid/access.log
> Dec 06 04:33:28 hp-debian squid[24549]: Local cache digest enabled;
> rebuild/rewrite every 3600/3600 sec
> Dec 06 04:33:28 hp-debian squid[24549]: Store logging disabled
> Dec 06 04:33:28 hp-debian squid[24549]: Swap maxSize 0 + 262144 KB,
> estimated 20164 objects
> Dec 06 04:33:28 hp-debian squid[24549]: Target number of buckets: 1008
> Dec 06 04:33:28 hp-debian squid[24549]: Using 8192 Store buckets
> Dec 06 04:33:28 hp-debian squid[24549]: Max Mem  size: 262144 KB
> Dec 06 04:33:28 hp-debian squid[24549]: Max Swap size: 0 KB
> Dec 06 04:33:28 hp-debian squid[24549]: Using Least Load store dir
> selection
> Dec 06 04:33:28 hp-debian squid[24549]: Set Current Directory to
> /var/spool/squid
> Dec 06 04:33:28 hp-debian squid[24549]: Finished loading MIME types and
> icons.
> Dec 06 04:33:28 hp-debian squid[24549]: HTCP Disabled.
> Dec 06 04:34:58 hp-debian systemd[1]: squid.service: start operation
> timed out. Terminating.
> Dec 06 04:34:58 hp-debian squid[24547]: Squid Parent: squid-1 process
> 24549 exited due to signal 15 with status 0
> Dec 06 04:34:58 hp-debian squid[24547]: Exiting due to unexpected forced
> shutdown
> Dec 06 04:34:58 hp-debian squid[24547]: Removing PID file (/run/squid.pid)
> Dec 06 04:34:58 hp-debian systemd[1]: squid.service: Main process exited,
> code=exited, status=1/FAILURE
> ░░ Subject: Unit process exited
> ░░ Defined-By: systemd
> ░░ Support: https://www.debian.org/support
> ░░
> ░░ An ExecStart= process belonging to unit squid.service has exited.
> ░░
> ░░ The process' exit code is 'exited' and its exit status is 1.
> Dec 06 04:34:58 hp-debian systemd[1]: squid.service: Killing process
> 24551 (pinger) with signal SIGKILL.
> Dec 06 04:34:58 hp-debian systemd[1]: squid.service: Failed with result
> 'timeout'.
> ░░ Subject: Unit failed
> ░░ Defined-By: systemd
> ░░ Support: https://www.debian.org/support
> ░░
> ░░ The unit squid.service has entered the 'failed' state with result
> 'timeout'.
> Dec 06 04:34:58 hp-debian systemd[1]: Failed to start squid.service -
> Squid Web Proxy Server.
> ░░ Subject: A start job for unit squid.service has failed
> ░░ Defined-By: systemd
> ░░ Support: https://www.debian.org/support
> ░░
> ░░ A start job for unit squid.service has finished with a failure.
> ░░
> ░░ The job identifier is 28852 and the job result is failed.
>
> Squid starts via command line.
> root@hp-debian:/home/tmb# squid
> root@hp-debian:/home/tmb# squid
> 2024/12/06 04:41:16| FATAL: Squid is already running: Found fresh instance
> PID file (/run/squid.pid) with PID 24701
>    exception location: Instance.cc(121) ThrowIfAlreadyRunningWith
>

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.

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

[toc] | [prev] | [next] | [standalone]


#275342

FromJeffrey Walton <noloader@gmail.com>
Date2024-12-06 17:30 +0100
Message-ID<JQJnj-eezG-5@gated-at.bofh.it>
In reply to#275336
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>.

Jeff

[toc] | [prev] | [next] | [standalone]


#275346

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2024-12-06 18:20 +0100
Message-ID<JQK9H-ef5F-13@gated-at.bofh.it>
In reply to#275342

[Multipart message — attachments visible in raw view] — view raw

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".


> Jeff
>


-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

[toc] | [prev] | [next] | [standalone]


#275349

FromJeffrey Walton <noloader@gmail.com>
Date2024-12-06 19:20 +0100
Message-ID<JQL5L-efFs-15@gated-at.bofh.it>
In reply to#275346
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

[toc] | [prev] | [next] | [standalone]


#275351

FromCharles Curley <charlescurley@charlescurley.com>
Date2024-12-06 20:10 +0100
Message-ID<JQLS9-egbV-19@gated-at.bofh.it>
In reply to#275349
On Fri, 6 Dec 2024 13:01:37 -0500
Jeffrey Walton <noloader@gmail.com> wrote:

> >
> > 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.

Not necessarily. Looking at the service file for squid shows, inter
alia:

[Service]
Type=notify
PIDFile=/run/squid.pid
Group=proxy
RuntimeDirectory=squid
RuntimeDirectoryMode=0775
ExecStartPre=/usr/sbin/squid --foreground -z
ExecStart=/usr/sbin/squid --foreground -sYC
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
NotifyAccess=all

That suggests tha you want to run as user root, group squid. Indeed:

root@issola:~# ps aux | grep -i squid
root        2217  0.0  0.2  66372 17516 ?        Ss   Nov26   0:00 /usr/sbin/squid --foreground -sYC
proxy       2220  0.0  0.2  71824 23064 ?        S    Nov26   1:53 (squid-1) --kid squid-1 --foreground -sYC
proxy       2244  0.0  0.0   5644  1168 ?        S    Nov26   0:00 (logfile-daemon) /var/log/squid/access.log
root      285132  0.0  0.0   6332  2120 pts/1    S+   11:46   0:00 grep --colour=auto -i squid
root@issola:~# 




-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

[toc] | [prev] | [next] | [standalone]


#275355

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2024-12-06 22:40 +0100
Message-ID<JQOdj-ehty-5@gated-at.bofh.it>
In reply to#275342

[Multipart message — attachments visible in raw view] — view raw

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.
>

According to squid upstream version 5.7 is no longer supported. Version 6.7
has a workaround fix for the problem. The latest release version is 6.12. I
downloaded the source code for 6.12 and I am going to try it out.


>> Jeff
>>
>
>
> --
> ⢀⣴⠾⠻⢶⣦⠀
> ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
> ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
> ⠈⠳⣄⠀⠀
>


-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

[toc] | [prev] | [next] | [standalone]


#275356

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2024-12-06 23:40 +0100
Message-ID<JQP9n-ei1U-7@gated-at.bofh.it>
In reply to#275355

[Multipart message — attachments visible in raw view] — view raw

On Fri, Dec 6, 2024 at 4:19 PM Timothy M Butterworth <
timothy.m.butterworth@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.
>>
>
> According to squid upstream version 5.7 is no longer supported. Version
> 6.7 has a workaround fix for the problem. The latest release version is
> 6.12. I downloaded the source code for 6.12 and I am going to try it out.
>
>
>>> Jeff
>>>
>>
>>
I would like to thank everyone who helped me out with this. I submitted a
bug report with debian.

Tim

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

[toc] | [prev] | [next] | [standalone]


#275357

From"Andrew M.A. Cater" <amacater@einval.com>
Date2024-12-07 00:20 +0100
Message-ID<JQPM5-eixw-3@gated-at.bofh.it>
In reply to#275356
On Fri, Dec 06, 2024 at 05:20:02PM -0500, Timothy M Butterworth wrote:
> On Fri, Dec 6, 2024 at 4:19 PM Timothy M Butterworth <
> timothy.m.butterworth@gmail.com> wrote:
> 
> >>
> >
> > According to squid upstream version 5.7 is no longer supported. Version
> > 6.7 has a workaround fix for the problem. The latest release version is
> > 6.12. I downloaded the source code for 6.12 and I am going to try it out.
> >

6.12 is built in Testing/trixie - you may find that you can either install
just squid from there or at least use the Debian files as a basis for 
repackaging.

There doesn't seem to be a squid in debian-backports.

All the very best, as ever,

Andy
(amacater@debian.org)


> >
> >>> Jeff
> >>>
> >>
> >>
> I would like to thank everyone who helped me out with this. I submitted a
> bug report with debian.
> 
> Tim
> 
> -- 
> ⢀⣴⠾⠻⢶⣦⠀
> ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
> ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
> ⠈⠳⣄⠀⠀

[toc] | [prev] | [next] | [standalone]


#275375

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2024-12-07 12:40 +0100
Message-ID<JR1kd-epAe-5@gated-at.bofh.it>
In reply to#275357

[Multipart message — attachments visible in raw view] — view raw

On Fri, Dec 6, 2024 at 10:57 PM Andrew M.A. Cater <amacater@einval.com>
wrote:

> On Fri, Dec 06, 2024 at 05:20:02PM -0500, Timothy M Butterworth wrote:
> > On Fri, Dec 6, 2024 at 4:19 PM Timothy M Butterworth <
> > timothy.m.butterworth@gmail.com> wrote:
> >
> > >>
> > >
> > > According to squid upstream version 5.7 is no longer supported. Version
> > > 6.7 has a workaround fix for the problem. The latest release version is
> > > 6.12. I downloaded the source code for 6.12 and I am going to try it
> out.
> > >
>
> 6.12 is built in Testing/trixie - you may find that you can either install
> just squid from there or at least use the Debian files as a basis for
> repackaging.
>
> There doesn't seem to be a squid in debian-backports.
>
> All the very best, as ever,
>
> Andy
>

I built 6.12 from source, it now works. I reconfigured the systemd
squid.service file.

/lib/systemd/system/squid.service
[Unit]
Description=Squid Web Proxy Server
Documentation=man:squid(8)
After=network.target network-online.target nss-lookup.target

[Service]
Type=notify
PIDFile=/usr/local/squid/var/run/squid.pid
Group=proxy
RuntimeDirectory=squid
RuntimeDirectoryMode=0775
ExecStartPre=/usr/local/squid/sbin/squid --foreground -z
ExecStart=/usr/local/squid/sbin/squid --foreground -sYC
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
NotifyAccess=all

[Install]
WantedBy=multi-user.target

It now starts squid 6.12 on boot.

The only problem I have left is getting IPv4 and IPv6 both working.
According  to the documentation http_port 3128 should open both IPv4 and
IPv6 ports but only IPv6 currently binds. I reconfigured it to use: http_port
0.0.0.0:3128. So now I have a working IPv4 proxy. I think the problem here
is just PEBCAC. I'm missing something.

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

[toc] | [prev] | [next] | [standalone]


#275366

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2024-12-07 04:00 +0100
Message-ID<JQTcZ-ekps-1@gated-at.bofh.it>
In reply to#275356

[Multipart message — attachments visible in raw view] — view raw

On Fri, Dec 6, 2024 at 5:20 PM Timothy M Butterworth <
timothy.m.butterworth@gmail.com> wrote:

>
>
> On Fri, Dec 6, 2024 at 4:19 PM Timothy M Butterworth <
> timothy.m.butterworth@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.
>>>
>>
>> According to squid upstream version 5.7 is no longer supported. Version
>> 6.7 has a workaround fix for the problem. The latest release version is
>> 6.12. I downloaded the source code for 6.12 and I am going to try it out.
>>
>>
>>>> Jeff
>>>>
>>>
>>>
> I would like to thank everyone who helped me out with this. I submitted a
> bug report with debian.
>
> Tim
>
> I built squid 6.12 from source and now I get a new error:

root@hp-debian:/usr/local/squid/sbin# ./squid -z -a 3128 -N -Y -C -f
/usr/local/squid/etc/squid.conf
2024/12/06 21:35:05| Processing Configuration File:
/usr/local/squid/etc/squid.conf (depth 0)
2024/12/06 21:35:05| Created PID file (/usr/local/squid/var/run/squid.pid)
2024/12/06 21:35:05| storeDirWriteCleanLogs: Starting...
2024/12/06 21:35:05|   Finished.  Wrote 0 entries.
2024/12/06 21:35:05|   Took 0.00 seconds (  0.00 entries/sec).
2024/12/06 21:35:05| *FATAL: Ipc::Mem::Segment::create failed to
shm_open(/squid-cf__metadata.shm): (17) File exists *

2024/12/06 21:35:05| Squid Cache (Version 6.12): Terminated abnormally.
2024/12/06 21:35:05| Removing PID file (/usr/local/squid/var/run/squid.pid)



-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

[toc] | [prev] | [next] | [standalone]


#275367

FromAndy Smith <andy@strugglers.net>
Date2024-12-07 04:20 +0100
Message-ID<JQTwl-ekR3-1@gated-at.bofh.it>
In reply to#275366
Hi,

On Fri, Dec 06, 2024 at 09:37:35PM -0500, Timothy M Butterworth wrote:
> 2024/12/06 21:35:05| *FATAL: Ipc::Mem::Segment::create failed to
> shm_open(/squid-cf__metadata.shm): (17) File exists *

Are there files in /dev/shm left from a previous run that are owned by a
different user?

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

You dont have to be illiterate to use the Internet, but it help's.
 — Mike Bristow

[toc] | [prev] | [next] | [standalone]


#275368

FromGreg Wooledge <greg@wooledge.org>
Date2024-12-07 04:40 +0100
Message-ID<JQTPH-ekXn-1@gated-at.bofh.it>
In reply to#275366
On Fri, Dec 06, 2024 at 21:37:35 -0500, Timothy M Butterworth wrote:
> 2024/12/06 21:35:05| *FATAL: Ipc::Mem::Segment::create failed to
> shm_open(/squid-cf__metadata.shm): (17) File exists *

A quick google search gives me
<https://squid-users.squid-cache.narkive.com/CcSDst54/fatal-ipc-mem-segment-create-failed-to-shm-open-squid-cf-queues-shm-17-file-exists>
which says:

    It seems the squid-cf__queues.shm file already exists in /dev/shm/
    and Squid has not permission to overwrite the file.

So, I'd check that.  Obviously with "metadata" instead of "queues" in
the filename, to match your variant of the error message.

[toc] | [prev] | [next] | [standalone]


#275371

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2024-12-07 05:00 +0100
Message-ID<JQU93-el3x-1@gated-at.bofh.it>
In reply to#275366

[Multipart message — attachments visible in raw view] — view raw

On Fri, Dec 6, 2024 at 9:37 PM Timothy M Butterworth <
timothy.m.butterworth@gmail.com> wrote:

>
>
> On Fri, Dec 6, 2024 at 5:20 PM Timothy M Butterworth <
> timothy.m.butterworth@gmail.com> wrote:
>
>>
>>
>> On Fri, Dec 6, 2024 at 4:19 PM Timothy M Butterworth <
>> timothy.m.butterworth@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.
>>>>
>>>
>>> According to squid upstream version 5.7 is no longer supported. Version
>>> 6.7 has a workaround fix for the problem. The latest release version is
>>> 6.12. I downloaded the source code for 6.12 and I am going to try it out.
>>>
>>>
>>>>> Jeff
>>>>>
>>>>
>>>>
>> I would like to thank everyone who helped me out with this. I submitted a
>> bug report with debian.
>>
>> Tim
>>
>> I built squid 6.12 from source and now I get a new error:
>
> root@hp-debian:/usr/local/squid/sbin# ./squid -z -a 3128 -N -Y -C -f
> /usr/local/squid/etc/squid.conf
> 2024/12/06 21:35:05| Processing Configuration File:
> /usr/local/squid/etc/squid.conf (depth 0)
> 2024/12/06 21:35:05| Created PID file (/usr/local/squid/var/run/squid.pid)
> 2024/12/06 21:35:05| storeDirWriteCleanLogs: Starting...
> 2024/12/06 21:35:05|   Finished.  Wrote 0 entries.
> 2024/12/06 21:35:05|   Took 0.00 seconds (  0.00 entries/sec).
> 2024/12/06 21:35:05| *FATAL: Ipc::Mem::Segment::create failed to
> shm_open(/squid-cf__metadata.shm): (17) File exists *
>
> 2024/12/06 21:35:05| Squid Cache (Version 6.12): Terminated abnormally.
> 2024/12/06 21:35:05| Removing PID file (/usr/local/squid/var/run/squid.pid)
>

I got Squid 6.12 to work but only listening on IPv4. I am not sure how to
get it on both IPv4 and IPv6, any suggestions?
netstat -ln
tcp        0      0 127.0.0.1:3128          0.0.0.0:*               LISTEN

I made the following modifications to: /usr/local/squid/etc/squid.conf
# Squid normally listens to port 3128
http_port 127.0.0.1:3128

# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /usr/local/squid/var/cache/squid 100 16 256

cache_effective_user proxy
cache_effective_group proxy

I also fixed some permission issues for the disk cache:

chown -R proxy:proxy /usr/local/squid/var/cache/squid/

I am calling it a night. I will see if I can get IPv6 working tomorrow.

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

[toc] | [prev] | [next] | [standalone]


#275340

FromStefan Monnier <monnier@iro.umontreal.ca>
Date2024-12-06 17:00 +0100
Message-ID<JQIUh-ee9P-3@gated-at.bofh.it>
In reply to#275335
> Is anyone running Squid on Debian 12? I installed it but I can not get it
> to start via systemd.

FWIW, I'm running Squid on Debian 12, yes.
I don't know if I start it via systemd, but it's started at boot
presumably by systemd and `systemctl status squid` gives mean sane output.
[ and it does serve connections on port 3128.  ]


        Stefan

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web