[Solved] Disconnected from the target VM, address : ‘127.0.0.1:6847’ , transport : ‘socket’

Disconnected from the target VM, address : ‘127.0.0.1:6847’ , transport : ‘socket’

Cause Analysis 1 The Tomcat used by the server, the compilation and packaging method is not set to war [the default packaging method is jar]
Scenes Unable to start when starting projectimage

1. Set the packaging method to war in pom.xml
image-20220727191657448

Cause Analysis 2 Port is occupied
Scenes Unable to start when starting projectimage

1. First check the startup status of the port

​ Win+R Enter cmd to open the DOS command box, enter netstat -ano | findstr 8060 [where 8060 is the port number of the running project] If this is image
displayed, it means that the background port 8060 is still running, and the PID is 10316, so kill the port process, Just restart the project

2. Kill the process, choose one of the two methods

​ 2.1, Ctrl + alt + delete, start the task manager, find the corresponding program according to the PID, right-click to end the taskimage

​ 2.2. According to tasklist | findstr 10316, query what program is occupying port 8060, of which 10316 is the PID queried above.image

​ Just continue to execute taskkill /f /t /im java.exe
​ (or) directly execute taskkill /pid 10316 -t -f to force kill the process

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *