Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: New logrotate errors in journal.

  1. #1

    Default New logrotate errors in journal.

    I'm not sure what to check next, so any suggestions will be appreciated. Here's the journal history and errors:
    Code:
    > journalctl -p err -u logrotate.service
    Sep 06 00:00:02 Mobile-PC systemd[1]: Failed to start Rotate log files.
    -- Boot ac535881d63e4741a64e81cbb73e153a --
    Sep 07 04:45:13 Mobile-PC systemd[1]: Failed to start Rotate log files.
    -- Boot 35f3b6fda0984c4cb85d380f76bf607e --
    Sep 08 02:48:29 Mobile-PC systemd[1]: Failed to start Rotate log files.
    -- Boot acb8ef636b604f88bdc345ec5436fd8c --
    Sep 09 07:50:22 Mobile-PC systemd[1]: Failed to start Rotate log files.
    -- Boot 0e96e0a1f82a47668f52ac8b4f4c9625 --
    Sep 10 07:25:37 Mobile-PC systemd[1]: Failed to start Rotate log files.
    
    > journalctl -b ac535881d63e4741a64e81cbb73e153a -u logrotate.service
    Sep 07 04:45:13 Mobile-PC systemd[1]: Starting Rotate log files...
    Sep 07 04:45:13 Mobile-PC sh[1185]: error: zypp-history.lr:1 duplicate log entry for /var/log/zypp/history
    Sep 07 04:45:13 Mobile-PC sh[1185]: error: found error in file zypp-history.lr, skipping
    Sep 07 04:45:13 Mobile-PC systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
    Sep 07 04:45:13 Mobile-PC systemd[1]: logrotate.service: Failed with result 'exit-code'.
    Sep 07 04:45:13 Mobile-PC systemd[1]: Failed to start Rotate log files.
    I modified the contents of /etc/logrotate.d/zypp-history.lr over a year ago, but the error just started.
    Code:
    > cat /etc/logrotate.d/zypp-history.lr
    
    /var/log/zypp/history {
        compress
        dateext
        notifempty
        missingok
        nocreate
    
        maxage 3654
        rotate 9
        size 100M
    }
    Thanks,
    Gene

  2. #2
    Join Date
    Sep 2012
    Posts
    8,218

    Default Re: New logrotate errors in journal.

    Quote Originally Posted by Gene_S View Post
    I'm not sure what to check next
    /usr/etc/logrotate.d

  3. #3

    Default Re: New logrotate errors in journal.

    It's unchanged since installation:

    Code:
    > cat /usr/etc/logrotate.d/zypper.lr 
    
    /var/log/zypper.log {
        compress
        dateext
        notifempty
        missingok
        nocreate
    
        maxage 60
        rotate 99
        size 10M
    }
    Gene

  4. #4
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    4,352
    Blog Entries
    5

    Default Re: New logrotate errors in journal.

    Quote Originally Posted by Gene_S View Post
    I'm not sure what to check next, so any suggestions will be appreciated. Here's the journal history and errors:
    Code:
    > journalctl -p err -u logrotate.service
    Sep 06 00:00:02 Mobile-PC systemd[1]: Failed to start Rotate log files.
    -- Boot ac535881d63e4741a64e81cbb73e153a --
    Sep 07 04:45:13 Mobile-PC systemd[1]: Failed to start Rotate log files.
    -- Boot 35f3b6fda0984c4cb85d380f76bf607e --
    Sep 08 02:48:29 Mobile-PC systemd[1]: Failed to start Rotate log files.
    -- Boot acb8ef636b604f88bdc345ec5436fd8c --
    Sep 09 07:50:22 Mobile-PC systemd[1]: Failed to start Rotate log files.
    -- Boot 0e96e0a1f82a47668f52ac8b4f4c9625 --
    Sep 10 07:25:37 Mobile-PC systemd[1]: Failed to start Rotate log files.
    
    > journalctl -b ac535881d63e4741a64e81cbb73e153a -u logrotate.service
    Sep 07 04:45:13 Mobile-PC systemd[1]: Starting Rotate log files...
    Sep 07 04:45:13 Mobile-PC sh[1185]: error: zypp-history.lr:1 duplicate log entry for /var/log/zypp/history
    Sep 07 04:45:13 Mobile-PC sh[1185]: error: found error in file zypp-history.lr, skipping
    Sep 07 04:45:13 Mobile-PC systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
    Sep 07 04:45:13 Mobile-PC systemd[1]: logrotate.service: Failed with result 'exit-code'.
    Sep 07 04:45:13 Mobile-PC systemd[1]: Failed to start Rotate log files.
    I modified the contents of /etc/logrotate.d/zypp-history.lr over a year ago, but the error just started.
    Code:
    > cat /etc/logrotate.d/zypp-history.lr
    
    /var/log/zypp/history {
        compress
        dateext
        notifempty
        missingok
        nocreate
    
        maxage 3654
        rotate 9
        size 100M
    }
    Thanks,
    Gene
    Code:
    erlangen:~ # rpm -ql libzypp|grep /etc/ 
    /etc/zypp 
    /etc/zypp/credentials.d 
    /etc/zypp/multiversion.d 
    /etc/zypp/needreboot 
    /etc/zypp/needreboot.d 
    /etc/zypp/repos.d 
    /etc/zypp/services.d 
    /etc/zypp/systemCheck 
    /etc/zypp/systemCheck.d 
    /etc/zypp/vars.d 
    /etc/zypp/vendors.d 
    /etc/zypp/zypp.conf 
    /usr/etc/logrotate.d/zypp-history.lr 
    erlangen:~ #
    
    Code:
    erlangen:~ # cat /usr/etc/logrotate.d/zypp-history.lr 
    /var/log/zypp/history { 
        compress 
        dateext 
        notifempty 
        missingok 
        nocreate 
    
        maxage 1827 
        rotate 99 
        size 10M 
    } 
    erlangen:~ #
    openSUSE Tumbleweed, KDE Plasma, Blogs/KeepItSimple, i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), 5600X, 5700U (2022)

  5. #5
    Join Date
    Sep 2013
    Location
    Norfolk, UK
    Posts
    2,402

    Default Re: New logrotate errors in journal.

    Quote Originally Posted by Gene_S View Post
    Code:
    Sep 07 04:45:13 Mobile-PC sh[1185]: error: zypp-history.lr:1 duplicate log entry for /var/log/zypp/history
    You have zypp/zyppers *.lr files in two locations:

    /etc/logrotate.d/
    /usr/etc/logrotate.d/

    Remove them from one of them, probably "/etc/logrotate.d/" as with the usr merge "/usr/etc/logrotate.d/" will be the future location.
    Regards, Paul

  6. #6

    Default Re: New logrotate errors in journal.

    Thanks! I created that file a very long time ago, before the switch to /usr/etc. I wonder why it took until Sep. 6 for it to become a problem.

    Gene

  7. #7
    Join Date
    Sep 2013
    Location
    Norfolk, UK
    Posts
    2,402

    Default Re: New logrotate errors in journal.

    Quote Originally Posted by Gene_S View Post
    ... I wonder why it took until Sep. 6 for it to become a problem.
    I believe logrotate only recently switched to supporting "/usr/etc/logrotate.d/"
    Regards, Paul

  8. #8
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    4,352
    Blog Entries
    5

    Default Re: New logrotate errors in journal.

    Quote Originally Posted by tannington View Post
    I believe logrotate only recently switched to supporting "/usr/etc/logrotate.d/"
    Code:
    erlangen:~ # grep logrotate /var/log/zypp/history 
    2022-09-02 16:58:14|install|logrotate|3.20.1-2.2|x86_64||oss|e2716cb9a659df95828c5df08d71a6ec188f306733276a45ca2c66c79183a660| 
    erlangen:~ #
    From "rpm -q --changelog logrotate":
    Code:
    * Thu Feb 24 2022 Stefan Schubert <schubi@suse.de> 
    - Added own logrotate.service file in order to define a new order 
      of parsed config files: 
      /usr/etc/logrotate.conf   Default configuration file defined by 
        the vendor. 
      /usr/etc/logrotate.d/*    Directory for additional configuration 
        files defined by the vendor. 
      /etc/logrotate.conf       Default configuration file defined by 
        the administrator. (optional) 
      /etc/logrotate.d/*        Directory for additional configuration 
        files defined by the administrator. 
        (optional)
    openSUSE Tumbleweed, KDE Plasma, Blogs/KeepItSimple, i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), 5600X, 5700U (2022)

  9. #9
    Join Date
    Sep 2012
    Posts
    8,218

    Default Re: New logrotate errors in journal.

    Quote Originally Posted by Gene_S View Post
    I wonder why it took until Sep. 6 for it to become a problem.
    To answer the history of your updates must be known.

    But that is not really interesting. What is - your case shows that logrotate does not play well with /usr/etc and it is impossible to selectively change some entries. On your place I would certainly open bug report. This is regression. If you now create configuration under /etc for the same logfile as already exists under /usr/etc you get an error; and if you change /usr/etc it will be overwritten on update. In the past changes in /etc at least were preserved.

  10. #10
    Join Date
    Sep 2012
    Posts
    8,218

    Default Re: New logrotate errors in journal.

    Quote Originally Posted by Gene_S View Post
    I wonder why it took until Sep. 6 for it to become a problem.
    Code:
    bor@tw:~> rpm -q --changelog libzypp
    * Fri Sep 02 2022 ma@suse.de
    - UsrEtc: Store logrotate files in %{_distconfdir} if defined
      (fixes #402)

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •