Disconnected from the target VM, address: '127.0.0.1:56577', transport: 'socket' 端口占用

发布时间 2023-10-25 12:46:30作者: sunny123456

Disconnected from the target VM, address: '127.0.0.1:56577', transport: 'socket' 端口占用

Disconnected from the target VM, address: '127.0.0.1:56577', transport: 'socket'

Disconnected from the target VM=与目标虚拟机断开连接。

PS:通俗点讲就是:你的端口已经被其他程序占用,无法连接目标虚拟机。

在cmd中输入命令:netstat -ano,查看所有端口的占用情况

去任务管理器中查找PID为10652

IDEA 与 Maven 的版本不兼容造成的

 

启动运行时:

Connected to the target VM, address: '127.0.0.1:56577', transport: 'socket'

maven配置是:

<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>3.0.11.RELEASE</version>
</dependency>


而我用的是idea2019.1占用了端口

所以改一下版本
<!--模板引擎thymeleaf-->
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>2.1.4</version>
</dependency>

启动运行时端口就改了
Connected to the target VM, address: '127.0.0.1:60206', transport: 'socket'

就没有报错了,完美解决!

 

原文链接:https://www.cnblogs.com/javawxid/p/11139047.html