bastian42
Goto Top

Debian apticron zeigt updates an, obwohl sie gemacht sind

Hallo,

ich betreibe ein debian 7.6. Mittels apticron lass ich mich über updates benachrichtigen.
Seit ca. 2 Wochen bringt mir apticron jeden Tag eine Mail das updates anstehen. Diese
Updates wurden jedoch alle gemacht. wenn ich mittels aptitude ein update machen will
sagt er auch das keine Updates anstehen. Hat jemand eine Idee woran das liegen kann?

Danke im voraus.

gruß
Bastian

Content-Key: 244565

Url: https://administrator.de/contentid/244565

Printed on: April 16, 2024 at 13:04 o'clock

Member: Gersen
Gersen Jul 24, 2014 at 11:01:58 (UTC)
Goto Top
Hallo,

evtl. Pakete auf "hold" gesetzt?

Zitat:
Falls Sie auf Ihrem System absichtlich Pakete auf "hold" gesetzt haben, kann es sinnvoll sein, dass diese von Apticron Benachrichtigungen ausgeschlossen werden.

Set NOTIFY_HOLDS="0" if you don't want to be notified about new versions of
packages on hold in your system. The default behavior is downloading and
listing them as any other package.
NOTIFY_HOLDS="0"

Gruß,
Gersen
Member: bastian42
bastian42 Jul 24, 2014 at 11:29:39 (UTC)
Goto Top
laut logfile habe ich die Aktualisierung durchgeführt.


/var/log/aptitude

6 Pakete werden installiert und 0 Pakete entfernt.
5.120 B der Festplatte werden belegt.
[AKTUALISIERUNG] libapache2-mod-php5:i386 5.4.4-14+deb7u11 -> 5.4.4-14+deb7u12
[AKTUALISIERUNG] php5:i386 5.4.4-14+deb7u11 -> 5.4.4-14+deb7u12
[AKTUALISIERUNG] php5-cli:i386 5.4.4-14+deb7u11 -> 5.4.4-14+deb7u12
[AKTUALISIERUNG] php5-common:i386 5.4.4-14+deb7u11 -> 5.4.4-14+deb7u12
[AKTUALISIERUNG] php5-curl:i386 5.4.4-14+deb7u11 -> 5.4.4-14+deb7u12
[AKTUALISIERUNG] php5-intl:i386 5.4.4-14+deb7u11 -> 5.4.4-14+deb7u12

Protokoll abgeschlossen.
Aptitude 0.6.8.2: Protokoll
Do, 10. Jul 2014 12:06:01 +0200

apticron:

The following packages are currently pending an upgrade:

