Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: Error message with zmsaupdate

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

    Default

    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.

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

    Default

    Just guessing, by any chance zimbra user is using sh instead of bash?

    ccelis

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

    Default

    No, it was the first thing I checked. Checked /etc/passwd to see what shell was being used - /bin/bash

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

    Default

    ugh.. sorry for can´t help you solve...

    ccelis.

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

    Default

    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.

  6. #16
    John Munro is offline Senior Member
    Join Date
    Nov 2006
    Location
    Japan
    Posts
    51
    Rep Power
    8

    Default

    Quote Originally Posted by ianw1974 View Post
    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:
    However running with bash shows no error. Try:
    Code:
    bash -x /opt/zimbra/.bashrc

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

    Default

    Yes, that I see. However, something is obviously not right, and is using sh instead. However:

    Code:
    zimbra:x:1001:1001::/opt/zimbra:/bin/bash
    shows that for the zimbra user the shell is bash. And:

    Code:
    zimbra@mail:~$ echo $0
    bash
    verifies that this is the case. This is what the cron looks like for the zimbra user:

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

    Code:
    . /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:

    Code:
    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.
    Last edited by ianw1974; 12-22-2013 at 02:52 AM.

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

    Default

    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.

  9. #19
    ludus is offline New Member
    Join Date
    Dec 2013
    Posts
    4
    Rep Power
    1

    Default

    Quote Originally Posted by ianw1974 View Post
    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.
    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

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

    Default

    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.

Page 2 of 3 FirstFirst 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
  •