Starting and stopping zimbra through ssh doesn't always work

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
timwiel
Posts: 39
Joined: Fri Sep 12, 2014 10:30 pm

Starting and stopping zimbra through ssh doesn't always work

Postby timwiel » Wed May 20, 2009 5:38 pm

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:



rsync -avzHkh --delete --progress --inplace @:/opt/zimbra // 

then the backup scripts calls
ssh @ sudo -u zimbra /opt/zimbra/bin/zmcontrol stop


then the script cold syncs then we restart the zimbra using

ssh @ 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:
zmswatchctl start

zmloggerctl start

for all the zimbra processes to be up and going again.
Is running ssh @ 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.


uxbod
Ambassador
Ambassador
Posts: 7811
Joined: Fri Sep 12, 2014 10:21 pm

Starting and stopping zimbra through ssh doesn't always work

Postby uxbod » Fri May 22, 2009 2:10 am

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.
timwiel
Posts: 39
Joined: Fri Sep 12, 2014 10:30 pm

Starting and stopping zimbra through ssh doesn't always work

Postby timwiel » Sun May 24, 2009 4:37 pm

The server that has the problem not restarting properly is 5.0.11GA-FOSS on an ubuntu 8.04.2 LTS
timwiel
Posts: 39
Joined: Fri Sep 12, 2014 10:30 pm

Starting and stopping zimbra through ssh doesn't always work

Postby timwiel » Sun May 24, 2009 11:44 pm

this problem also presents itself on the 5.0.13_GA_2791.UBUNTU8.FOSS server.

When running ssh root@ sudo -u zimbra /opt/zimbra/bin/zmlogswatchctl start and we tail the log using tail -fn20 /opt/zimbra/log/zmlogswatch.out I get:
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.
gkra
Advanced member
Advanced member
Posts: 53
Joined: Fri Sep 12, 2014 10:36 pm

Starting and stopping zimbra through ssh doesn't always work

Postby gkra » Thu May 28, 2009 1:22 am

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.
phoenix
Ambassador
Ambassador
Posts: 26677
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Starting and stopping zimbra through ssh doesn't always work

Postby phoenix » Thu May 28, 2009 1:26 am

The obvious answer would be the perl module isn't installed:
http://www.zimbra.com/forums/installation/11767-solved-logger-snmp-not-starting.html
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
uxbod
Ambassador
Ambassador
Posts: 7811
Joined: Fri Sep 12, 2014 10:21 pm

Starting and stopping zimbra through ssh doesn't always work

Postby uxbod » Thu May 28, 2009 1:41 am

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?
ssh @ sudo -u zimbra "env ; /opt/zimbra/bin/zmcontrol start"
Brian.huang
Posts: 5
Joined: Sat Sep 13, 2014 12:11 am

Starting and stopping zimbra through ssh doesn't always work

Postby Brian.huang » Wed Jun 10, 2009 9:41 pm

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.
346sikander
Posts: 22
Joined: Sat Sep 13, 2014 12:10 am

Starting and stopping zimbra through ssh doesn't always work

Postby 346sikander » Tue Sep 28, 2010 12:56 am

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
Brian.huang
Posts: 5
Joined: Sat Sep 13, 2014 12:11 am

Starting and stopping zimbra through ssh doesn't always work

Postby Brian.huang » Thu Sep 30, 2010 10:10 am

[quote user="346sikander"]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[/QUOTE]
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.

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 13 guests