Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 87463 invoked from network); 13 Jul 2005 22:40:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jul 2005 22:40:38 -0000 Received: (qmail 94044 invoked by uid 500); 13 Jul 2005 22:40:30 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 93987 invoked by uid 500); 13 Jul 2005 22:40:30 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 93945 invoked by uid 99); 13 Jul 2005 22:40:29 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2005 15:39:16 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id D76E31B for ; Thu, 14 Jul 2005 00:39:12 +0200 (CEST) Message-ID: <816810293.1121294352880.JavaMail.jira@ajax.apache.org> Date: Thu, 14 Jul 2005 00:39:12 +0200 (CEST) From: "Kevan Miller (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Commented: (GERONIMO-729) Startup tries to start failed service? In-Reply-To: <1694903486.1120838832848.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/GERONIMO-729?page=comments#action_12315792 ] Kevan Miller commented on GERONIMO-729: --------------------------------------- I ran into the same problem with a port conflict. Did a little digging around. IMO the problem is as follows: Here are lines 326-352 of modules\kernel\src\java\org\apache\geronimo\gbean\runtime\GBeanInstanceState.java from the unstable build geronimo-1.0-169186: try { // try to create the instance if (!gbeanInstance.createInstance()) { // instance is not ready to start... this is normally caused by references // not being available, but could be because someone alreayd started the gbean. // in another thread. The reference will log a debug message about why // it could not start return; } } catch (Throwable t) { // oops there was a problem and the gbean failed setStateInstance(State.FAILED); lifecycleBroadcaster.fireFailedEvent(); if (t instanceof Exception) { log.error("Error while starting; GBean is now in the FAILED state: objectName=\"" + objectName + "\"", t); } else if (t instanceof Error) { throw (Error) t; } else { throw new Error(t); } } // started successfully... notify everyone else setStateInstance(State.RUNNING); lifecycleBroadcaster.fireRunningEvent(); } So, even if we catch a Throwable and set the state to FAILED, we'll still try to set state to RUNNING. Were it me, I'd stick a "return;" at the end of the catch (Throwable) clause... > Startup tries to start failed service? > -------------------------------------- > > Key: GERONIMO-729 > URL: http://issues.apache.org/jira/browse/GERONIMO-729 > Project: Geronimo > Type: Bug > Components: kernel > Versions: 1.0-M3 > Reporter: Aaron Mulder > > If you start the server and Jetty can't bind to it's port, you get a variety of exceptions from Jetty, followed by: > 12:04:06,655 WARN [GBeanSingleReference] Exception occured while attempting to fully start: objectName=geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/ > Server,J2EEServer=geronimo,j2eeType=GBean,name=JettyWebConnector > java.lang.IllegalStateException: Cannot transition to running state from failed > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.setStateInstance(GBeanInstanceState.java:496) > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:351) > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111) > at org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:486) > at org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullStart(GBeanSingleReference.java:154) > at org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(GBeanSingleReference.java:127) > at org.apache.geronimo.gbean.runtime.AbstractGBeanReference.addTarget(AbstractGBeanReference.java:242) > at org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(GBeanSingleReference.java:163) > at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:155) > at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:38) > at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:231) > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:352) > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111) > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:133) > at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:503) > at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:207) > at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:141) > at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:503) > at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:207) > at org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:247) > at org.apache.geronimo.system.main.Daemon.(Daemon.java:81) > at org.apache.geronimo.system.main.Daemon.main(Daemon.java:320) > It's not obvious to me what is happening -- it sounds kind of like the service failed to load or start but the kernel goes on and tries to start it again anyway. Perhaps it should notice that the GBean is in the failed state and not try to start it in that case. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira