why doesn't 'zmcontrol stop' work?

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

why doesn't 'zmcontrol stop' work?

Postby ipguru99 » Wed Mar 07, 2007 2:30 pm

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


jholder
Zimbra Employee
Zimbra Employee
Posts: 4686
Joined: Fri Sep 12, 2014 10:00 pm

why doesn't 'zmcontrol stop' work?

Postby jholder » Wed Mar 07, 2007 10:25 pm

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
ipguru99
Posts: 32
Joined: Fri Sep 12, 2014 10:12 pm

why doesn't 'zmcontrol stop' work?

Postby ipguru99 » Thu Mar 08, 2007 2:24 pm

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
ipguru99
Posts: 32
Joined: Fri Sep 12, 2014 10:12 pm

why doesn't 'zmcontrol stop' work?

Postby ipguru99 » Sat Mar 10, 2007 6:11 pm

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!
dkarp
Elite member
Elite member
Posts: 1410
Joined: Fri Sep 12, 2014 9:52 pm

why doesn't 'zmcontrol stop' work?

Postby dkarp » Sat Mar 10, 2007 6:53 pm

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.
ipguru99
Posts: 32
Joined: Fri Sep 12, 2014 10:12 pm

why doesn't 'zmcontrol stop' work?

Postby ipguru99 » Sun Mar 11, 2007 4:14 pm

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

Return to “Administrators”

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 9 guests