简体   繁体   中英

“java.net.BindException: Address already in use: JVM_Bind” when I start Jetty in eclipse mars

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':project-web:jettyRun'.

    java.util.concurrent.ExecutionException: java.net.BindException: Address alrea dy in use: JVM_Bind

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

WARN:oejuc.AbstractLifeCycle:FAILED SelectChannelConnector@0.0.0.0:8080 FAILED: java.net.BindException: Address already in use

I had the same problem. In my case i tried to run jetty server on windows 8. When i execute mvn jetty:run command had the error on port number 8080. My port no 8080 was running by malware(sysnetwk.exe) after i killed the process(sysnetwk.exe) running on 8080 jetty server started. it works fine now If anyone has this problem they can follow below steps

  1. you need to find which process running on port no (in my case port no 8080)

    c:\\ Windows\\system32>netstat -ano | findstr 8080

    TCP 0.0.0.0:8080 LISTENING 6772

  2. Kill the process using PID

    c:\\ Windows\\system32>taskkill /F /pid 6772

    Success: process terminated.

If you can't kill the process using cmd prompt then you can use task manager( ctrl+shift+esc ) to kill the process

This may be because of other thread already using the JVM debug port. go to the task manager and kill the javaw.exe and java.exe and try again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM