Projet

Général

Profil

Actions

Demande #5958

fermé

service failure: logrotate.service@{virola,calamus} (duplicate log entry for /var/log/iptraf/*.log)

Ajouté par Pierre-Louis Bonicoli il y a plus de 2 ans. Mis à jour il y a plus de 2 ans.

Statut:
Résolu
Priorité:
Normale
Catégorie:
-
Version cible:
Début:
25/08/2022
Echéance:
% réalisé:

100%

Temps estimé:
Temps passé:
Difficulté:
2 Facile

Description

# systemctl status logrotate.service 
● logrotate.service - Rotate log files
     Loaded: loaded (/lib/systemd/system/logrotate.service; static)
     Active: failed (Result: exit-code) since Thu 2022-08-25 00:00:09 CEST; 9h ago
TriggeredBy: ● logrotate.timer
       Docs: man:logrotate(8)
             man:logrotate.conf(5)
    Process: 614003 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=1/FAILURE)
   Main PID: 614003 (code=exited, status=1/FAILURE)
        CPU: 61ms

Aug 25 00:00:01 virola.april.org systemd[1]: Starting Rotate log files...
Aug 25 00:00:02 virola.april.org logrotate[614003]: error: iptraf-ng:2 duplicate log entry for /var/log/iptraf/*.log
Aug 25 00:00:02 virola.april.org logrotate[614003]: error: found error in file iptraf-ng, skipping
Aug 25 00:00:09 virola.april.org systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
Aug 25 00:00:09 virola.april.org systemd[1]: logrotate.service: Failed with result 'exit-code'.
Aug 25 00:00:09 virola.april.org systemd[1]: Failed to start Rotate log files.

Mis à jour par Pierre-Louis Bonicoli il y a plus de 2 ans

  • Statut changé de Nouveau à Résolu
  • % réalisé changé de 0 à 100

iptraf transitional dummy package has been removed in order to solve this issue:

# dpkg -S /etc/logrotate.d/iptraf*
iptraf: /etc/logrotate.d/iptraf
iptraf-ng: /etc/logrotate.d/iptraf-ng
# apt policy iptraf
iptraf:
  Installed: 1:1.1.4-6
  Candidate: 1:1.1.4-6
  Version table:
 *** 1:1.1.4-6 100
        100 /var/lib/dpkg/status
# apt policy iptraf-ng
iptraf-ng:
  Installed: 1:1.2.1-1
  Candidate: 1:1.2.1-1
  Version table:
 *** 1:1.2.1-1 500
        500 http://ftp.fr.debian.org/debian bullseye/main amd64 Packages
        100 /var/lib/dpkg/status
# apt show iptraf
...
Description: transitional package to iptraf-ng
...
# apt purge iptraf # remove transitional dummy package
# systemctl restart logrotate.service 
# systemctl status logrotate.service 
● logrotate.service - Rotate log files
     Loaded: loaded (/lib/systemd/system/logrotate.service; static)
     Active: inactive (dead) since Thu 2022-08-25 09:26:38 CEST; 56s ago
TriggeredBy: ● logrotate.timer
       Docs: man:logrotate(8)
             man:logrotate.conf(5)
    Process: 702747 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=0/SUCCESS)
   Main PID: 702747 (code=exited, status=0/SUCCESS)
        CPU: 31ms

Aug 25 09:26:37 virola.april.org systemd[1]: Starting Rotate log files...
Aug 25 09:26:38 virola.april.org systemd[1]: logrotate.service: Succeeded.
Aug 25 09:26:38 virola.april.org systemd[1]: Finished Rotate log files.

Mis à jour par Pierre-Louis Bonicoli il y a plus de 2 ans

  • Sujet changé de service failure: logrotate.service@virola (duplicate log entry for /var/log/iptraf/*.log) à service failure: logrotate.service@{virola,calamus} (duplicate log entry for /var/log/iptraf/*.log)

The same fix has been applied on calamus host.

Mis à jour par Pierre-Louis Bonicoli il y a plus de 2 ans

other hosts were impacted too:

$ cat check.yml
- hosts: all
  tasks:
    - stat:
        path: '{{ item }}'
        get_checksum: no
        get_attributes: no
        get_mime: no
      loop:
        - /etc/logrotate.d/iptraf
        - /etc/logrotate.d/iptraf-ng
      register: r
    - assert:
        that:
          - "r.results|map(attribute='stat.exists') is not all" 
        fail_msg: 'Please purge iptraf from {{ ansible_host }}'
$ ansible-playbook -i ansible_hosts check_iptraf.yml
[...]
PLAY RECAP ****************************************************************
adl                        : ok=3    changed=0    unreachable=0    failed=0
admin                      : ok=3    changed=0    unreachable=0    failed=0
agir                       : ok=3    changed=0    unreachable=0    failed=0
bastion                    : ok=2    changed=0    unreachable=0    failed=1
bots                       : ok=3    changed=0    unreachable=0    failed=0
calamus.april.org          : ok=3    changed=0    unreachable=0    failed=0
candidatsbe                : ok=0    changed=0    unreachable=1    failed=0
candidatsfr                : ok=2    changed=0    unreachable=0    failed=1
dns                        : ok=2    changed=0    unreachable=0    failed=1
drupal-test                : ok=0    changed=0    unreachable=1    failed=0
drupal6                    : ok=3    changed=0    unreachable=0    failed=0
dtc                        : ok=2    changed=0    unreachable=0    failed=1
galanga.april.org          : ok=3    changed=0    unreachable=0    failed=0
lamp                       : ok=2    changed=0    unreachable=0    failed=1
mail                       : ok=3    changed=0    unreachable=0    failed=0
mumble                     : ok=2    changed=0    unreachable=0    failed=1
opium.april.org            : ok=2    changed=0    unreachable=0    failed=1
pad                        : ok=2    changed=0    unreachable=0    failed=1
pouet                      : ok=3    changed=0    unreachable=0    failed=0
republique-numerique       : ok=2    changed=0    unreachable=0    failed=1
scm                        : ok=2    changed=0    unreachable=0    failed=1
sympa                      : ok=3    changed=0    unreachable=0    failed=0
virola.april.org           : ok=3    changed=0    unreachable=0    failed=0
webchat                    : ok=3    changed=0    unreachable=0    failed=0

iptraf has been purged from the failed hosts.

Actions

Formats disponibles : Atom PDF