Results 1 to 6 of 6

Thread: why doesn't 'zmcontrol stop' work?

  1. #1
    ipguru99 is offline Active Member
    Join Date
    Jun 2006
    Posts
    32
    Rep Power
    8

    Default why doesn't 'zmcontrol stop' work?

    hello all,

    Maybe I am not doing it right.. I know it stops.. but I have done two upgrades in the last couple of days and everything (mainly tomcat) gets kludged because after "stopping" with 'zmcontrol stop', there are many parts of zimbra 'not' stopped.

    The upgrades seem to go ok, but on both, I try to use zmprov and start getting weird java errors. I eventually figure out that tomcat is stopped, the permissions aren't right.. I have to change either log or redo.log. (Thanks to all in this forum that have posted 'tomcat stopped' and 'mailbox not started' fixes!!).

    So I found a thread that talks about this command:
    Code:
    kill -9 `ps -U zimbra|grep [0-9]|awk '{print $1}'` > /dev/null
    I think I did that as root and maybe that is why the permissions were messed up.. Anyway, why is there a need to do this. Should I just include my own zmxxxx script that does the zmcontrol stop and then the kill command after?

    Just wondering if anyone else thought this to be odd... or am I missing something?

    Thanks for this alternative to the question "Um, yeah, we wanted email to go with all of that.. do we have to use Exchange?"

    brian

  2. #2
    jholder's Avatar
    jholder is offline Former Zimbran
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    20

    Default

    Wow,
    I wonder why tomcat is dying like that.

    Can you post your /opt/zimbra/log/mailbox.log and /opt/zimbra/tomcat/logs/catalina.out ?

    If you want to fix permissions issues, then
    su -root
    chown -R zimbra:zimbra /opt/zimbra
    cd /opt/zimbra/libexec
    ./zmfixperms

  3. #3
    ipguru99 is offline Active Member
    Join Date
    Jun 2006
    Posts
    32
    Rep Power
    8

    Default I think because I killed as root...

    Here is my catalina.out (below) for that day on one of these servers. I did find the zmfixperms afterwards... but my real question (and I have tested this with the 'ps -U zimbra', after issuing the 'zmcontrol stop' command.. and things are still running as the zimbra user) still stands. Is there a killall switch for zimbra? This doesn't look like an 'upgrade' issue per se. I can duplicate this on three different zimbra servers...

    Code:
    zimbra@mail:~/apache-tomcat-5.5.15/logs> cat catalina.2007-03-05.log
    Mar 5, 2007 5:23:10 PM org.apache.catalina.startup.Catalina stopServer
    SEVERE: Catalina.stop:
    java.net.ConnectException: Connection refused
            at java.net.PlainSocketImpl.socketConnect(Native Method)
            at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
            at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
            at java.net.Socket.connect(Socket.java:507)
            at java.net.Socket.connect(Socket.java:457)
            at java.net.Socket.<init>(Socket.java:365)
            at java.net.Socket.<init>(Socket.java:178)
            at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:394)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:324)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
    zimbra@mail:~/apache-tomcat-5.5.15/logs>
    thanks!

    brian

  4. #4
    ipguru99 is offline Active Member
    Join Date
    Jun 2006
    Posts
    32
    Rep Power
    8

    Default can duplicate it...

    If I "zmcontrol stop" on two servers that I just recently upgraded from 3.1.4 to 4.5.3, it changes the perms on /opt/zimbra/redolog/redo.log to root:root.

    This makes it so that tomcat won't start.

    All I have to do is "chown zimbra: /opt/zimbra/redolog/redo.log" and everything works fine.

    Now that I know this, no biggie, but any way to stop it or figure out what is causing it? (Both 4.5.3 NE on SuSE 9)

    thanks!

  5. #5
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default zmfixperms

    The zmfixperms script can help automate your permissions fixing. The problem is with an old kernel rev that Does The Wrong Thing with respect to dropping permissions subsequent to process start. Updating your kernel should fix the issue.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  6. #6
    ipguru99 is offline Active Member
    Join Date
    Jun 2006
    Posts
    32
    Rep Power
    8

    Default thanks

    thanks... I just looked at the kernel on that server.. 2.6.5.. so it has been longer than I thought ;-)

    I guess that is what happens when you don't do much to keep them running over the year ;-)

    Thanks for the help!

    brian

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 04-05-2013, 03:27 PM
  2. Zimbra .pids / service monitoring
    By bin2hex in forum Administrators
    Replies: 24
    Last Post: 04-03-2010, 09:12 PM
  3. Replies: 16
    Last Post: 06-18-2007, 03:16 PM
  4. Replies: 42
    Last Post: 08-11-2006, 09:50 AM
  5. M2 mail stuck in queue work around
    By johnadams in forum Installation
    Replies: 4
    Last Post: 12-14-2005, 09:09 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
  •