acpi-support-base 0.140-5+deb7u1
apache2.2-bin 2.2.22-13+deb7u2
apache2.2-common 2.2.22-13+deb7u2
apache2-mpm-prefork 2.2.22-13+deb7u2
apache2-utils 2.2.22-13+deb7u2
base-files 7.1wheezy6
libapache2-mod-php5 5.4.4-14+deb7u12
libc6 2.13-38+deb7u3
libc6-i686 2.13-38+deb7u3
libc-bin 2.13-38+deb7u3
libcups2 1.5.3-5+deb7u2
libcupsimage2 1.5.3-5+deb7u2
libjpeg8 8d-1+deb7u1
libxml2 2.8.0+dfsg1-7+wheezy1
linux-image-3.2.0-4-686-pae 3.2.60-1+deb7u1
locales 2.13-38+deb7u3
multiarch-support 2.13-38+deb7u3
openssh-client 1:6.0p1-4+deb7u2
openssh-server 1:6.0p1-4+deb7u2
php5 5.4.4-14+deb7u12
php5-cli 5.4.4-14+deb7u12
php5-common 5.4.4-14+deb7u12
php5-curl 5.4.4-14+deb7u12
php5-intl 5.4.4-14+deb7u12
Member: Gersen
Gersen Jul 24, 2014 at 12:57:04 (UTC)
Goto Top
Kannst Du bitte mal (nachdem der Cronjob gelaufen ist und Du eine Mail erhalten hast) die Ausgabe von
ls -la /tmp/apticron* /varlib/apticron/*
posten?

Auch der -um die Kommentarzeilen eingedampfte- Inhalt der Konfig-Datei könnte hilfreich sein:
cat /etc/apticron/apticron.conf | sed '/ *#/d; /^ *$/d'
Member: bastian42
bastian42 Jul 24, 2014 at 13:08:59 (UTC)
Goto Top
ls -la /tmp/apticron* /var/lib/apticron/*

-rw-r--r-- 1 root root 0 Jul 24 10:05 /var/lib/apticron/cron_run
-rw------- 1 root root 0 Jul 24 15:06 /var/lib/apticron/last_run

cat /etc/apticron/apticron.conf | sed '/ *#/d; /^ *$/d'

EMAIL="blabla@miau.hallo"
Member: Gersen
Gersen Jul 24, 2014 updated at 13:49:19 (UTC)
Goto Top
Merkwürdig...

Was gibt denn
apt-cache policy apache2-utils php5 apticron
aus?
Member: it-frosch
it-frosch Jul 24, 2014 at 15:16:10 (UTC)
Goto Top
Hallo Bastian,

steht in deiner E-Mail von Apticron immer Do, 10. Jul 2014 12:06:01 +0200 drin oder ändert sich das Datum?

grüße vom it-frosch
Member: bastian42
bastian42 Jul 24, 2014 updated at 16:36:29 (UTC)
Goto Top
root@dokuwiki:~# apt-cache policy apache2-utils php5 apticron
apache2-utils:
Installiert: 2.2.22-13+deb7u2
Installationskandidat: 2.2.22-13+deb7u2
Versionstabelle:
* 2.2.22-13+deb7u2 0
500 http://ftp.de.debian.org/debian/ wheezy/main i386 Packages
100 /var/lib/dpkg/status
php5:
Installiert: 5.4.4-14+deb7u12
Installationskandidat: 5.4.4-14+deb7u12
Versionstabelle:
* 5.4.4-14+deb7u12 0
500 http://security.debian.org/ wheezy/updates/main i386 Packages
100 /var/lib/dpkg/status
5.4.4-14+deb7u11 0
500 http://ftp.de.debian.org/debian/ wheezy/main i386 Packages
apticron:
Installiert: 1.1.55
Installationskandidat: 1.1.55
Versionstabelle:
*** 1.1.55 0
500 http://ftp.de.debian.org/debian/ wheezy/main i386 Packages
100 /var/lib/dpkg/status
Member: bastian42
bastian42 Jul 24, 2014 at 16:36:51 (UTC)
Goto Top
nein, steht immer das richtige datum drin.
Member: Gersen
Gersen Jul 24, 2014 updated at 19:49:28 (UTC)
Goto Top
Habe die Vermutung, apticonf kommt hier nicht mit den Folgen der Veröffentlichung von Debian 7.6 zurecht (am 12.07. - deckt sich etwa mit dem Zeitpunkt des ersten Auftretens, oder?). Im ChangeLog finden sich auch -stichprobenhaft geschaut- alle Pakete, die bei Dir angemault werden (apache, base-files, cups, openssh, php5).

Es hat hier -wie im Beispiel php5- mit Versionen aus zwei -gleich priorisierten- Paketquellen zu tun - und damit offenbar ein Problem...

Zur Sicherheit würde ich Dir -falls noch nicht geschehen- ein
apt-get update && apt-get -f dist-upgrade
empfehlen.
Member: bastian42
bastian42 Jul 25, 2014 at 10:15:02 (UTC)
Goto Top
Hallo,

habe apt-get update && apt-get -f dist-upgrade durchgeführt. Leider kein Erfolg, nun habe ich gerade wieder eine Mail erhalten.
Member: Gersen
Gersen Jul 25, 2014 updated at 11:01:50 (UTC)
Goto Top
Bin eben auch auf das Problem gestoßen. Während "apt-get dist-upgrade" mir keine Pakete zum Installieren/Updaten anbietet, bringt mir der im Code von apticron verwendete Befehl
/usr/bin/apt-get -q -y --ignore-hold --allow-unauthenticated -s dist-upgrade | /bin/grep ^Inst | /usr/bin/cut -d\  -f2 | /usr/bin/sort
eine Liste von Paketen zum Installieren zurück (bei Dir wahrscheinlich die Pakete der Liste von apticron).

Erst wenn ich diese Pakete explizit installiere (apt-get install ...), bleibt der nachfolgende Aufruf á la apticron leer - und es wird keine Mail mehr verschickt.

Kannst Du das mal testen?
Member: bastian42
bastian42 Jul 25, 2014 at 12:06:14 (UTC)
Goto Top
Also der Befehl: /usr/bin/apt-get -q -y --ignore-hold --allow-unauthenticated -s dist-upgrade | /bin/grep ^Inst | /usr/bin/cut -d\ -f2 | /usr/bin/sort

bringt bei mir garnichts zurück
Member: Gersen
Gersen Jul 25, 2014 at 12:15:21 (UTC)
Goto Top
Hast Du mal versucht, mit
apt-get install
evtl. auch
apt-get install --reinstall
eines oder mehrere der Pakete (neu) zu installieren?
Member: bastian42
bastian42 Jul 26, 2014 at 13:16:04 (UTC)
Goto Top
Hallo,

leider hat das reinstall nichts gebracht nichts.

Gruß
Bastian
Member: bastian42
bastian42 Jul 27, 2014 at 12:54:44 (UTC)
Goto Top
Habe nun mal ein Paket deinstalliert und neu installiert.
Leider auch ohne Erfolg
Member: Gersen
Gersen Jul 27, 2014 updated at 13:35:09 (UTC)
Goto Top
Noch ein Versuch. Was bringen
grep "^State: 2" -B 2 /var/lib/aptitude/pkgstates 2>/dev/null |grep "^Package: .*$" |cut -d" " -f 2
und
dpkg --get-selections |grep "hold$" |cut -f1
?
Member: bastian42
bastian42 Jul 28, 2014 at 05:57:36 (UTC)
Goto Top
beides bringt nichts zurück
Member: Gersen
Solution Gersen Jul 28, 2014, updated at Jul 29, 2014 at 08:07:59 (UTC)
Goto Top
Das ist alles sehr merkwürdig...
Im Code von apticron (/usr/sbin/apticron; kann man sich mit Editor anschauen) wird eine Variable PKGNAMES mit dem Ergebnis des o.g. Befehls befüllt:
PKGNAMES=`/usr/bin/apt-get -q -y --ignore-hold --allow-unauthenticated -s dist-upgrade | \
          /bin/grep ^Inst | /usr/bin/cut -d\  -f2 | /usr/bin/sort`
(Zeile 138). Die ist bei Dir ("bringt bei mir garnichts zurück") leer.

Dann wird in Zeile 182 nur unter der Bedingung, dass die Variable nicht leer ist
if [ -n "$PKGNAMES" ] ; then
eine Mail erzeugt.

D.h., irgendwo zwischen Zeile 138 und 182 bekommt die Variable einen Wert. Du kannst versuchen, in dem Bereich durch Debug-Ausgaben von $PKGNAMES in eine Log-Datei herauszufinden, wo/warum das passiert.

Meine Vermutung geht dahin, dass hier apt und aptitude nicht synchron arbeiten (siehe auch hier).
Member: bastian42
bastian42 Jul 28, 2014 at 15:25:30 (UTC)
Goto Top
hmmm.. fehlt mir da was? das ist mein file:


  1. apticron.conf
#
  1. set EMAIL to a space separated list of addresses which will be notified of
  2. impending updates
#
EMAIL="xxxxx"

#
  1. Set DIFF_ONLY to "1" to only output the difference of the current run
  2. compared to the last run (ie. only new upgrades since the last run). If there
  3. are no differences, no output/email will be generated. By default, apticron
  4. will output everything that needs to be upgraded.
#
  1. DIFF_ONLY="1"

#
  1. Set LISTCHANGES_PROFILE if you would like apticron to invoke apt-listchanges
  2. with the --profile option. You should add a corresponding profile to
  3. /etc/apt/listchanges.conf
#
  1. LISTCHANGES_PROFILE="apticron"

#
  1. From hostname manpage: "Displays all FQDNs of the machine. This option
  2. enumerates all configured network addresses on all configured network inter‐
  3. faces, and translates them to DNS domain names. Addresses that cannot be
  4. translated (i.e. because they do not have an appro‐ priate reverse DNS
  5. entry) are skipped. Note that different addresses may resolve to the same
  6. name, therefore the output may contain duplicate entries. Do not make any
  7. assumptions about the order of the output."
#
  1. ALL_FQDNS="1"

#
  1. Set SYSTEM if you would like apticron to use something other than the output
  2. of "hostname -f" for the system name in the mails it generates. This option
  3. overrides the ALL_FQDNS above.
#
  1. SYSTEM="foobar.example.com"

#
  1. Set IPADDRESSNUM if you would like to configure the maximal number of IP
  2. addresses apticron displays. The default is to display 1 address of each
  3. family type (inet, inet6), if available.
#
  1. IPADDRESSNUM="1"

#
  1. Set IPADDRESSES to a whitespace separated list of reachable addresses for
  2. this system. By default, apticron will try to work these out using the
  3. "ip" command
#
  1. IPADDRESSES="192.0.2.1 2001:db8:1:2:3::1"

#
  1. Set NOTIFY_HOLDS="0" if you don't want to be notified about new versions of
  2. packages on hold in your system. The default behavior is downloading and
  3. listing them as any other package.
#
  1. NOTIFY_HOLDS="0"

#
  1. Set NOTIFY_NEW="0" if you don't want to be notified about packages which
  2. are not installed in your system. Yes, it's possible! There are some issues
  3. related to systems which have mixed stable/unstable sources. In these cases
  4. apt-get will consider for example that packages with "Priority:
  5. required"/"Essential: yes" in unstable but not in stable should be installed,
  6. so they will be listed in dist-upgrade output. Please take a look at
  7. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531002#44
#
  1. NOTIFY_NEW="0"

#
  1. Set NOTIFY_NO_UPDATES="0" if you don't want to be notified when there is no
  2. new versions. Set to 1 could assure you that apticron works well.
#
  1. NOTIFY_NO_UPDATES="0"

#
  1. Set CUSTOM_SUBJECT if you want to replace the default subject used in
  2. the notification e-mails. This may help filtering/sorting client-side e-mail.
  3. If you want to use internal vars please use single quotes here. Ex:
  4. $CUSTOM_SUBJECT='[apticron] $SYSTEM: $NUM_PACKAGES package update(s)'
#
  1. CUSTOM_SUBJECT=""

  1. Set CUSTOM_NO_UPDATES_SUBJECT if you want to replace the default subject used
  2. in the no update notification e-mails. This may help filtering/sorting
  3. client-side e-mail.
  4. If you want to use internal vars please use single quotes here. Ex:
  5. $CUSTOM_NO_UPDATES_SUBJECT='[apticron] $SYSTEM: no updates'
#
  1. CUSTOM_NO_UPDATES_SUBJECT=""
Member: Gersen
Gersen Jul 28, 2014, updated at Jul 30, 2014 at 09:06:35 (UTC)
Goto Top
Du redest von der Konfigurationsdatei (/etc/apticron.conf), ich meine -im letzten Post- die Programmdatei (/usr/sbin/apticron).
Member: bastian42
bastian42 Jul 29, 2014 at 08:07:50 (UTC)
Goto Top
ahh ok.. verwechselt sorry.

Das auskommentieren der Zeile

DIFF_ONLY="1"

in /etc/apticron/apticron.conf

hat die Lösung nun gebracht.
Member: bastian42
bastian42 Jul 30, 2014 at 09:06:10 (UTC)
Goto Top
hmmm irgendwie war es nun doch nicht die Lösung. Habe eben wieder eine Mail diesbezüglich erhalten.
Member: Gersen
Gersen Jul 30, 2014 at 10:26:34 (UTC)
Goto Top
Probier doch mal, in der Konfigurationsdatei den Kommentar vor der Option
NOTIFY_NEW="0"
zu entfernen.
Member: bastian42
bastian42 Jul 31, 2014 at 10:41:34 (UTC)
Goto Top
Hat leider auch keinen Erfolg gebracht.
Member: Gersen
Gersen Aug 04, 2014 updated at 13:02:30 (UTC)
Goto Top
Im unstable-Zweig von Debian ist heute ein Update für apticron aufgetaucht (Version 1.1.56).

Es behandelt u.a. ein Problem mit dem Anzeigen von Updates, die per Aptitude auf HOLD stehen (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707230).

Wenn das Update in "stable" ankommt, kannst Du ja testen, ob es Dein Problem behebt. Hinweis: Die Option
NOTIFY_HOLDS="0"
muss dazu in apticron.conf aktiv sein.