Error message with zmsaupdate

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
User avatar
ianw1974
Advanced member
Advanced member
Posts: 108
Joined: Sat Sep 13, 2014 12:45 am
Location: UK and Poland
ZCS/ZD Version: Zimbra 8.8.15_GA_3968
Contact:

Error message with zmsaupdate

Postby ianw1974 » Mon Dec 16, 2013 2:39 am

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:
/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:
45 0 * * * . /opt/zimbra/.bashrc; /opt/zimbra/libexec/zmsaupdate


magnus.moren
Advanced member
Advanced member
Posts: 57
Joined: Fri Sep 12, 2014 10:38 pm

Error message with zmsaupdate

Postby magnus.moren » Mon Dec 16, 2013 4:49 am

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:



# diff crontab.805 crontab.806


> 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.
User avatar
ianw1974
Advanced member
Advanced member
Posts: 108
Joined: Sat Sep 13, 2014 12:45 am
Location: UK and Poland
ZCS/ZD Version: Zimbra 8.8.15_GA_3968
Contact:

Error message with zmsaupdate

Postby ianw1974 » Mon Dec 16, 2013 4:52 am

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".
User avatar
ccelis5215
Outstanding Member
Outstanding Member
Posts: 612
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 P12

Error message with zmsaupdate

Postby ccelis5215 » Mon Dec 16, 2013 6:22 pm

[quote user="ianw1974"]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:
/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:
45 0 * * * . /opt/zimbra/.bashrc; /opt/zimbra/libexec/zmsaupdate
[/QUOTE]
Hello ianw1974, this error has nothing related to zmsaupdate.
Clearly shows a couple of error setting zimbra environment.
What's your server version?
ccelis
joematt
Posts: 3
Joined: Sat Sep 13, 2014 3:24 am

Error message with zmsaupdate

Postby joematt » Mon Dec 16, 2013 6:55 pm

I, also am getting this. I am on version 8.0.6_GA_5922.FOSS. New clean install
User avatar
ianw1974
Advanced member
Advanced member
Posts: 108
Joined: Sat Sep 13, 2014 12:45 am
Location: UK and Poland
ZCS/ZD Version: Zimbra 8.8.15_GA_3968
Contact:

Error message with zmsaupdate

Postby ianw1974 » Tue Dec 17, 2013 12:41 am

In my first post ;)
[quote]I'm running Zimbra 8.0.6_GA_5922 (build 20131203103702)[/quote]
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.
User avatar
ccelis5215
Outstanding Member
Outstanding Member
Posts: 612
Joined: Sat Sep 13, 2014 2:04 am
Location: Caracas - Venezuela
ZCS/ZD Version: 8.8.15.GA.3869.UBUNTU18.64 P12

Error message with zmsaupdate

Postby ccelis5215 » Tue Dec 17, 2013 4:19 pm

[quote user="ianw1974"]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.[/QUOTE]
Sorry for mislead, i meant OS version.
Can you post the output, as zimbra user, to help you troublesoothing..


sh -x /opt/zimbra/.bashrc


ccelis
joematt
Posts: 3
Joined: Sat Sep 13, 2014 3:24 am

Error message with zmsaupdate

Postby joematt » Tue Dec 17, 2013 4:27 pm

Ubuntu Linux 12.04.1
[QUOTE]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:~$ [/QUOTE]
joematt
Posts: 3
Joined: Sat Sep 13, 2014 3:24 am

Error message with zmsaupdate

Postby joematt » Tue Dec 17, 2013 6:41 pm

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:~$
User avatar
ianw1974
Advanced member
Advanced member
Posts: 108
Joined: Sat Sep 13, 2014 12:45 am
Location: UK and Poland
ZCS/ZD Version: Zimbra 8.8.15_GA_3968
Contact:

Error message with zmsaupdate

Postby ianw1974 » Wed Dec 18, 2013 12:59 am

Of course:
+ 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:
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:
if [ `uname -s` == "Darwin" ]; then

unset DYLD_LIBRARY_PATH

else

unset LD_LIBRARY_PATH

fi

Return to “Administrators”

Who is online

Users browsing this forum: L. Mark Stone and 13 guests