You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by si...@insession.com on 2005/04/29 08:58:48 UTC
Exceptions logged when doStart(..) fails
I still get way too much information (stack traces) logged when the jetty
port is in use when Geronimo is started ( I am running with the jetty
patch mentioned in an earlier mail that prevents the NullPointerException
in org.mortbay.util.ThreadedServer.stop(..) )
Preferably when we get a BindException we should just be logging a
friendly error message rather than a stack trace.
It appears that there is no way for the JettyConnector.doStart() to catch
the error and log a message, as it is expected to throw an exception to
indicate the start failed.
Is there something I am overlooking, or do we need to look at providing a
way for GBeanLifecycle methods to fail without causing a stacktrace to be
logged.
John
Here is what I now see with the Jetty patch applied when the jetty port is
in use:
15:00:21,951 INFO [SocketListener] Stopped SocketListener on 0.0.0.0:8080
15:00:21,978 ERROR [GBeanInstanceState] Error while starting; GBean is now
in the FAILED state:
objectName="geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Server,J2EEServer=geronimo,j2eeType=GBean,name=JettyWebConnector"
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
at java.net.ServerSocket.bind(ServerSocket.java:318)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at
org.mortbay.util.ThreadedServer.newServerSocket(ThreadedServer.java:391)
at org.mortbay.util.ThreadedServer.open(ThreadedServer.java:477)
at
org.apache.geronimo.jetty.connector.JettyConnector.doStart(JettyConnector.java:71)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:841)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:331)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:477)
at
org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullStart(GBeanSingleReference.java:149)
at
org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(GBeanSingleReference.java:124)
at
org.apache.geronimo.gbean.runtime.AbstractGBeanReference.addTarget(AbstractGBeanReference.java:244)
at
org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(GBeanSingleReference.java:158)
at
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:153)
at
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:36)
at
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:229)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:354)
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:494)
at
org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:141)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:494)
at
org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
at org.apache.geronimo.system.main.Daemon.main(Daemon.java:185)
15:00:22,050 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:497)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:353)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:111)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:477)
at
org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullStart(GBeanSingleReference.java:149)
at
org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(GBeanSingleReference.java:124)
at
org.apache.geronimo.gbean.runtime.AbstractGBeanReference.addTarget(AbstractGBeanReference.java:244)
at
org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(GBeanSingleReference.java:158)
at
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:153)
at
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:36)
at
org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:229)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:354)
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:494)
at
org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
at
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:141)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:494)
at
org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:339)
at org.apache.geronimo.system.main.Daemon.main(Daemon.java:185)
15:00:22,589 INFO [HOWLLog] Initiating transaction manager recovery
John
This e-mail message and any attachments may contain confidential,
proprietary or non-public information. This information is intended
solely for the designated recipient(s). If an addressing or transmission
error has misdirected this e-mail, please notify the sender immediately
and destroy this e-mail. Any review, dissemination, use or reliance upon
this information by unintended recipients is prohibited. Any opinions
expressed in this e-mail are those of the author personally.