Package: apt-cacher-ng
Version: 1-2
Severity: important
Usertags: cron

After the recent upgrade of acng to 1-2 I get this from the cron job:

/etc/cron.daily/apt-cacher-ng:
Error: cannot fetch 
http://chianamo:3142/acng-report.html?doExpire=Start+Expiration&abortOnErrors=aOe,
 

The page works fine in my web browser.

If I run `acngtool maint` from the cron job as root it fails.
If I run `acngtool maint` from the cron job as pabs it seems to work.

Based on strace it looks like the difference is that as root it tries
to use the socket and that fails while as a user it gets permission
denied and then connects to the TCP port instead.

acngtool is printing the wrong location in the error message, since it
is connecting to the SocketPath instead of the TCP port.

If I drop the SocketPath argument from the `acngtool maint` call then
it works as both root and pabs.

It looks like the issue is that the socket is disabled by default.

# Socket file for accessing through local UNIX socket instead of TCP/IP. Can be
# used with inetd bridge or cron client.
# Default: not set, UNIX socket bridge is disabled.
#
# SocketPath:/var/run/apt-cacher-ng/socket

While SocketPath is disabled by default in the configuration,
SocketPath is enabled by the systemd service:

$ systemctl status apt-cacher-ng.service  | tail -n1
           └─20687 /usr/sbin/apt-cacher-ng SocketPath=/run/apt-cacher-ng/socket 
-c /etc/apt-cacher-ng ForeGround=1

Even when I enable SocketPath in the configuration, acngtool still doesn't work.

-- System Information:
Debian Release: stretch/sid
  APT prefers testing-debug
  APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 
'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 
'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages apt-cacher-ng depends on:
ii  adduser                3.115
ii  debconf [debconf-2.0]  1.5.59
ii  dpkg                   1.18.10
ii  init-system-helpers    1.45
ii  libbz2-1.0             1.0.6-8
ii  libc6                  2.24-5
ii  libgcc1                1:6.2.0-10
ii  liblzma5               5.2.2-1.2
ii  libssl1.0.2            1.0.2j-1
ii  libstdc++6             6.2.0-10
ii  libsystemd0            231-9
ii  libwrap0               7.6.q-25
ii  lsb-base               9.20161101
ii  zlib1g                 1:1.2.8.dfsg-2+b3

apt-cacher-ng recommends no packages.

Versions of packages apt-cacher-ng suggests:
ii  avahi-daemon  0.6.32-1
pn  doc-base      <none>
ii  libfuse2      2.9.7-1

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to