Salut,
(Cf.Checkrestart, étrange non ?) Autre fil me semble t-il … ![]()
ps: je cumule ces jours derniers … ![]()
Bon pour cette fois, en tuant ce processus avec htop.
These processes do not seem to have an associated init script to restart them:
aptitude:
23520 /usr/bin/aptitude-curses
24522 /usr/bin/aptitude-curses
root@machine1:~# uptime
09:36:21 up 15:17, 4 users, load average: 2.50, 2.48, 2.51
root@machine1:~# checkrestart
Found 0 processes using old versions of upgraded files
root@machine1:~# uptime
09:37:46 up 15:18, 4 users, load average: 1.73, 2.32, 2.46
root@machine1:~#
Ce même processus qui revient au quotidien
depuis quelques jours et que je dois killer, sinon j’ai droits à ceci, aptitude qui coince.
Et pour raisons :
[quote]root@machine1:~# aptitude update
E: Impossible d’obtenir le verrou /var/lib/dpkg/lock - open (11: Ressource temporairement non disponible)
E: Impossible de verrouiller le répertoire d’administration (/var/lib/dpkg/). Il est possible qu’un autre processus l’utilise.
W: Impossible de verrouiller le fichier cache : cela est en général dû à une installation simultanée de paquets avec dpkg ou un autre outil comme APT. Ouverture en mode lecture seule : AUCUNE des modifications de l’état des paquets que vous pourrez faire ne sera conservée.
Atteint ftp.fr.debian.org lenny Release.gpg
Ign ftp.fr.debian.org/debian/ lenny/contrib Translation-fr
…
Atteint ftp.fr.debian.org experimental/non-free amd64 Packages
E: Impossible d’obtenir le verrou /var/lib/dpkg/lock - open (11: Ressource temporairement non disponible)
E: Impossible de verrouiller le répertoire d’administration (/var/lib/dpkg/). Il est possible qu’un autre processus l’utilise.
E: Impossible de reconstruire le cache des paquets
E: Impossible d’obtenir le verrou /var/lib/dpkg/lock - open (11: Ressource temporairement non disponible)
E: Impossible de verrouiller le répertoire d’administration (/var/lib/dpkg/). Il est possible qu’un autre processus l’utilise.
W: Impossible de verrouiller le fichier cache : cela est en général dû à une installation simultanée de paquets avec dpkg ou un autre outil comme APT. Ouverture en mode lecture seule : AUCUNE des modifications de l’état des paquets que vous pourrez faire ne sera conservée.
root@machine1:~#[/quote]
Une fois ce processus killé (/usr/bin/aptitude dist-upgrade -d -y -o APT::Get::Show-Upgraded=true) je peux lancer update …
En recherchant cette expression “APT::Get::Show-Upgraded=true”
[code]/var/lib/cron-apt/-etc-cron-apt-config/mailchanges/3-download-dist-upgrade-d-y_-o_APT::Get::Show-Upgraded=true
/var/lib/cron-apt/-etc-cron-apt-config/mailchanges/5-install-dist-upgrade-q-y_-o_APT::Get::Show-Upgraded=true_-o_Dir::Etc::sourceslist=-etc-apt-sources.list.d-sources.list_cron-apt_-o_Dir::Etc::sourceparts=noexistent_-o_DPkg::Options::=–force-confdef_-o_DPkg::Options::=–force-confold
[/code]
Se ne sont pas mes petits doigts velus qui ont trifouillés la dedans! ![]()
[quote]$ cat /var/lib/cron-apt/-etc-cron-apt-config/mailchanges/3-download-dist-upgrade-d-y_-o_APT::Get::Show-Upgraded=true
CRON-APT LINE: /usr/bin/aptitude dist-upgrade -d -y -o APT::Get::Show-Upgraded=true
Reading package lists…
Building dependency tree…
Reading state information…
Reading extended state information…
Initializing package states…
Reading task descriptions…
Running prelink, please wait…
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB
localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB
localepurge: Disk space freed in /usr/share/omf: 0 KiB
localepurge: Disk space freed in /usr/share/doc/kde/HTML: 0 KiB
Total disk space freed by localepurge: 0 KiB
Running prelink, please wait…
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB
localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB
localepurge: Disk space freed in /usr/share/omf: 0 KiB
localepurge: Disk space freed in /usr/share/doc/kde/HTML: 0 KiB
Total disk space freed by localepurge: 0 KiB
Running prelink, please wait…
…[/quote]
68481 lignes comme celles-ci … ???
Ce qui me ramène peut être au fichier /etc/cron-apt/config ?
Mon mien
de /etc/cron-apt/config sur lequel je n’ai pas mis les mains depuis des lustres! ![]()
tout compte fait, je ne sais pas trop, si seulement j’y ai touché une seule fois.
[code]# Configuration for cron-apt.
The cron config is located in /etc/cron.d/cron-apt
This shows the defaults.
The command used to execute all actions. By default, apt-get is used.
Change this to /usr/bin/aptitude to use aptitude instead, which will
resolve changed Recommends (and Suggests as well, if aptitude is so
configured). You can also set other utilities (especially useful in the
config.d directory) so set some completely different tool.
OBSERVE that this tool is indended for apt-get and tools like aptitude do not
have full support for noninteractive upgrades. You may have to tune options
to not create infinit logfiles for example.
APTCOMMAND=/usr/bin/apt-get
APTCOMMAND=/usr/bin/aptitude
APTCOMMAND=/usr/bin/apt-file
A path is needed for this to work. This is the default PATH.
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
The random sleep time in seconds. This is used to prevent clients from
accessing the APT sources all at the same time and overwhelming them.
Default is 3600 seconds which means one hour.
RUNSLEEP=3600
The minimum amount of disc space (in kB) that need to exist on the
device where temporary files are created (mktemp) to allow cron-apt
to run. If set to 0 it will always continue even if empty.
MINTMPDIRSIZE=10
The directory where the actions is stored.
ACTIONDIR="/etc/cron-apt/action.d"
The directory where configuration per action is stored. The message file
must have the same name as the action file.
ACTIONCONFDIR="/etc/cron-apt/config.d"
The directory where messages that will be prepended to the email that is
sent (per action) is stored. The message file must have the same name as
the action file.
MAILMSGDIR="/etc/cron-apt/mailmsg.d"
The directory where messages that will be prepended to text that is
sent (per action) to syslog. The message file must have the same name as
the action file.
SYSLOGMSGDIR="/etc/cron-apt/syslogmsg.d"
The directory where messages that will be prepended to the error message
(per action) is stored. The message file must have the same name as
the action file.
ERRORMSGDIR="/etc/cron-apt/errormsg.d"
The directory where messages that will be prepended to the log (debug)
message (per action) is stored. The message file must have the same name as
the action file.
LOGMSGDIR="/etc/cron-apt/logmsg.d"
The directory where messages that will be prepended to the mail message
(per MAILON type) is stored. The message file must have the same name as
the $MAILON directive.
MAILONMSGSDIR="/etc/cron-apt/mailonmsgs"
The directory where messages that will be prepended to the syslog message
(per SYSLOGON type) is stored. The message file must have the same name as
the $SYSLOGON directive.
SYSLOGONMSGSDIR="/etc/cron-apt/syslogonmsgs"
Value: “” (warn if dotlockfile not installed)
“nowarn” (don’t give warning if dotlockfile not installed)
NOLOCKWARN=""
The file that contains error messages.
ERROR="/var/log/cron-apt/error"
The file that contains current run information
when still running the script.
TEMP="/var/log/cron-apt/temp"
The logfile (for debugging). Use syslog for normal logging.
LOG="/var/log/cron-apt/log"
The mail file.
MAIL="/var/log/cron-apt/mail"
The email address to send mail to.
MAILTO=“root”
When to send email about the cron-apt results.
Value: error (send mail on error runs)
upgrade (when packages are upgraded)
changes (mail when change in output from an action)
output (send mail when output is generated)
always (always send mail)
(else never send mail)
MAILON=“error”
Value: error (syslog on error runs)
upgrade (when packages is upgraded)
changes (syslog when change in output from an action)
output (syslog when output is generated)
always (always syslog)
(else never syslog)
SYSLOGON=“upgrade”
Value: error (exit on error only)
(else never exit)
EXITON=“error”
Value: verbose (log everything)
always (always log)
upgrade (when packages is upgraded)
changes (log when change in output from an action)
output (log when output is generated)
error (log error runs only)
(else log nothing)
DEBUG=“output”
What to do with the diff when *ON=changes.
Value: prepend (prepend to the output)
append (append to the output)
only (only show the diff, not the output itself)
(else do nothing)
DIFFONCHANGES=prepend
General apt options that will be passed to all APTCOMMAND calls.
Use “-o quiet” instead of “-q” for aptitude compatibility.
OPTIONS="-o quiet=1"
You can for example add an additional sources.list file here.
OPTIONS="-o quiet=1 -o Dir::Etc::SourceList=/etc/apt/security.sources.list"
You can also set an alternative sources.list file here.
OPTIONS="-o quiet=1 -o Dir::Etc::SourceList=/etc/apt/security.sources.list -o Dir::Etc::SourceParts="/dev/null""
If you want to allow unauthenticated and untrusted packages add the
following to your options directive.
OPTIONS="-o quiet=1 -o APT::Get::AllowUnauthenticated=true -o aptitude::Cmdline::ignore-trust-violations=yes"
To limit the bandwidth used use the following line. This example limit the
bandwidth usage to 25 kB/s.
OPTIONS="-o Acquire::http::Dl-Limit=25"
additional APT configuration file that is loaded first. This can be set in
order to use a completely different APT configuration for cron-apt. See the
/usr/share/doc/cron-apt/README and apt.conf(5) for details
export APT_CONFIG=/etc/apt/cron.apt.paths
Do not run the command, if there is an error in the previous run (default).
Value: error (do not run if there is an error on last run)
(else always run, remove previous error file and run)
DONTRUN=""
If this file exist cron-apt will silently exit.
REFRAINFILE=/etc/cron-apt/refrain
If this is non-empty, it will be used as the host name in subjects of
generated e-mail messages. If this is empty, the output of uname -n
will be used.
HOSTNAME=“machine1”
Ignore lines matching this regexp to determine whether changes occurred
for MAILON=“changes”. If empty no lines will be ignored.
Suggested value for aptitude:
DIFFIGNORE="^(Get:[[:digit:]]+|Hit|Ign|Del|Fetched|Freed|Reading)[[:space:]]"
Suggested value for apt-get:
DIFFIGNORE="^(Get:[[:digit:]]+|Hit|Ign)[[:space:]]"
Default:
DIFFIGNORE=""
Support for mail headers. You can add up to 9 headers to the mail sent.
This below example can be used for OTRS.
The default is no headers added.
XHEADER1=“X-OTRS-Queue: updates”
XHEADER2=“X-OTRS-Loop: true”
…
Umask for the files created by the APT command used. In all other cases
umask 077 will be used.
UMASK_APT=“022”
APTCOMMAND=/usr/bin/aptitude
MAILTO="mon_adresse_labas@mail.com"
MAILON=“upgrade”
[/code]
Cela vous parle t’il ? ![]()
* edit *
Précisions.
rm /var/lib/dpkg/lock
Pas mieux, il me faut à chaque fois (quotidien pour ainsi dire) tuer le processus /usr/bin/aptitude dist-upgrade -d -y -o APT::Get::Show-Upgraded=true
Et aucune session root/user en cours bien sûr! ![]()
Pas de synaptic et compagnie (non installé)
root@machine1:~# ls -l /var/lib/dpkg/lock
-rw-r----- 1 root root 0 13 mars 11:09 /var/lib/dpkg/lock
root@machine1:~#
root@machine1:~# lsof | grep "/var/lib/dpkg/lock"
root@machine1:~#
* edit1 *
impossible-d-ouvrir-le-fichier-verrou-var-lib-dpkg-lock-t6023.html#p55807
À exclure catégoriquement!
de marques et références différentes, dans des lieux différents)


…