Error on 2.4.3.beta1+3

Hi Markus,

my test system:

[root@centos z-push]# rpm --query centos-release
centos-release-7-5.1804.el7.centos.2.x86_64

[root@centos z-push]# kopano-cli -V
8.5.9

Z-Push 2.4.3beta1+3.

/var/log/z-push:

[root@centos z-push]# ls -la
total 17
drwxrwx--- 2 root z-push   10 Jun  1 22:20 .
drwxr-xr-x 8 root root     19 Jun  1 17:55 ..
-rw-rw-r-- 1 root z-push    0 Jun  1 22:20 z-push-error.log
-rw-rw-r-- 1 root z-push   20 Jun  1 22:17 z-push-error.log.1.gz
-rw-rw-r-- 1 root z-push  146 Jun  1 20:35 z-push-error.log.2.gz
-rw-rw-r-- 1 root z-push   20 Jun  1 20:33 z-push-error.log.3.gz
-rw-rw-r-- 1 root z-push 5415 Jun  1 22:20 z-push.log
-rw-rw-r-- 1 root z-push  829 Jun  1 22:18 z-push.log.1.gz
-rw-rw-r-- 1 root z-push 1083 Jun  1 20:36 z-push.log.2.gz
-rw-rw-r-- 1 root z-push  230 Jun  1 20:33 z-push.log.3.gz
[root@centos z-push]# logrotate --force /etc/logrotate.d/z-push.lr 
[root@centos z-push]# ls -la
total 14
drwxrwx--- 2 root z-push   12 Jun  1 22:21 .
drwxr-xr-x 8 root root     19 Jun  1 17:55 ..
-rw-rw-r-- 1 root z-push    0 Jun  1 22:21 z-push-error.log
-rw-rw-r-- 1 root z-push   20 Jun  1 22:20 z-push-error.log.1.gz
-rw-rw-r-- 1 root z-push   20 Jun  1 22:17 z-push-error.log.2.gz
-rw-rw-r-- 1 root z-push  146 Jun  1 20:35 z-push-error.log.3.gz
-rw-rw-r-- 1 root z-push   20 Jun  1 20:33 z-push-error.log.4.gz
-rw-rw-r-- 1 root z-push    0 Jun  1 22:21 z-push.log
-rw-rw-r-- 1 root z-push  920 Jun  1 22:20 z-push.log.1.gz
-rw-rw-r-- 1 root z-push  829 Jun  1 22:18 z-push.log.2.gz
-rw-rw-r-- 1 root z-push 1083 Jun  1 20:36 z-push.log.3.gz
-rw-rw-r-- 1 root z-push  230 Jun  1 20:33 z-push.log.4.gz

Then I accessed the /Microsoft-Server-ActiveSync page a couple of times to get things logged:

[root@centos z-push]# ls -la
total 20
drwxrwx--- 2 root z-push   12 Jun  1 22:21 .
drwxr-xr-x 8 root root     19 Jun  1 17:55 ..
-rw-rw-r-- 1 root z-push    0 Jun  1 22:21 z-push-error.log
-rw-rw-r-- 1 root z-push   20 Jun  1 22:20 z-push-error.log.1.gz
-rw-rw-r-- 1 root z-push   20 Jun  1 22:17 z-push-error.log.2.gz
-rw-rw-r-- 1 root z-push  146 Jun  1 20:35 z-push-error.log.3.gz
-rw-rw-r-- 1 root z-push   20 Jun  1 20:33 z-push-error.log.4.gz
-rw-rw-r-- 1 root z-push 5415 Jun  1 22:21 z-push.log
-rw-rw-r-- 1 root z-push  920 Jun  1 22:20 z-push.log.1.gz
-rw-rw-r-- 1 root z-push  829 Jun  1 22:18 z-push.log.2.gz
-rw-rw-r-- 1 root z-push 1083 Jun  1 20:36 z-push.log.3.gz
-rw-rw-r-- 1 root z-push  230 Jun  1 20:33 z-push.log.4.gz
[root@centos z-push]# logrotate --force /etc/logrotate.d/z-push.lr 
[root@centos z-push]# ls -la
total 13
drwxrwx--- 2 root z-push   12 Jun  1 22:21 .
drwxr-xr-x 8 root root     19 Jun  1 17:55 ..
-rw-rw-r-- 1 root z-push    0 Jun  1 22:21 z-push-error.log
-rw-rw-r-- 1 root z-push   20 Jun  1 22:21 z-push-error.log.1.gz
-rw-rw-r-- 1 root z-push   20 Jun  1 22:20 z-push-error.log.2.gz
-rw-rw-r-- 1 root z-push   20 Jun  1 22:17 z-push-error.log.3.gz
-rw-rw-r-- 1 root z-push  146 Jun  1 20:35 z-push-error.log.4.gz
-rw-rw-r-- 1 root z-push    0 Jun  1 22:21 z-push.log
-rw-rw-r-- 1 root z-push  905 Jun  1 22:21 z-push.log.1.gz
-rw-rw-r-- 1 root z-push  920 Jun  1 22:20 z-push.log.2.gz
-rw-rw-r-- 1 root z-push  829 Jun  1 22:18 z-push.log.3.gz
-rw-rw-r-- 1 root z-push 1083 Jun  1 20:36 z-push.log.4.gz

