start-domain failed Glassfish on Windows 7

前端 未结 3 1291
栀梦
栀梦 2021-01-15 01:07

I wanted to start a Glassfish 4.1.1-Server on Windows 7 with JAVA 8 JDK 66, but my command asadmin start-domain failed. This seems to be an obscure error because I get a pre

相关标签:
3条回答
  • 2021-01-15 01:28

    It seems that Glassfish cannot start because an address it is trying to bind is already in use.

    Shutting down server due to startup exception java.net.BindException: Address already in use: bind

    Try to edit the domain.xml.

    /glassfish/domains/domain1/config/domain.xml

    The most common problem would be that the http-listener ports are reused by another application. Find the lines:

    name="http-listener-1" port="8080" name="http-listener-1" port="9090"

    And replace them with something like:

    name="http-listener-2" port="8181" name="http-listener-2" port="9191"

    You can also read more about the domain.xml

    https://docs.oracle.com/cd/E19226-01/820-7694/abhar/index.html

    0 讨论(0)
  • 2021-01-15 01:35

    I had same problem, same messages (might be different cause), I solved it by moving (unzip) Glassfish folder to a different location. The problem was that when I unziped GlassFish.zip on C:\ the folder's owner was "Administrator". By unzipping it in a different location (like c:\servers\GlassFish), the owner was my regular user. Plus I changed port="8080" and "8181" (to a 8060, 8061 in my case). My glassFish domain started successfully afterwards, I don't know which of those changes fixed it, and I don't care anymore.

    0 讨论(0)
  • 2021-01-15 01:39

    Even I had the same problem...

    1. Copy the Glassfish folder into the C:\users{your-pc-name}
    2. Configure or Start cmd with C:\users{your-pc-name} by right clicking the cmd-> properties
    3. Then run asadmin

    It worked for me perfectly

    Its important that the path in which you have started your cmd and that the glassfish folder runs in that path

    0 讨论(0)
提交回复
热议问题