Server JBoss v5.0 at localhost was unable to start within 50 seconds. If the server
requires more time, try increasing the timeout in the server editor.
初次看到這個錯誤以為是由于時間問題造成的,因此在網上搜了一下,就得到下面的解決辦法,如紅色字體所示把指定文件的特定start-timeout值修改大一些,我沒別人貪心,就把50擴大了10倍,結果等到JBOSS啟動500s后仍出現上述錯誤。500s還不夠???我有點懷疑到底是不是時間的問題。所以就把一次JBOSS啟動的log看了一遍。事實證明我的懷疑不是多余的。從log中得知,原來是系統的8009端口被占用,關閉占用8009port的程序,重新啟動JBOSS(start-time仍為500s),哈哈,啟動成功。把start-time改回50,依然啟動成功。 因此,造成unable to start within 50 seconds的真正原因是啟動JBOSS程序所需port被占用,解決辦法:關閉占用port8009的程序或者修改JBOSS啟動的8009端口。
解決辦法:
修改 workspace\.metadata\.plugins\org.eclipse.wst.server.core\servers.xml文件。
<servers>
<server hostname="localhost" id="JBoss v5.0 at localhost" name="JBoss v5.0 at
localhost" runtime-id="JBoss v5.0" server-type="org.eclipse.jst.server.generic.jboss5"
server-type-id="org.eclipse.jst.server.generic.jboss5" start-timeout="1000" stop-
timeout="15" timestamp="0">
<map jndiPort="1099" key="generic_server_instance_properties" port="8090"
serverAddress="127.0.0.1" serverConfig="default"/>
</server>
</servers>
把 start-timeout="50" 改為 start-timeout="1000"
重啟eclipse就可以了。