title: Cannot Connect to Glassfish Server 3 Admin Console
body: <p>I run $ asadmin start-domain command and the domain starts normally. Then when I try to login to my Admin Console it won't load even when in terminal it says it did. I try to restart my server by stoping it and it says that it's not running, I try to start it again and I get this:</p>
  
  <p>T</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>I don't understand what's happening, I know it says the ports are bound but why was I able to start my server before? </p>