Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Error message with zmsaupdate

  1. #1
    ianw1974 is offline Active Member
    Join Date
    Oct 2009
    Location
    UK
    Posts
    32
    Rep Power
    5

    Default Error message with zmsaupdate

    Assuming that this is the correct place to post, as the forum doesn't seem to have another suitable location.

    I'm running Zimbra 8.0.6_GA_5922 (build 20131203103702)

    Problem now is that during the zmsaupdate that is scheduled with cron, I get the following email notification:

    Code:
    /bin/sh: 28: /opt/zimbra/.bashrc: [[: not found
    /bin/sh: 36: [: Linux: unexpected operator
    why has this suddenly started occurring, and how can it be fixed? If I run zmsaupdate manually, everything seems to be OK, as no error is shown. Assume that this is just with the scheduled job that is incorrect somehow.....

    crontab has:

    Code:
    45 0 * * * . /opt/zimbra/.bashrc; /opt/zimbra/libexec/zmsaupdate
    Last edited by ianw1974; 12-30-2013 at 01:22 AM.

  2. #2
    moren is offline Trained Alumni
    Join Date
    Jun 2007
    Location
    Halmstad, Sweden
    Posts
    58
    Rep Power
    8

    Default

    I can't tell you what the problem is but i noticed a change in 8.0.6 (compared to 8.0.5) in how zmsaupdate is executed from cron:
    Code:
    # diff crontab.805 crontab.806
    < 45 0 * * * /opt/zimbra/libexec/zmsaupdate
    > 45 0 * * * . /opt/zimbra/.bashrc; /opt/zimbra/libexec/zmsaupdate
    In what logfile do you see this? I run CentOS 6.5 and I do not see this error.
    Regards
    Morén
    8.0.5_P1 / NE / RHEL6_64

  3. #3
    ianw1974 is offline Active Member
    Join Date
    Oct 2009
    Location
    UK
    Posts
    32
    Rep Power
    5

    Default

    I don't see in a logfile, when cron runs at night, I then get an email notification with the error I posted above (this is sent to admin@mydomain.com) if you login to this account on your server, perhaps you get the notification also. I would edit the cron, but as we know, it says "do not edit between the lines".

  4. #4
    ccelis5215 is offline Elite Member
    Join Date
    Jun 2011
    Location
    Caracas Venezuela
    Posts
    476
    Rep Power
    4

    Default

    Quote Originally Posted by ianw1974 View Post
    Assuming that this is the correct place to post, as the forum doesn't seem to have another suitable location.

    I'm running Zimbra 8.0.6_GA_5922 (build 20131203103702)

    Problem now is that during the zmsaupdate that is scheduled with cron, I get the following email notification:

    Code:
    /bin/sh: 28: /opt/zimbra/.bashrc: [[: not found
    /bin/sh: 36: [: Linux: unexpected operator
    why has this suddenly started occurring, and how can it be fixed? If I run zmsaupdate manually, everything seems to be OK, as no error is shown. Assume that this is just with the scheduled job that is incorrect somehow.....

    crontab has:

    Code:
    45 0 * * * . /opt/zimbra/.bashrc; /opt/zimbra/libexec/zmsaupdate
    Hello ianw1974, this error has nothing related to zmsaupdate.

    Clearly shows a couple of error setting zimbra environment.

    What's your server version?

    ccelis

  5. #5
    joematt is offline Starter Member
    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    1

    Default

    I, also am getting this. I am on version 8.0.6_GA_5922.FOSS. New clean install

  6. #6
    ianw1974 is offline Active Member
    Join Date
    Oct 2009
    Location
    UK
    Posts
    32
    Rep Power
    5

    Default

    In my first post

    I'm running Zimbra 8.0.6_GA_5922 (build 20131203103702)
    If you mean Linux version, server is Ubuntu 12.04 LTS. I expect if the . /opt/zimbra/.bashrc was removed, it would be OK. I also checked to ensure zimbra user has a shell of /bin/bash, which also should be OK.

  7. #7
    ccelis5215 is offline Elite Member
    Join Date
    Jun 2011
    Location
    Caracas Venezuela
    Posts
    476
    Rep Power
    4

    Default

    Quote Originally Posted by ianw1974 View Post
    In my first post



    If you mean Linux version, server is Ubuntu 12.04 LTS. I expect if the . /opt/zimbra/.bashrc was removed, it would be OK. I also checked to ensure zimbra user has a shell of /bin/bash, which also should be OK.
    Sorry for mislead, i meant OS version.

    Can you post the output, as zimbra user, to help you troublesoothing..

    Code:
    sh -x /opt/zimbra/.bashrc
    ccelis

  8. #8
    joematt is offline Starter Member
    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    1

    Default

    Ubuntu Linux 12.04.1

    zimbra@bigjoemama:~$ sh -x /opt/zimbra/.bashrc
    + alias rm=rm -i
    + alias cp=cp -i
    + alias mv=mv -i
    + alias h=history 40
    + alias j=jobs
    + [ -f /etc/bashrc ]
    + ZIMBRA_HOME=/opt/zimbra
    + export ZIMBRA_HOME
    + [ -x /opt/zimbra/libexec/get_plat_tag.sh ]
    + /opt/zimbra/libexec/get_plat_tag.sh
    + ZCS_PLATFORM=UBUNTU12_64
    + JAVA_HOME=/opt/zimbra/java
    + export JAVA_HOME
    + [[ UBUNTU12_64 == MACOSXx86_10.*
    /opt/zimbra/.bashrc: 28: /opt/zimbra/.bashrc: [[: not found
    + PATH=/opt/zimbra/bin:/opt/zimbra/postfix/sbin:/opt/zimbra/openldap/bin:/opt/zimbra/snmp/bin:/opt/zimbra/rsync/bin:/opt/zimbra/bdb/bin:/opt/zimbra/openssl/bin:/opt/zimbra/java/bin:/usr/sbin:/opt/zimbra/bin:/opt/zimbra/postfix/sbin:/opt/zimbra/openldap/bin:/opt/zimbra/snmp/bin:/opt/zimbra/rsync/bin:/opt/zimbra/bdb/bin:/opt/zimbra/openssl/bin:/opt/zimbra/java/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    + export PATH
    + uname -s
    + [ Linux == Darwin ]
    /opt/zimbra/.bashrc: 36: [: Linux: unexpected operator
    + unset LD_LIBRARY_PATH
    + SNMPCONFPATH=/opt/zimbra/conf
    + export SNMPCONFPATH
    + /usr/bin/perl -V:archname
    + eval archname='x86_64-linux-gnu-thread-multi';
    + archname=x86_64-linux-gnu-thread-multi
    + PERLLIB=/opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi:/opt/zimbra/zimbramon/lib
    + export PERLLIB
    + PERL5LIB=/opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi:/opt/zimbra/zimbramon/lib
    + export PERL5LIB
    + JYTHONPATH=/opt/zimbra/zimbramon/pylibs
    + export JYTHONPATH
    + ulimit -n 524288
    + umask 0027
    + unset DISPLAY
    + export MANPATH=/opt/zimbra/opendkim/share/man:/opt/zimbra/opendkim/share/man:
    zimbra@bigjoemama:~$

  9. #9
    joematt is offline Starter Member
    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    1

    Default

    Code:
    zimbra@bigjoemama:~$ sh -x /opt/zimbra/.bashrc
    + alias rm=rm -i
    + alias cp=cp -i
    + alias mv=mv -i
    + alias h=history 40
    + alias j=jobs
    + [ -f /etc/bashrc ]
    + ZIMBRA_HOME=/opt/zimbra
    + export ZIMBRA_HOME
    + [ -x /opt/zimbra/libexec/get_plat_tag.sh ]
    + /opt/zimbra/libexec/get_plat_tag.sh
    + ZCS_PLATFORM=UBUNTU12_64
    + JAVA_HOME=/opt/zimbra/java
    + export JAVA_HOME
    + [[ UBUNTU12_64 == MACOSXx86_10.*
    /opt/zimbra/.bashrc: 28: /opt/zimbra/.bashrc: [[: not found
    + PATH=/opt/zimbra/bin:/opt/zimbra/postfix/sbin:/opt/zimbra/openldap/bin:/opt/zimbra/snmp/bin:/opt/zimbra/rsync/bin:/opt/zimbra/bdb/bi
    n:/opt/zimbra/openssl/bin:/opt/zimbra/java/bin:/usr/sbin:/opt/zimbra/bin:/opt/zimbra/postfix/sbin:/opt/zimbra/openldap/bin:/opt/zimbra
    /snmp/bin:/opt/zimbra/rsync/bin:/opt/zimbra/bdb/bin:/opt/zimbra/openssl/bin:/opt/zimbra/java/bin:/usr/sbin:/usr/local/sbin:/usr/local/
    bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    + export PATH
    + uname -s
    + [ Linux == Darwin ]
    /opt/zimbra/.bashrc: 36: [: Linux: unexpected operator
    + unset LD_LIBRARY_PATH
    + SNMPCONFPATH=/opt/zimbra/conf
    + export SNMPCONFPATH
    + /usr/bin/perl -V:archname
    + eval archname='x86_64-linux-gnu-thread-multi';
    + archname=x86_64-linux-gnu-thread-multi
    + PERLLIB=/opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi:/opt/zimbra/zimbramon/lib
    + export PERLLIB
    + PERL5LIB=/opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi:/opt/zimbra/zimbramon/lib
    + export PERL5LIB
    + JYTHONPATH=/opt/zimbra/zimbramon/pylibs
    + export JYTHONPATH
    + ulimit -n 524288
    + umask 0027
    + unset DISPLAY
    + export MANPATH=/opt/zimbra/opendkim/share/man:/opt/zimbra/opendkim/share/man:
    zimbra@bigjoemama:~$ nano /opt/zimbra/.bashrc
    zimbra@bigjoemama:~$

  10. #10
    ianw1974 is offline Active Member
    Join Date
    Oct 2009
    Location
    UK
    Posts
    32
    Rep Power
    5

    Default

    Of course:

    Code:
    + alias rm=rm -i
    + alias cp=cp -i
    + alias mv=mv -i
    + alias h=history 40
    + alias j=jobs
    + [ -f /etc/bashrc ]
    + ZIMBRA_HOME=/opt/zimbra
    + export ZIMBRA_HOME
    + [ -x /opt/zimbra/libexec/get_plat_tag.sh ]
    + /opt/zimbra/libexec/get_plat_tag.sh
    + ZCS_PLATFORM=UBUNTU12_64
    + JAVA_HOME=/opt/zimbra/java
    + export JAVA_HOME
    + [[ UBUNTU12_64 == MACOSXx86_10.*
    /opt/zimbra/.bashrc: 28: /opt/zimbra/.bashrc: [[: not found
    + PATH=/opt/zimbra/bin:/opt/zimbra/postfix/sbin:/opt/zimbra/openldap/bin:/opt/zimbra/snmp/bin:/opt/zimbra/rsync/bin:/opt/zimbra/bdb/bin:/opt/zimbra/openssl/bin:/opt/zimbra/java/bin:/usr/sbin:/opt/zimbra/bin:/opt/zimbra/postfix/sbin:/opt/zimbra/openldap/bin:/opt/zimbra/snmp/bin:/opt/zimbra/rsync/bin:/opt/zimbra/bdb/bin:/opt/zimbra/openssl/bin:/opt/zimbra/java/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    + export PATH
    + uname -s
    + [ Linux == Darwin ]
    /opt/zimbra/.bashrc: 36: [: Linux: unexpected operator
    + unset LD_LIBRARY_PATH
    + SNMPCONFPATH=/opt/zimbra/conf
    + export SNMPCONFPATH
    + /usr/bin/perl -V:archname
    + eval archname='x86_64-linux-gnu-thread-multi';
    + archname=x86_64-linux-gnu-thread-multi
    + PERLLIB=/opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi:/opt/zimbra/zimbramon/lib
    + export PERLLIB
    + PERL5LIB=/opt/zimbra/zimbramon/lib/x86_64-linux-gnu-thread-multi:/opt/zimbra/zimbramon/lib
    + export PERL5LIB
    + JYTHONPATH=/opt/zimbra/zimbramon/pylibs
    + export JYTHONPATH
    + ulimit -n 524288
    + umask 0027
    + unset DISPLAY
    + export MANPATH=/opt/zimbra/opendkim/share/man:/opt/zimbra/opendkim/share/man:
    emphasise on the error in question in bold above, it clearly shows that error about the double bracket [[ lines 28 to 31 of .bashrc has:

    Code:
    if [[ $ZCS_PLATFORM == MACOSXx86_10.* && x$ZCS_PLATFORM != "xMACOSXx86_10.7" ]]; then
      JAVA_JVM_VERSION=CurrentJDK
      export JAVA_JVM_VERSION
    fi
    So I'm guessing that my email is just reporting this error status, but it seems everything has then effectively finished successfully, as it hasn't said anything else otherwise. I suppose I could ignore it, but I think would be good to fix that line 28 so that it didn't report the problem (assuming of course that something is wrong with line 28 somehow, although not entirely sure what).

    Line 36 also reports a problem, also shown in bold above, and I've noted that these lines hold:

    Code:
    if [ `uname -s` == "Darwin" ]; then
      unset DYLD_LIBRARY_PATH
    else
      unset LD_LIBRARY_PATH
    fi
    Last edited by ianw1974; 12-18-2013 at 12:08 AM.

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 07-24-2014, 01:09 PM
  2. zmsaupdate doesn't restart amavisd
    By babyporch in forum Administrators
    Replies: 15
    Last Post: 09-26-2013, 10:09 PM
  3. Enable zmsaupdate
    By babyporch in forum Administrators
    Replies: 2
    Last Post: 09-22-2013, 11:54 AM
  4. Replies: 2
    Last Post: 09-06-2013, 08:21 AM
  5. Replies: 0
    Last Post: 01-05-2010, 02:30 PM

Posting Permissions

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