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: 109
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 5:07 am

What's interesting is this. I've compared the .bashrc of my colleague with my .bashrc, and it's exactly identical. I also got him to do the sh -x /opt/zimbra/.bashrc like I did here, and the results are the same with the errors for lines 28 and 36.
He does not get an email during the night with the error like I get showing me that something was wrong. I checked his crontab as well, and it's the same. In theory then he should get the same email alert, but he doesn't.
Maybe his cron system is not configured to send the email alerts and perhaps that is why he doesn't get the email. However, I never used to get such emails with a previous version.
It would be nice to fix the .bashrc to stop those errors occurring. That would fix the issue I'm sure.


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 » Wed Dec 18, 2013 4:01 pm

Just guessing, by any chance zimbra user is using sh instead of bash?
ccelis
User avatar
ianw1974
Advanced member
Advanced member
Posts: 109
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 » Thu Dec 19, 2013 12:52 am

No, it was the first thing I checked. Checked /etc/passwd to see what shell was being used - /bin/bash
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 » Thu Dec 19, 2013 6:30 pm

ugh.. sorry for can´t help you solve...
ccelis.
User avatar
ianw1974
Advanced member
Advanced member
Posts: 109
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 » Fri Dec 20, 2013 12:43 am

I think editing and removing the bashrc from the crontab would fix it, but then I would break it then for future upgrades. I can ignore the error, but it was never generated before, so definitely some changes were made to bashrc that caused those two errors to be generated.
Minor annoyance, but still generating me unwanted mail traffic.
John Munro
Posts: 48
Joined: Fri Sep 12, 2014 10:20 pm

Error message with zmsaupdate

Postby John Munro » Sat Dec 21, 2013 10:46 pm

[quote user="ianw1974"]

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:

[/QUOTE]
However running with bash shows no error. Try:

bash -x /opt/zimbra/.bashrc
User avatar
ianw1974
Advanced member
Advanced member
Posts: 109
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 » Sun Dec 22, 2013 3:45 am

Yes, that I see. However, something is obviously not right, and is using sh instead. However:
zimbra:x:1001:1001::/opt/zimbra:/bin/bash

shows that for the zimbra user the shell is bash. And:
zimbra@mail:~$ echo $0

bash

verifies that this is the case. This is what the cron looks like for the zimbra user:
45 0 * * * . /opt/zimbra/.bashrc; /opt/zimbra/libexec/zmsaupdate

and when we run this manually as the zimbra user from the console:
. /opt/zimbra/.bashrc; /opt/zimbra/libexec/zmsaupdate

it works as no error is reported. And yet, when the cron itself runs at night, I get the error.
EDIT
I've noticed that the /etc/crontab has a value:
SHELL=/bin/sh

so I've changed this for now to /bin/bash and will see if this makes a difference. Alternatively, at the beginning of the zimbra crontab outside of the "DO NOT EDIT" parts, I could specify the shell in here so that it would be set as a per-user basis. As now, set in /etc/crontab means that bash should be used system-wide. I'll report back later to see if this is the case.
User avatar
ianw1974
Advanced member
Advanced member
Posts: 109
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 23, 2013 1:07 am

Well, it didn't help by editing /etc/crontab, so have just added it before all the zimbra stuff for the zimbra user crontab. So will see what happens today. If not, it seems that crontab is using /bin/sh and not /bin/bash and so that is why the error is occuring I expect.
ludus
Posts: 4
Joined: Sat Sep 13, 2014 3:27 am

Error message with zmsaupdate

Postby ludus » Mon Dec 23, 2013 4:26 am

[quote user="ianw1974"]What's interesting is this. I've compared the .bashrc of my colleague with my .bashrc, and it's exactly identical. I also got him to do the sh -x /opt/zimbra/.bashrc like I did here, and the results are the same with the errors for lines 28 and 36.
He does not get an email during the night with the error like I get showing me that something was wrong. I checked his crontab as well, and it's the same. In theory then he should get the same email alert, but he doesn't.
Maybe his cron system is not configured to send the email alerts and perhaps that is why he doesn't get the email. However, I never used to get such emails with a previous version.
It would be nice to fix the .bashrc to stop those errors occurring. That would fix the issue I'm sure.[/QUOTE]
I'm having exactly the same situation on Release 8.0.6.GA.5922.UBUNTU12.64 UBUNTU12_64 FOSS edition (Ubuntu 12.04.3 LTS) and i already tried changing SHELL=/bin/sh to SHELL=/bin/bash in /etc/crontab (doesn't work).

I didn't try adding it in zimbra user's crontab...i guess i'll just wait for your results about this attempt :)

Your colleague is running Ubuntu 12.04 as well or some other distro?

Is this only a product of Zimbra-Ubuntu marriage or it's happening with other supported distros too?
Please, give us some feedback here. Check your logs/admin emails and tell us if you have something related to /opt/zimbra/.bashrc; /opt/zimbra/libexec/zmsaupdate
User avatar
ianw1974
Advanced member
Advanced member
Posts: 109
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 23, 2013 4:34 am

Yes, my colleague is also running Ubuntu 12.04, although he doesn't get the emails, probably because his /etc/aliases is not configured to deliver it to his admin user on the Zimbra install like mine is. However, I have confirmed that he would have the same problem as I ran the sh -x /opt/zimbra/.bashrc on his server as well, and it reported the same errors.
I'll update tomorow morning, as the cronjob runs at night.

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 30 guests