nextcloudpi icon indicating copy to clipboard operation
nextcloudpi copied to clipboard

Failed to start Rotate log files NC24 - NCP 1.49.0 (feature/php8)

Open zedocrob opened this issue 1 year ago • 2 comments

System information

<--! Paste this in GitHub report -->


NextCloudPi version  v1.49.0
NextCloudPi image    NextCloudPi_08-16-22
OS                   Armbian 22.08.0-trunk Bullseye \l . 5.10.123-meson64 (aarch64)
automount            yes
USB devices          none
datadir              /media/DATAcloud/ncdata/data
data in SD           no
data filesystem      btrfs
data disk usage      836G/3,7T
rootfs usage         4,8G/30G
swapfile             /var/swap
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    24.0.4.1
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          up
Postfix service      up
Internet check       ok
public IP            ***REMOVED SENSITIVE VALUE***
public IP            ***REMOVED SENSITIVE VALUE***
Port check 80        open (ipv4)
Port check 443       open (ipv4)
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              192.168.0.254
Interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               1day

I have a problem with logrotate failling du to this: sept. 07 21:31:48 nextcloudpi armbian-ramlog[166056]: sent 24,143,282 bytes received 739 bytes 6,898,291.71 bytes/sec sept. 07 21:31:48 nextcloudpi armbian-ramlog[166056]: total size is 32,625,705 speedup is 1.35 sept. 07 21:31:49 nextcloudpi logrotate[166092]: error: ufw:4 keyword 'maxsize' not properly separated, found 0x32 sept. 07 21:31:49 nextcloudpi logrotate[166092]: error: found error in /var/log.hdd/ufw.log sept. 07 21:31:49 nextcloudpi logrotate[166092]: , skipping sept. 07 21:31:49 nextcloudpi logrotate[166092]: error: found error in file ufw, skipping sept. 07 21:31:49 nextcloudpi systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE sept. 07 21:31:49 nextcloudpi systemd[1]: logrotate.service: Failed with result 'exit-code'. sept. 07 21:31:49 nextcloudpi systemd[1]: Failed to start Rotate log files. sept. 07 21:31:49 nextcloudpi systemd[1]: logrotate.service: Consumed 2.184s CPU time.

It looks like there's an malformation in ufw.log?: sept. 07 21:31:49 nextcloudpi logrotate[166092]: error: ufw:4 keyword 'maxsize' not properly separated, found 0x32 sept. 07 21:31:49 nextcloudpi logrotate[166092]: error: found error in /var/log.hdd/ufw.log

sudo systemctl start logrotate.service
Job for logrotate.service failed because the control process exited with error code.

When rebooting the server it's starting fine then it stops later

zedocrob avatar Sep 07 '22 19:09 zedocrob

Looks like i found the problem: /etc/logrotate.d/ufw was malformed

/var/log.hdd/ufw.log
{
        rotate 4
        weekly
maxsize2M               #(NOT OK! deleted this line)
        maxsize 2M      #(and ALIGN LIKE THIS)
        missingok
        notifempty
        compress
        delaycompress
        sharedscripts
        postrotate
                invoke-rc.d rsyslog rotate >/dev/null 2>&1 || true
        endscript
}

save the file and restart logrotate.service logrotate.service stops failling now

zedocrob avatar Sep 11 '22 01:09 zedocrob

Thanks for the report! Will be fixed in v1.49.2 or v1.50.0 (depending on how fast I manage to release the latter)

theCalcaholic avatar Sep 14 '22 20:09 theCalcaholic

Should be fixed in v1.50.0

theCalcaholic avatar Sep 26 '22 19:09 theCalcaholic