Page 1 of 1

why doesn't 'zmcontrol stop' work?

Posted: Wed Mar 07, 2007 2:30 pm
by ipguru99
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:

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?" :D
brian

why doesn't 'zmcontrol stop' work?

Posted: Wed Mar 07, 2007 10:25 pm
by jholder
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

why doesn't 'zmcontrol stop' work?

Posted: Thu Mar 08, 2007 2:24 pm
by ipguru99
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...
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.(Socket.java:365)

at java.net.Socket.(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

why doesn't 'zmcontrol stop' work?

Posted: Sat Mar 10, 2007 6:11 pm
by ipguru99
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!

why doesn't 'zmcontrol stop' work?

Posted: Sat Mar 10, 2007 6:53 pm
by dkarp
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.

why doesn't 'zmcontrol stop' work?

Posted: Sun Mar 11, 2007 4:14 pm
by ipguru99
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