Package: squid
Version: 4.6-1+deb10u4
Severity: normal

Dear Maintainer,

When squid is installed on a buster system with systemd and a DNS resolver, the
squid
proxy appears to be started too early.  I use bind9 as a DNS server/resolver
and have
127.0.0.1 configured in /etc/resolv.conf and in the squid configuration files.
When configuration items like access lists refer to DNS names, the squid proxy
fails
to start on reboot and messages are logged that resolving DNS names failed.
When
the service is then started manually it runs fine.
It appears to be a race condition caused by starting squid too early, when
bind9 is
not yet ready to handle requests.

I am not sufficiently proficient in systemd configuration to properly work
around
this, so I worked around it the crude way by setting:
ExecStartPre=/usr/bin/sleep 10
in the squid.service file.  The ExecStartPre=/usr/sbin/squid --foreground -z
that is there is only required the first time squid is started but I guess
systemd
lacks the capability to only do this when /var/spool/squid has not yet been
populated.



-- System Information:
Debian Release: 10.7
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-13-amd64 (SMP w/2 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages squid depends on:
ii  adduser                  3.118
ii  libc6                    2.28-10
ii  libcap2                  1:2.25-2
ii  libcom-err2              1.44.5-1+deb10u3
ii  libdb5.3                 5.3.28+dfsg1-0.5
ii  libdbi-perl              1.642-1+deb10u1
ii  libecap3                 1.0.1-3.2
ii  libexpat1                2.2.6-2+deb10u1
ii  libgcc1                  1:8.3.0-6
ii  libgnutls30              3.6.7-4+deb10u5
ii  libgssapi-krb5-2         1.17-3+deb10u1
ii  libkrb5-3                1.17-3+deb10u1
iu  libldap-2.4-2            2.4.47+dfsg-3+deb10u5
ii  libltdl7                 2.4.6-9
ii  libnetfilter-conntrack3  1.0.7-1
ii  libnettle6               3.4.1-1
ii  libpam0g                 1.3.1-5
ii  libsasl2-2               2.1.27+dfsg-1+deb10u1
ii  libstdc++6               8.3.0-6
ii  libxml2                  2.9.4+dfsg1-7+deb10u1
ii  logrotate                3.14.0-4
ii  lsb-base                 10.2019051400
ii  netbase                  5.6
ii  squid-common             4.6-1+deb10u4

Versions of packages squid recommends:
ii  ca-certificates  20190110
ii  libcap2-bin      1:2.25-2

Versions of packages squid suggests:
pn  resolvconf   <none>
pn  smbclient    <none>
pn  squid-cgi    <none>
pn  squid-purge  <none>
pn  squidclient  <none>
pn  ufw          <none>
pn  winbind      <none>

-- Configuration Files:
/etc/squid/squid.conf changed [not included]

-- no debconf information

Reply via email to