Search code examples
grails

Grails project run error -Server failed to start for port 8080: Address already in use: JVM_Bind


Error | Server failed to start for port 8080: Address already in use: JVM_Bind (Use --stacktrace to see the full trace)

When I going to execute my grails project second time using --- 2 Grails Command(run-app) struck with this type of error each and every time.

But when I kill the javaw.exe using Task Manager then if I will run again it works for me. Is there any permanent solution for this?..pls suggest.

|Packaging Grails application ..

|Compiling 10 source files ..

|Compiling 121 source files .......

|Compiling 9 source files .........................

|Running Grails application

Error | Server failed to start for port 8080: Address already in use: JVM_Bind (Use --stacktrace to see the full trace)


Solution

  • You can specify the HTTP port to run the server using the cli:

    Example:

    grails -Dserver.port=8090 run-app
    

    More details in the documentation