Results 1 to 10 of 10

Thread: Starting and stopping zimbra through ssh doesn't always work

  1. #1
    timwiel is offline Active Member
    Join Date
    Mar 2007
    Posts
    39
    Rep Power
    8

    Default Starting and stopping zimbra through ssh doesn't always work

    Hi

    We are running several instances (for different clients) Open Source zimbra and one network edition zimbra.

    We have a dedicated backup server than runs the backups (including other directories on those servers) as described in the open source back procedure (allbeit slightly modified).

    All the zimbra versions are in the 5.0.XX version series.

    The modified backup script is a bashscript run on a crontab job from the back server.

    Basically the zimbra portion of the backups run a hot sync of zimbra using rsync as such:

    Code:
    rsync -avzHkh --delete --progress --inplace <root>@<remote_host>:/opt/zimbra /<path_to_local_backup_of_zimbra>/
    then the backup scripts calls

    Code:
    ssh <root>@<remote_host> sudo -u zimbra /opt/zimbra/bin/zmcontrol stop
    then the script cold syncs then we restart the zimbra using
    Code:
    ssh <root>@<remote_host> sudo -u zimbra /opt/zimbra/bin/zmcontrol start
    This is where the problem is - sometimes zimbra doesn't always come back up and ssh'ing into the server and running zmcontrol restart as zimbra locally on the machine always fixes the problems.

    There are two zimbra's that never restart the logger process and I have to log in and run:

    Code:
    zmswatchctl start
    zmloggerctl start
    for all the zimbra processes to be up and going again.

    Is running ssh <root>@<remote_host> sudo -u zimbra /opt/zimbra/bin/zmcontrol start a problem and if so how can it be fixed. Should I load this as a bug against zimbra.

  2. #2
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Which specific version of ZCS ? 5.0.14 (IIRC) had a logger issue then when running a zmcontrol stop some processes were left running. If indeed you are on this version then I would recommend upgrading.

  3. #3
    timwiel is offline Active Member
    Join Date
    Mar 2007
    Posts
    39
    Rep Power
    8

    Default

    The server that has the problem not restarting properly is 5.0.11GA-FOSS on an ubuntu 8.04.2 LTS

  4. #4
    timwiel is offline Active Member
    Join Date
    Mar 2007
    Posts
    39
    Rep Power
    8

    Default

    this problem also presents itself on the 5.0.13_GA_2791.UBUNTU8.FOSS server.
    When running ssh root@<zimbra_server> sudo -u zimbra /opt/zimbra/bin/zmlogswatchctl start and we tail the log using tail -fn20 /opt/zimbra/log/zmlogswatch.out I get:

    Code:
    Can't locate Date/Parse.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /opt/zimbra/libexec/logswatch line 30.
    BEGIN failed--compilation aborted at /opt/zimbra/libexec/logswatch line 30.

  5. #5
    gkra's Avatar
    gkra is offline Senior Member
    Join Date
    May 2007
    Location
    San Diego
    Posts
    53
    Rep Power
    8

    Default

    I'm having this same problem on 5.0.15 (NE, RHEL 5.3, 64-bit) right now. Whenever we reboot the server (i.e., kernel updates) the init script starts everything up just fine. Trying to use zmcontrol or zmlogswatchctl nets me the same perl module error in /opt/zimbra/log/zmlogswatch.out.

    If I need to restart the Zimbra services, I'm finding that I have to use the init script instead of zmcontrol if I want it to reliably start up.
    Gregory K. Ruiz-Ade
    Sr. Systems Administrator
    Computer Science and Engineering
    University of California, San Diego

  6. #6
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,566
    Rep Power
    57

    Default

    The obvious answer would be the perl module isn't installed:

    [SOLVED] logger & snmp not starting
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  7. #7
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Though should that not be in the /opt/zimbra tree Phoenix ? It certainly is not specified as part of the prereqs in the documentation. As zmcontrol works when in a interactive shell then I think it is more to do with the environment. Could somebody post the following?
    Code:
    ssh <root>@<remote_host> sudo -u zimbra "env ; /opt/zimbra/bin/zmcontrol start"

  8. #8
    Brian.huang is offline Junior Member
    Join Date
    Mar 2009
    Posts
    5
    Rep Power
    6

    Smile Please source /opt/zimbra/.bashrc

    This is the command I used to start zimbra manually:
    $sudo su zimbra -c "source /opt/zimbra/.bashrc ; /opt/zimbra/bin/zmcontrol start"
    It worked for me.

  9. #9
    sikander is offline Intermediate Member
    Join Date
    Mar 2009
    Posts
    22
    Rep Power
    6

    Default password

    Hello Brian,

    If i tried to run this command given below. It is asking me for the password but not taking any password. Can you please give me idea which password it is asking to stop or start zimbra service.

    $sudo su zimbra -c "source /opt/zimbra/.bashrc ; /opt/zimbra/bin/zmcontrol start"

    Thanks,

    Sikander

  10. #10
    Brian.huang is offline Junior Member
    Join Date
    Mar 2009
    Posts
    5
    Rep Power
    6

    Default

    Quote Originally Posted by sikander View Post
    Hello Brian,

    If i tried to run this command given below. It is asking me for the password but not taking any password. Can you please give me idea which password it is asking to stop or start zimbra service.

    $sudo su zimbra -c "source /opt/zimbra/.bashrc ; /opt/zimbra/bin/zmcontrol start"

    Thanks,

    Sikander
    I don't use the user zimbra directly. The sudoer is the current user, not zimbra in this case. That is, you should enter the password of the sudoer. By the way, the prompt message should show the user name.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. zmperditionctl start asking for password
    By k7sle in forum Administrators
    Replies: 32
    Last Post: 02-20-2008, 11:13 AM
  2. Replies: 7
    Last Post: 01-24-2007, 11:03 PM
  3. 3.1 on FC4 problems
    By cohnhead in forum Installation
    Replies: 8
    Last Post: 05-26-2006, 11:16 AM
  4. Zimbra MTA and CentOS VPS on OpenVZ
    By czaveri in forum Installation
    Replies: 2
    Last Post: 03-20-2006, 09:42 AM
  5. Starting zimbra as su
    By rmvg in forum Administrators
    Replies: 2
    Last Post: 12-12-2005, 12:22 AM

Posting Permissions

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