apt bzw. unattended-upgrades geht nicht ...

Alle weiteren Dienste, die nicht in die drei oberen Foren gehören.
Antworten
darkx
Beiträge: 33
Registriert: 31.07.2009 14:10:40

apt bzw. unattended-upgrades geht nicht ...

Beitrag von darkx » 28.09.2012 18:36:35

Guten Tag liebe Community,

habe auf 2 verschiedenen Servern (beide Debian Squeeze) ein seltsamen Problem. Habe auf 2 Servern "unattended-upgrades" installiert und auf keiner der beiden möchte der Dienst bzw das Programm laufen.

Man kann zwar via "unattended-upgrades --dry-run" testen und auch sehen, das es funktioniert aber automatisch starten tut es nicht.

Auch habe ich gesehen das in "/etc/cron.daily/" kein apt vorhanden ist, bin mir jetzt nicht 100% sicher, aber sollte da nicht solch eine Datei vorhanden sein?

Hier mal meine Configs:

/etc/apt/apt.conf.d/50unattended-upgrades

Code: Alles auswählen

// Automatically upgrade packages from these (origin, archive) pairs
Unattended-Upgrade::Allowed-Origins {
"${distro_id} stable";
"${distro_id} ${distro_codename}-security";
"${distro_id} ${distro_codename}-updates";
//      "${distro_id} ${distro_codename}-proposed-updates";
};
 
// List of packages to not update
Unattended-Upgrade::Package-Blacklist {
//      "vim";
//      "libc6";
//      "libc6-dev";
//      "libc6-i686";
};
 
// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. The package 'mailx'
// must be installed or anything that provides /usr/bin/mail.
Unattended-Upgrade::Mail "Name@Domain.net";
 
// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
Unattended-Upgrade::Remove-Unused-Dependencies "true";
 
// Automatically reboot *WITHOUT CONFIRMATION* if a
// the file /var/run/reboot-required is found after the upgrade
//Unattended-Upgrade::Automatic-Reboot "false";
 
// Use apt bandwidth limit feature, this example limits the download
// speed to 70kb/sec
//Acquire::http::Dl-Limit "70";
/etc/apt/apt.conf.d/02periodic

Code: Alles auswählen

// Enable the update/upgrade script (0=disable)
APT::Periodic::Enable "1";
 
// Set maximum size of the cache in MB (0=disable)
APT::Periodic::MaxSize "512";
 
// Do "apt-get update" automatically every n-days (0=disable)
APT::Periodic::Update-Package-Lists "1";
 
// Do "apt-get upgrade --download-only" every n-days (0=disable)
APT::Periodic::Download-Upgradeable-Packages "1";
 
// Run the "unattended-upgrade" security upgrade script
// every n-days (0=disabled)
// Requires the package "unattended-upgrades" and will write
// a log in /var/log/unattended-upgrades
APT::Periodic::Unattended-Upgrade "1";
 
// Do "apt-get autoclean" every n-days (0=disable)
APT::Periodic::AutocleanInterval "7";
 
//     Send report mail to root
//     0:  no report             (or null string)
//     1:  progress report       (actually any string)
//     2:  + command outputs     (remove -qq, remove 2>/dev/null, add -d)
//     3:  + trace on
APT::Periodic::Verbose "0";
Ich hoffe es kann mir jemand helfen, bin mit mein Latein echt am Ende und dreh schon fast durch ^^ ...

slu
Beiträge: 2240
Registriert: 23.02.2005 23:58:47

Re: apt bzw. unattended-upgrades geht nicht ...

Beitrag von slu » 28.09.2012 18:38:15

Gruß
slu

Das Server Reinheitsgebot:
Debian Bookworm, sonst nichts.

Stolzer Gewinner der Jessie Release Wette:
https://wiki.debianforum.de/Jessie_Release_Wette#SIEGER

darkx
Beiträge: 33
Registriert: 31.07.2009 14:10:40

Re: apt bzw. unattended-upgrades geht nicht ...

Beitrag von darkx » 28.09.2012 18:54:05

also in meiner Crontab steht folgendes:

Code: Alles auswählen

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
41 * * * * root cd / && run-parts --report /etc/cron.hourly
6 0 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
1 2 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
32 0 4 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
Logdateien werden keine geschrieben, es sei denn man führt "unattended-upgrades" selbst bzw. maunell aus!

Habe jetzt mal auf beiden Server "dpkg-reconfigure unattended-upgrades" ausgeführt und mit JA bestätigt. Mal schauen ob es jetzt geht, melde mich dann noch einmal ;)

Benutzeravatar
r900
Beiträge: 1053
Registriert: 09.10.2011 20:06:11
Lizenz eigener Beiträge: GNU Free Documentation License
Wohnort: Stockholm

Re: apt bzw. unattended-upgrades geht nicht ...

Beitrag von r900 » 28.09.2012 19:05:19

Zu jedem installierten Paket findest du mehr oder weniger ausführliche Informationen unter /usr/share/doc/<paketname>/. In diesem Fall
/usr/share/doc/unattended-upgrades/README hat geschrieben: This script can install security upgrades automatically and
unattended. However, it is not enabled by default. Most users
enable it via the Software Sources programm (available in
System/Administration), which has a simple radiobutton in the UI
for enabling unattended upgrades.

If you would prefer to enable it from the command line, run
"sudo dpkg-reconfigure -plow unattended-upgrades".

darkx
Beiträge: 33
Registriert: 31.07.2009 14:10:40

Re: apt bzw. unattended-upgrades geht nicht ...

Beitrag von darkx » 30.09.2012 17:46:05

Habe das Problem leider immer noch! Habe nun "dpkg-reconfigure unattended-upgrades" und "dpkg-reconfigure -plow unattended-upgrades" ausgeführt und nen Tag gewartet, dennoch ist nichts in den Log-Dateien (/var/log/unattended-upgrades/unattended-upgrades.log) zu finden (also leer).

Ich weiß echt nicht warum das Problem auf 2 Server gleichzeitig ist und ich weiß auch wirklich nicht mehr was ich machen soll :S Habt ihr vllt. noch ne Idee?

Apticron ist auch installiert und funktioniert ohne Probleme! :?

Bin mir nicht sicher ob es Interessant ist aber hier die Dateien die unter "/etc/apt/apt.conf.d/" zu finden sind:

Server1:
01autoremove 02periodic 20auto-upgrades 20listchanges 50unattended-upgrades 70debconf

Server2:
01autoremove 20auto-upgrades 50unattended-upgrades
02periodic 20listchanges 70debconf

darkx
Beiträge: 33
Registriert: 31.07.2009 14:10:40

Re: apt bzw. unattended-upgrades geht nicht ...

Beitrag von darkx » 03.10.2012 14:00:04

Habe jetzt 02periodic nach 10periodic umbenannnt und einfach mal apitcron neu gestartet. Jetzt funktioniert es ... Sehr komisch alles ;) Trotzdem danke an euch allen! :)

Antworten