so schaut die config vom monit für den tomcat aus:
Code: Select all
check process tomcat with pidfile /srv/www/tomcat/logs/tomcat.pid
start = "/etc/init.d/tomcat start"
stop = "/etc/init.d/tomcat stop"
if failed host 127.0.0.1 port 8009 then restart
if totalmem > 200 Mb then alert
if cpu usage > 90% for 3 cycles then restart
if 5 restarts within 5 cycles then timeout
group www
depends tomcat_init
depends java_bin
check file tomcat_init with path /etc/init.d/tomcat
group www
check file java_bin with path /usr/java/jdk/bin/java
group www
Über '/etc/init.d/tomcat start' ist es normal möglich den tomcat zu starten.
Wenn ich den tomcat aus habe und monit starte, dann versucht monit den tomcat zu starten. klappt aber nicht.
Code: Select all
Apr 10 14:46:04 xxxxx monit[30367]: 'tomcat' process is not running
Apr 10 14:46:04 xxxxx monit[30367]: 'tomcat' trying to restart
Apr 10 14:46:04 xxxxx monit[30367]: 'tomcat' start: /etc/init.d/tomcat
Apr 10 14:46:04 xxxxx monit[30367]: 'tomcat' failed to start
der Teil mit 'failed to start' wird nicht immer mitgeliefert.
Der Eintrag für den Apache schaut im Prinzip genauso aus, da klappt das starten aber. Auch das Starten vom Mailserver geht.
Nur tomcat will nicht.
Da monit als root läuft sollte das doch beim tomcat kein Problem machen.
Hat hier wer ne Idee was ich falsch mach ?