logger and logswatch stop in 8.8.15

Ask questions about your setup or get help installing ZCS server (ZD section below).
Post Reply
mfehr
Advanced member
Advanced member
Posts: 72
Joined: Fri Sep 12, 2014 11:25 pm

logger and logswatch stop in 8.8.15

Post by mfehr »

On my 8.8.15 server (Ubuntu 16.04) zmlogswatchctl and logger often stop working. After this error, I can start both processes using zmswatchctl start and zmlogswatchctl start - However, the process soon stops again. The log files show the following errors.

zmlogswatch.out

Code: Select all

Can't locate Date/Parse.pm in @INC (you may need to install the Date::Parse module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /opt/zimbra/common/bin/swatchdog line 30.
BEGIN failed--compilation aborted at /opt/zimbra/common/bin/swatchdog line 30.  
zmswatch.out

Code: Select all

Can't locate Date/Parse.pm in @INC (you may need to install the Date::Parse module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /opt/zimbra/common/bin/swatchdog line 30.
BEGIN failed--compilation aborted at /opt/zimbra/common/bin/swatchdog line 30.
So it seems that these scripts do not have a path to the perl libraries found in /opt/zimbra/common/lib/perl5

Where is this path set?
User avatar
JDunphy
Outstanding Member
Outstanding Member
Posts: 889
Joined: Fri Sep 12, 2014 11:18 pm
Location: Victoria, BC
ZCS/ZD Version: 9.0.0_P39 NETWORK Edition

Re: logger and logswatch stop in 8.8.15

Post by JDunphy »

mfehr wrote:
So it seems that these scripts do not have a path to the perl libraries found in /opt/zimbra/common/lib/perl5

Where is this path set?
Normally, when you are zimbra it sets them but I have never run 8.8.15 nor 8.8.X for that matter... Make sure you have done something like this:

Code: Select all

# su - zimbra
% [zimbra@mail ~]$ perl -V  |grep -A4 INC
  @INC:
    /opt/zimbra/common/lib/perl5/x86_64-linux-thread-multi
    /opt/zimbra/common/lib/perl5/x86_64-linux-thread-multi
    /opt/zimbra/common/lib/perl5
    /usr/local/lib64/perl5

before running any zimbra perl code.... When I do my own scripts that run zimbra perl code, I will often do something like this first in those scripts.

Code: Select all

. /opt/zimbra/.bashrc
You are looking for PERLLIB and/or PERL5LIB to be set which they do in their .bashrc with this:

Code: Select all

eval `/usr/bin/perl -V:archname`
PERLLIB=/opt/zimbra/common/lib/perl5/$archname:/opt/zimbra/common/lib/perl5
export PERLLIB
Your @INC looks incorrect for zimbra at least for how 8.7.11 and previous versions worked as you noted.
Post Reply