Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: [SOLVED] Small problem stopping zimbra

  1. #1
    Join Date
    Mar 2006
    Posts
    79
    Rep Power
    9

    Default [SOLVED] Small problem stopping zimbra

    Hi,

    Here is the problem. When I stop zimbra with,

    su - zimbra
    zmcontrol stop

    I get the following,

    Host courriel.mydomain.ca
    Stopping antispam...Done
    Stopping antivirus...Done
    Stopping ldap...Done
    Stopping logger...Done
    Stopping mailbox...Done
    Stopping mta...FAILED


    Stopping snmp...Done
    Stopping spell...Done

    the MTA returns it failed to stop. But in /var/log/zimbra.log I get the following,

    Jun 15 12:42:46 courriel zimbramon[29471]: 29471:info: Stopping mta
    Jun 15 12:44:06 courriel zimbramon[30161]: 30161:info: 2006-06-15 12:44:01, STATUS: courriel.mydomain.ca: mta: Stopped
    Jun 15 12:44:32 courriel zimbramon[29636]: 29636:info: Starting mta
    Jun 15 12:46:06 courriel zimbramon[31188]: 31188:info: 2006-06-15 12:46:02, STATUS: courriel.mydomain.ca: mta: Running

    so indeed, there is no problem. Then if I issue zmcontrol start, all is ok and the server works.

    My problem with this is that when the zmcontrol script terminates it returns a false error code 1 to what ever called it instead of 0.

    What I'm trying to do is to get zimbra backed up with bacula and get bacula to stop zimbra before the backup, back it up and then start zimbra.

    I tested it in VMware on an the same os as what I have on the real server and it works perfectly. Zimbra is stoped and restarted by bacula flawlessly. But in VMware, I don't get the error that MTA failed to stop so zmcontrol returns a0 to bacula.

    So How can I get zmcontrol to get the correct infos about the status of the MTA so that bacula will not cancel the job because it receaved an error message from the script used to stop zimbra?

    Or how can I check if there is a real problem stopping the MTA?

    Thanx!

  2. #2
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    21

    Default

    Is that all you have in the log?

    What about the tomcat log (/opt/zimbra/zimbra.log

    jh

  3. #3
    Join Date
    Mar 2006
    Posts
    79
    Rep Power
    9

    Default

    Thanx wannabetenor for answering,

    Of course, this is not all that I get in the log.

    I posted this Snip just to mark the pount that postfix was indeed closing and starting properly even thought the zmcontrol script was saying somwthing else.

    But anyway, I upgraded to 3.1.2 and the problem seems to be gone.

    Thanx anyway!

    Have a nice one!

  4. #4
    Join Date
    Sep 2005
    Posts
    78
    Rep Power
    10

    Default

    I believe what's happening is that Postfix is taking longer to shut down than zmcontrol expects. I'm not sure if there's a way to fix the problem, since you want to know when a service refuses to shut down. Would it be more intuitive to say something like "The mta service failed to stop within N seconds", rather than "FAILED"?

  5. #5
    Join Date
    Mar 2006
    Posts
    79
    Rep Power
    9

    Default

    Hello all,

    I'm back in this thread because finally I have the same problem again since the update I installed, 3.1.2, but slightly differently.

    bburtin, as I noted in my second post, the mta no loger is reported as failed on shutdown with zmcontrol stop from user zimbra. And when I do "echo $?" it sais the script returned "0" as the return code of the execution wich is what I would need to be able to get bacula to run the backup job properly.

    BUT, if I run /etc/init.d/zimbra stop, the zimbra services stops effectively but the script returns "1" instead of "0" so since this is the script I have to run from within bacula, the zimbra backup job fails. So I'm basicaly back to square one.

    Do you have any ideas or suggestions to give me of what is hapening and how to analyse the script and find out what is failing indeed?

    Thanx very much!

  6. #6
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    Try sh -x /etc/init.d/zimbra stop to see who is returning the 1
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  7. #7
    Join Date
    Mar 2006
    Posts
    79
    Rep Power
    9

    Default

    Thanx Kenvin, I'm trying this right now...

  8. #8
    Join Date
    Mar 2006
    Posts
    79
    Rep Power
    9

    Default

    Ok so here is what I'm getting:

    courriel:/opt/zimbra/log# sh -x /etc/init.d/zimbra stop
    + command shutdown
    + su - zimbra -c 'zmcontrol shutdown </dev/null >>/opt/zimbra/log/startup.log 2>&1'
    + RETVAL=0
    + exit 0
    courriel:/opt/zimbra/log# sh -x /etc/init.d/zimbra start
    + command startup
    + su - zimbra -c 'zmcontrol startup </dev/null >>/opt/zimbra/log/startup.log 2>&1'
    + RETVAL=0
    + exit 0
    courriel:/opt/zimbra/log# sh -x /etc/init.d/zimbra stop
    + command shutdown
    + su - zimbra -c 'zmcontrol shutdown </dev/null >>/opt/zimbra/log/startup.log 2>&1'
    + RETVAL=0
    + exit 0
    courriel:/opt/zimbra/log# sh -x /etc/init.d/zimbra start
    + command startup
    + su - zimbra -c 'zmcontrol startup </dev/null >>/opt/zimbra/log/startup.log 2>&1'
    + RETVAL=0
    + exit 0
    courriel:/opt/zimbra/log# sh -x /etc/init.d/zimbra stop
    + command shutdown
    + su - zimbra -c 'zmcontrol shutdown </dev/null >>/opt/zimbra/log/startup.log 2>&1'
    + RETVAL=1
    + exit 1
    courriel:/opt/zimbra/log# echo $?
    1
    courriel:/opt/zimbra/log# sh -x /etc/init.d/zimbra start
    + command startup
    + su - zimbra -c 'zmcontrol startup </dev/null >>/opt/zimbra/log/startup.log 2>&1'
    + RETVAL=0
    + exit 0
    courriel:/opt/zimbra/log# echo $?
    0
    courriel:/opt/zimbra/log# sh -x /etc/init.d/zimbra stop
    + command shutdown
    + su - zimbra -c 'zmcontrol shutdown </dev/null >>/opt/zimbra/log/startup.log 2>&1'
    + RETVAL=1
    + exit 1
    courriel:/opt/zimbra/log# echo $?
    1
    courriel:/opt/zimbra/log# sh -x /etc/init.d/zimbra start
    + command startup
    + su - zimbra -c 'zmcontrol startup </dev/null >>/opt/zimbra/log/startup.log 2>&1'
    + RETVAL=0
    + exit 0
    courriel:/opt/zimbra/log#

    As you can see, the problem is intermittant.

    And I just noticed that the problem :

    Host courriel.mydomain.ca
    Stopping antispam...Done
    Stopping antivirus...Done
    Stopping ldap...Done
    Stopping logger...Done
    Stopping mailbox...Done
    Stopping mta...FAILED


    Stopping snmp...Done
    Stopping spell...Done

    is back...

    Of course I could put at the end of /etc/init.d/zimbra,

    "exit 0" instead of the current "exit $RETVAL".

    But I don't feel right to do so.

    What do you think?

  9. #9
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    I think Boris was on the right track. Seems like a race condition. Maybe try putting in a sleep.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  10. #10
    Join Date
    Mar 2006
    Posts
    79
    Rep Power
    9

    Default

    Ok,

    I added the following sleep 5 in /opt/zimbra/bin/zmmtactl

    stop)
    for i in $SCRIPTS; do
    /opt/zimbra/bin/$i stop
    sleep 5
    done
    ;;

    I'll see if it fixes the problem and report back the results.

    Thanx for your hints!

    Jonathan

Similar Threads

  1. upgrade woes -made into new thread
    By JustinHarlow in forum Installation
    Replies: 18
    Last Post: 06-08-2007, 01:11 PM
  2. dspam logrotate errors
    By michaeln in forum Users
    Replies: 7
    Last Post: 02-19-2007, 12:45 PM
  3. Zimbra server crashed
    By goetzi in forum Administrators
    Replies: 6
    Last Post: 03-25-2006, 01:00 PM
  4. port 7071 not listening OS X install
    By leeimber in forum Installation
    Replies: 7
    Last Post: 03-21-2006, 10:47 AM
  5. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 07:38 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
  •