CRON Daemon error

Discussion in 'General' started by Donno, Sep 24, 2019.

  1. Donno

    Donno Member

    Hi does anyone know what does this error mean on my ISPConfig 3 Server :

    /etc/cron.daily/logrotate:
    error: bind:2 lines must begin with a keyword or a filename (possibly in double quotes)
    error: bind:3 lines must begin with a keyword or a filename (possibly in double quotes)
    error: bind:4 lines must begin with a keyword or a filename (possibly in double quotes)
    error: bind:5 lines must begin with a keyword or a filename (possibly in double quotes)
    error: bind:6 lines must begin with a keyword or a filename (possibly in double quotes)
    error: bind:7 lines must begin with a keyword or a filename (possibly in double quotes)
    error: bind:8 lines must begin with a keyword or a filename (possibly in double quotes)
    error: bind:9 lines must begin with a keyword or a filename (possibly in double quotes)
    error: bind:10 lines must begin with a keyword or a filename (possibly in double quotes)

    /etc/cron.daily/logrotate: [File Content]

    #!/bin/sh

    # Clean non existent log file entries from status file
    cd /var/lib/logrotate
    test -e status || touch status
    head -1 status > status.clean
    sed 's/"//g' status | while read logfile date
    do
    [ -e "$logfile" ] && echo "\"$logfile\" $date"
    done >> status.clean
    mv status.clean status

    test -x /usr/sbin/logrotate || exit 0
    /usr/sbin/logrotate /etc/logrotate.conf
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What operating system is this? Where do these error messages appear and under which circumstances?
     
  3. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Do you have an /etc/logrotate.d/bind file? What are the contents? (Not just visible contents, but run it through "od -c" and see if there are any non-printable binary chars.)
     
  4. Donno

    Donno Member

    Using Ubuntu 18.04 server i migrated ISPconfig a few months ago and receive the error from Cron Daemon [email protected]

    /etc/logrotate.d/bind [content]
    4
    5
    6
    7
    8
    9
    10
    11
    12
    /var/log/bind/bind.log {
    daily
    missingok
    rotate 7
    compress
    delaycompress
    notifempty
    create 644 bind bind
    postrotate
    /usr/sbin/invoke-rc.d bind9 reload > /dev/null
    endscript
    }

    The 4-12 lines should not be there,right ? There are also no /var/log/bind/bind.log file
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    It would be more clear if you posted the ls listing in CODE tags and included the ls command. My directory looks like this:
    Code:
    # LANG=C ls -lh /etc/logrotate.d/
    total 88K
    -rw-r--r-- 1 root root  433 Sep 19  2017 apache2
    -rw-r--r-- 1 root root  173 Jul 14  2017 apt
    -rw-r--r-- 1 root root   82 May 26  2018 certbot
    -rw-r--r-- 1 root root  382 Nov 13  2017 clamav-daemon
    -rw-r--r-- 1 root root  409 Nov 13  2017 clamav-freshclam
    -rw-r--r-- 1 root root  107 Sep 20  2016 dbconfig-common
    -rw-r--r-- 1 root root  232 Jun 10  2015 dpkg
    -rw-r--r-- 1 root root  313 Apr 17  2017 fail2ban
    drwxr-xr-x 3 root root 4.0K Nov 13  2017 httpd-prerotate
    -rw-r--r-- 1 root root 1.6K Sep 13  2016 mailman
    -rw-r--r-- 1 root root  802 Aug 10  2017 mysql-server
    -rw-r--r-- 1 root root  155 Oct 27  2017 php5.6-fpm
    -rw-r--r-- 1 root root  155 May 11  2017 php7.0-fpm
    -rw-r--r-- 1 root root  155 Sep 10  2018 php7.1-fpm
    -rw-r--r-- 1 root root  155 Mar  7  2019 php7.2-fpm
    -rw-r--r-- 1 root root  155 Mar  7  2019 php7.3-fpm
    -rw-r--r-- 1 root root 1014 Dec  8  2016 pure-ftpd-common
    -rw-r--r-- 1 root root  162 Jul 12  2017 rkhunter
    -rw-r--r-- 1 root root  215 Nov  9  2017 roundcube-core
    -rw-r--r-- 1 root root  515 Jan 19  2017 rsyslog
    -rw-r--r-- 1 root root  178 Aug  7  2014 ufw
    -rw-r--r-- 1 root root  235 Dec 11  2016 unattended-upgrades
    
    The stuff you posted makes me suspect some how the output of some command that listed contents of logrotate configuration file got handled by a command that touched files. So the files are all bogus and could be removed.
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Another interpretation occurred to me: whas the stuff you posted contents of file /etc/logrotate.d/bind?
     
  7. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    That was the way I read it.

    Correct, try just removing those.

    Perhaps that will show up after fixing log rotation. You might also make sure the /var/log/bind/ directory exists.
     
    Last edited: Sep 30, 2019
  8. Donno

    Donno Member

    After removing The 4-12 lines the logs started showing up in a few days and the problem is solved :) Thanks for the help
     
    till likes this.

Share This Page