Everything (KC, database, Z-Push, apache) is on the same system.

Could you also post your logrotate.conf?

Manfred

Like is said everything vanilla ;)

[root@kopano ~]# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# use date as a suffix of the rotated file
dateext

# uncomment this if you want your log files compressed
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp and btmp -- we'll rotate them here
/var/log/wtmp {
    monthly
    create 0664 root utmp
        minsize 1M
    rotate 1
}

/var/log/btmp {
    missingok
    monthly
    create 0600 root utmp
    rotate 1
}

# system-specific logs may be also be configured here.
[root@kopano ~]# rpm -q centos-release
centos-release-7-5.1804.el7.centos.2.x86_64
[root@kopano ~]# rpm -q logrotate
logrotate-3.8.6-15.el7.x86_64
[root@kopano ~]# ll /etc/logrotate.d/
total 20
-rw-r--r--. 1 root root  194 Apr 10 20:27 httpd
-rw-r--r--. 1 root root 1773 May 17 07:11 kopano
-rw-r--r--. 1 root root  224 May 14 14:09 syslog
-rw-r--r--. 1 root root  100 Apr 13 12:58 yum
-rw-r-----. 1 root root   93 Jun  1 19:34 z-push.lr

Just for your information. I don’t want to kill your weekend ;)
For me it works since i edited the su and create parameters to apache. It was the first thing i did before creating this thread.
I’m just curious about this issue.

Hi Markus,

@mkoas said in Error on 2.4.3.beta1+3:

Just for your information. I don’t want to kill your weekend ;)
For me it works since i edited the su and create parameters to apache. It was the first thing i did before creating this thread.
I’m just curious about this issue.

It’s strange nevertheless that I wasn’t able to reproduce it. The question remains if there’s something on your system or the test system and if we’ll get more reports like yours after the final release. And if there’s really an issue, it would be better if we’d manage to solve it before the final release.

Manfred

Hi Manfred,

Could you reproduce the issue?
Another thing i wonder:
Why writing with group instead of writing with user?
You know you could write with apache:root instead of using su in the current logrotate config
Your change in ZP-1431 was because of a message which said you shouldn’t write with group

Markus

Hi Markus,

@mkoas said in Error on 2.4.3.beta1+3:

Hi Manfred,

Could you reproduce the issue?

No, I was not able to reproduce it.

@mkoas said in Error on 2.4.3.beta1+3:

Another thing i wonder:
Why writing with group instead of writing with user?

Because we create the group during the installation if it doesn’t exist and so are sure it’s always available. The webserver user is different depending on the OS/webserver (apache, nginx, httpd, wwwrun). See also https://forum.kopano.io/topic/737/z-push-2-4-0-nginx-configuration-file/16.

Manfred

@mkoas

if you still got the proplem: in my setup i encountered a similar error (and z-push-clients wont be able to access the server “Error: Fatal misconfiguration: cant write to log file”)
the solution was changing the owner:

/var/log/z-push/*.log {
        size 1k
        create apache z-push
        compress
        rotate 4
}

ls -lisah /var/log/z-push/

135245 4,0K drwxr-x---   2 apache z-push 4,0K  7. Jun 03:19 .
131783 4,0K drwxr-xr-x. 20 root   root   4,0K  5. Jun 10:13 ..
142303 624K -rw-r--r--   1 apache z-push 619K  7. Jun 09:16 z-push-error.log
150309  48K -rw-r--r--   1 apache z-push  46K  6. Jun 02:36 z-push-error.log-20180606.gz
149790  48K -rw-r--r--   1 apache z-push  47K  7. Jun 02:21 z-push-error.log-20180607.gz
142020 624K -rw-r--r--   1 apache z-push 619K  7. Jun 09:16 z-push.log
150606  48K -rw-r--r--   1 apache z-push  46K  6. Jun 02:36 z-push.log-20180606.gz
150565  48K -rw-r--r--   1 apache z-push  47K  7. Jun 02:21 z-push.log-20180607.gz

with this it works fine

regards
Coffee_is_life

@coffee_is_life i bet you didn’t exactly read all posts because i already mentioned i solved IT for me ;)
But thanks anyway because the thought counts.

@Manfred you got a solution?
If not i think you should change the “create” line in the logrotate config file like that “create 664 root z-push”
I think this would be the best solution

Hi Markus,

I’ve created a JIRA issue to address this: https://jira.z-hub.io/browse/ZP-1436. I guess it will be the solution you suggested.

Manfred

Hi @mkoas ,

this should be fixed in the pre-final repo now. Z-Push 2.4.3 beta1+6 contains the fix. Give it a try if this fixes the issue for you.

Manfred

@manfred i tried this now and this works for me