grails项目启动时的Disconnected from the target VM, address: '127.0.0.1:xxxxx'错误

Posted 残虹急雨

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了grails项目启动时的Disconnected from the target VM, address: '127.0.0.1:xxxxx'错误相关的知识,希望对你有一定的参考价值。

今天在启动(debug方式)grails项目时,突然出现了一个错误

Connected to the target VM, address: ‘127.0.0.1:63073‘, transport: ‘socket‘

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

大意就是连接不上目标虚拟机了

在我的理解下,grails项目编译类似于一种缓存的机制,避免项目代码重复编译影响效率,

因为每次debug模式启动项目,程序会临时启动一个监听端口,监听该端口代码变化

所以由于该项目之前已经经过编译,该缓存仍然存在.VM端口已固定,这个临时端口连接不上虚拟机的固定端口.

以上为我个人的理解.

解决方式如下

清除grails编译文件: 执行grails clean命令即可.

以上是关于grails项目启动时的Disconnected from the target VM, address: '127.0.0.1:xxxxx'错误的主要内容,如果未能解决你的问题,请参考以下文章

Grails STS 项目不会启动 Web 服务

Grails 项目运行错误 - 服务器无法为端口 8080 启动:地址已在使用中:JVM_Bind

Vue用webpack搭建的项目遇到的disconnected问题

向 Grails 发送日期时的 GORM 默认日期格式

使用 Grails 创建 Google 登录

使用 Grails 和 Spring Security 作为后端时的 Angular 前端身份验证