Thursday, January 31, 2008

Server did not start after 50s

I got this error while starting up JBoss from Eclipse, 3.3 with the latest JBoss Tools installed (I haven't shelled out the $100 for Red Hat Developer Studio.)

"Timeout waiting for JBOSS 4.2 to start. Server did not start after 50s."

At December's AJUG meeting I saw a demonstration of Glassfish starting in under a minute, which was seriously impressive. However, Eclipse can't be pimping Glassfish, and while I am interested in giving Glassfish a look, I need this running now. Besides, I like JBoss.

I deleted a couple of the ear files that I wasn't working on, but I kept getting the timeout error. A quick Google, and I located the following folders in my EclipseDist\plugins directory :
  • org.eclipse.jst.server.generic.jboss_1.5.102.v20070608
  • org.eclipse.jst.server.generic.jboss_1.5105.v200709061325.
I edited the plugin.xml in the org.eclipse.jst.server.generic.jboss_1.5105.v200709061325 folder. The relevant parts were the serverType entries, startTimeout parameters.

<extension point="org.eclipse.wst.server.core.serverTypes">
<serverType
runtime="true"
class="org.eclipse.jst.server.generic.core.internal.GenericServer"
id="org.eclipse.jst.server.generic.jboss323"
initialState="stopped"
supportsRemoteHosts="false"
runtimeTypeId="org.eclipse.jst.server.generic.runtime.jboss323"
description="%jboss323serverTypeDescription"
launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
behaviourClass="org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour"
name="%jboss323serverTypeName"
startTimeout="50000"
stopTimeout="15000"
hasConfiguration="false"
launchModes="run,debug,profile">
</serverType>
<serverType
runtime="true"
class="org.eclipse.jst.server.generic.core.internal.GenericServer"
id="org.eclipse.jst.server.generic.jboss4"
initialState="stopped"
supportsRemoteHosts="false"
runtimeTypeId="org.eclipse.jst.server.generic.runtime.jboss4"
description="%jboss4serverTypeDescription"
launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
behaviourClass="org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour"
name="%jboss4serverTypeName"
startTimeout="50000"
stopTimeout="15000"
hasConfiguration="false"
launchModes="run,debug,profile">
</serverType>
<serverType
runtime="true"
class="org.eclipse.jst.server.generic.core.internal.GenericServer"
id="org.eclipse.jst.server.generic.jboss42"
initialState="stopped"
supportsRemoteHosts="false"
runtimeTypeId="org.eclipse.jst.server.generic.runtime.jboss42"
description="%jboss42serverTypeDescription"
launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
behaviourClass="org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour"
name="%jboss42serverTypeName"
startTimeout="50000"
stopTimeout="15000"
hasConfiguration="false"
launchModes="run,debug,profile">
</serverType>
<serverType
runtime="true"
class="org.eclipse.jst.server.generic.core.internal.GenericServer"
id="org.eclipse.jst.server.generic.jboss5"
initialState="stopped"
supportsRemoteHosts="false"
runtimeTypeId="org.eclipse.jst.server.generic.runtime.jboss5"
description="%jboss5serverTypeDescription"
launchConfigId="org.eclipse.jst.server.generic.core.launchConfigurationType"
behaviourClass="org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour"
name="%jboss5serverTypeName"
startTimeout="50000"
stopTimeout="15000"
hasConfiguration="false"
launchModes="run,debug,profile">
</serverType>
</extension>

I changed the values to 180000 ms and JBoss booted just fine.

Blogged with Flock

6 comments:

knaas said...

It should also be possible to control this through the Eclipse Preferences. At least in in the base Eclipse with WTP, the Window...Preferences....Server shows a dropdown that allows you to choose between 5-6 values. I normally have it set to "Longest". Of course, if running in Debug mode, it will still eventually timeout which seems just plain silly.

Esteban J. Garcia said...

Thanks for the tip.
It was pretty annoying!
-
Esteban
http://www.subtitlesync.com.ar/English.html

spross said...

you can also edit it in the "Servers" Panel. just right-click the jboss server and chose "open": in this overview you will find "Timeouts".

Ragini said...

Very helpful tips.

Vinny said...

It is easier to modify settings in server view. Check
http://techthinking.net/2010/02/how-to-increase-server-timeout-in-eclipse/

Daniel said...

Hi guys, In some cases it does not work. The better to do is download the lastest jboss tolls to gain access to the view of timeout start of the jboss.