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 12-14-2008, 08:58 PM
Member
 
Posts: 14
Default [SOLVED] LDAP and Logger Not starting

I have installed a backup script form my Zimbra Server. In a certain point of the script it stop the services, then it starts it again. Both operations are performed with Zimbra control.

When I run the script from the command line it works fine. When I run it from cron services aren't properly started. Specifically LDAP and Logger doesn't start.

If I run zmcontrol status I get:

Enabled services read from cache. Service list may be inaccurate.
Host zimbra-XXX.ZZZZZ.com.uy
antispam Running
antivirus Running
ldap Stopped
logger Stopped

logmysql.server is not running
zmlogswatchctl is not running
mailbox Running
mta Running
snmp Running
spell Running
stats Running


For starting zmcontrol I've tryied:
/bin/su - zimbra -c "/opt/zimbra/bin/zmcontrol start"
and
sudo -u zimbra /opt/zimbra/bin/zmcontrol start
__________________
A/P Andrés Tarallo
Montevideo, Uruguay
Reply With Quote
  #2 (permalink)  
Old 12-15-2008, 04:01 AM
Moderator
 
Posts: 927
Default

It's generally a permissions issue when something works from the console but not from within a script. It may also be the environment settings. Have your script dump the envirnonment to a file just before it hits the command that's causing you some trouble and compare the output to the results of 'env' when you run it interactivly. There may be something there.

What used does the script run as? does that user have suders rights to be able to use the sudo command?

Without seeing the exact script you are using, it's hard to say for sure what the problem may be, feel free to post your script here or into your Sandbox pages and link to it.
Reply With Quote
  #3 (permalink)  
Old 12-15-2008, 08:56 AM
Member
 
Posts: 14
Default

The script I'm trying to run is a backup script, taken from this page of zimbra wiki: Open Source Edition Backup Procedure - Zimbra :: Wiki

The only change I've made was commenting the line where it FTP the compressed backup.

I've also tested the suggestion of using sudo, instead of su. got the same results.
__________________
A/P Andrés Tarallo
Montevideo, Uruguay

Last edited by AndresTarallo; 12-16-2008 at 05:09 AM..
Reply With Quote
  #4 (permalink)  
Old 12-16-2008, 08:47 AM
Moderator
 
Posts: 927
Default

Ah, that's odd, I'm sure that script is in use by others. Can you just confirm that it's being ran from the root users cron?

The script was designed for Ubuntu 6, so there's a possibility that a change in 8 is causing you some problems.
Reply With Quote
  #5 (permalink)  
Old 12-16-2008, 09:14 AM
Member
 
Posts: 14
Default

We're running the script in Ubuntu 8.04.1, with all patch applied.

The script is run in the crontab of the root user (edited with crontab -e)
__________________
A/P Andrés Tarallo
Montevideo, Uruguay
Reply With Quote
  #6 (permalink)  
Old 12-16-2008, 04:48 PM
Member
 
Posts: 14
Default Crontab where the script is runned

MAILTO=myuser@somwhere.com
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SHLVL=2
USER=root
LANG=en_US.UTF-8
48 21 * * * /usr/local/bin/zimbra_backup.sh
__________________
A/P Andrés Tarallo
Montevideo, Uruguay
Reply With Quote
  #7 (permalink)  
Old 12-16-2008, 05:39 PM
Member
 
Posts: 14
Default More information

The backup script seems to die when zmcontrol is executed.
__________________
A/P Andrés Tarallo
Montevideo, Uruguay
Reply With Quote
  #8 (permalink)  
Old 12-17-2008, 08:15 AM
Loyal Member
 
Posts: 95
Default

I have just recently started experiencing the exact same thing on my Mac OS X box.

I do no have a custom backup script doing anything. It's just doing the standard nightly backups.

When the system is rebooted zmlogswatchctl and zmswatch services do not restart. I have to stop with zmcontrol and then start it back up again.
Reply With Quote
  #9 (permalink)  
Old 12-17-2008, 08:35 AM
Zimbra Consultant & Moderator
 
Posts: 20,312
Default

[SOLVED] Logging Service to Admin Console Problem
__________________
Regards


Bill
Reply With Quote
  #10 (permalink)  
Old 12-17-2008, 08:38 AM
Member
 
Posts: 14
Default

At least I was aware of that bug, and I´ve applied the patch. The result's are the same as without patch.

As I've said before it seems to me that zmcontrol dies when trying to start the services, running from a cron job
__________________
A/P Andrés Tarallo
Montevideo, Uruguay
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.