Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-20-2009, 03:38 PM
Active Member
 
Posts: 39
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.
Reply With Quote
  #2 (permalink)  
Old 05-22-2009, 12:10 AM
Moderator
 
Posts: 7,928
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.
__________________
Reply With Quote
  #3 (permalink)  
Old 05-24-2009, 02:37 PM
Active Member
 
Posts: 39
Default

The server that has the problem not restarting properly is 5.0.11GA-FOSS on an ubuntu 8.04.2 LTS
Reply With Quote
  #4 (permalink)  
Old 05-24-2009, 09:44 PM
Active Member
 
Posts: 39
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.
Reply With Quote
  #5 (permalink)  
Old 05-27-2009, 11:22 PM
Senior Member
 
Posts: 53
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
Reply With Quote
  #6 (permalink)  
Old 05-27-2009, 11:26 PM
Zimbra Consultant & Moderator
 
Posts: 20,313
Default

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

[SOLVED] logger & snmp not starting
__________________
Regards


Bill
Reply With Quote
  #7 (permalink)  
Old 05-27-2009, 11:41 PM
Moderator
 
Posts: 7,928
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"
__________________
Reply With Quote
  #8 (permalink)  
Old 06-10-2009, 07:41 PM
Junior Member
 
Posts: 5
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.
Reply With Quote
  #9 (permalink)  
Old 09-27-2010, 10:56 PM
Intermediate Member
 
Posts: 22
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
Reply With Quote
  #10 (permalink)  
Old 09-30-2010, 08:10 AM
Junior Member
 
Posts: 5
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.