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