我运行$ asadmin start-domain命令,域正常启动。然后,当我尝试登录我的管理控制台时,即使在终端中它也说明了,它也不会加载。我尝试通过停止它来重启我的服务器并且它说它没有运行,我尝试再次启动它并且我得到了这个:
Ť
he server exited prematurely with exit code 0.
Before it died, it produced the following output:
Launching GlassFish on Felix platform
[#|2011-03-18T16:46:27.209+0000|INFO|glassfish3.1|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=10;_ThreadName=main;|Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry|#]
[#|2011-03-18T16:46:27.403+0000|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=1;_ThreadName=main;|Network listener admin-listener on port 4848 disabled per domain.xml|#]
[#|2011-03-18T16:46:27.474+0000|SEVERE|glassfish3.1|grizzly|_ThreadID=11;_ThreadName=Grizzly-kernel-thread(1);|doSelect IOException
java.net.BindException: No free port within range: 7676=com.sun.enterprise.v3.services.impl.ServiceInitializerHandler@3a78ad
at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.java:432)
at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:378)
at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:188)
at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
|#]
[#|2011-03-18T16:46:27.474+0000|SEVERE|glassfish3.1|grizzly|_ThreadID=13;_ThreadName=Grizzly-kernel-thread(1);|doSelect IOException
java.net.BindException: No free port within range: 3700=com.sun.enterprise.v3.services.impl.ServiceInitializerHandler@18297fe
at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.java:432)
at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:378)
at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:188)
at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
|#]
[#|2011-03-18T16:46:27.474+0000|SEVERE|glassfish3.1|grizzly|_ThreadID=12;_ThreadName=Grizzly-kernel-thread(1);|doSelect IOException
java.net.BindException: No free port within range: 8181=com.sun.enterprise.v3.services.impl.monitor.MonitorableSSLSelectorHandler@c8d62f
at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.java:432)
at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:378)
at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:188)
at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
|#]
[#|2011-03-18T16:46:27.705+0000|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|GlassFish Server Open Source Edition 3.1 (43) startup time : Felix (1,595ms), startup services(769ms), total(2,364ms)|#]
[#|2011-03-18T16:46:27.706+0000|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|Shutting down v3 due to startup exception : No free port within range: 8080=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@1216f5a|#]
[#|2011-03-18T16:46:27.725+0000|INFO|glassfish3.1|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin|_ThreadID=34;_ThreadName=Thread-16;|Server shutdown initiated|#]
[#|2011-03-18T16:46:27.733+0000|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=34;_ThreadName=Thread-16;|Already stopped, so just returning|#]
Command start-domain failed.
我不明白发生了什么,我知道它说端口是绑定的,但为什么我之前能够启动我的服务器?
答案 0 :(得分:1)
我敢打赌,还有一个正在运行的java副本正在保留这些端口。此外,如果服务器崩溃,它们可能需要很短的时间才能清除。崩溃的原因是主要问题,应该在服务器日志中更进一步。
答案 1 :(得分:0)
在我非常相似的情况下,最终帮助的是使用--kill
选项停止域名(--force
是不够的)。似乎前一次运行的一些残余仍然活跃。
答案 2 :(得分:0)
我不知道这个端口7676有什么问题但是当我把它改成9676时它工作得很好
您可以从
更改它glassfish3 /的glassfish /域/域1 /配置/ domain.xml中
<jms-service default-jms-host="default_JMS_host">
<jms-host port="9676" host="localhost" name="default_JMS_host"></jms-host>
</jms-service>