Eclipse中的Spring Boot应用程序,配置为侦听端口XXXX的Tomcat连接器无法启动 [英] Spring Boot application in eclipse, the Tomcat connector configured to listen on port XXXX failed to start

查看:417
本文介绍了Eclipse中的Spring Boot应用程序,配置为侦听端口XXXX的Tomcat连接器无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Spring Framework开发REST API.

I'm developing a REST API using Spring Framework.

首先,由于相同的问题,我无法运行我的应用程序.我的计算机上的端口8080繁忙. 然后,我发现解决此问题的另一种方法是在src/main/resources文件夹下创建一个application.properties文件. 这就是我所做的,并将服务器设置为侦听端口8090.此操作仅在第一次使用时有效,现在,当我第二次尝试运行该应用程序时,都会遇到相同的异常.

First I wasn't able to run my application because of the same problem. The port 8080 on my computer is busy. Then I found out that one alternative to solve this problem is creating an application.properties file under src/main/resources folder. That's what I made, and set up the server to listen on port 8090. This worked but only for the first time, now I'm getting the same exception whenever I try to run the application for the second time.

Description:

The Tomcat connector configured to listen on port 8090 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 8090, or configure this application to listen on another port.

据我所知,该框架利用apache tomcat的嵌入式实例来部署每个应用程序.

As far as I know, this framework makes use of an embedded instance of apache tomcat to deploy every application.

我的猜测是,第二次尝试运行该应用程序时服务器没有重启,这就是为什么输出显示端口可能已在使用中,或者连接器配置错误"的原因.

My guess is, the server is not getting restarted the second time I try to run the app, that's why the output says " The port may already be in use or the connector may be misconfigured"

因此,一个更具体的问题是,如何手动或以编程方式管理apache tomcat的嵌入式实例?

So, a more specific question would be, how can I manage the embedded instance of apache tomcat either manually or programmatically?

我还修改了application.properties文件中的端口两次.它工作正常,但再次,仅是第一次.您可以想象,每次执行该应用程序时,我都无法做同样的事情.

I've also modified the port in the application.properties file twice. It works fine, but again, only for the first time. As you can imagine I cannot do the same each time the app is going to be executed.

推荐答案

在控制台上,查看对话框的最右上角,您应该会看到一个红色按钮,类似于蜂鸣器.要正确停止Spring Boot应用程序,您只需要运行即可,继续并单击该特定的红色"按钮即可解决问题.希望这会有所帮助!

On the console, looking at the topmost right side of the dialog you should see a red button kinda like a buzzer. To stop the spring boot application properly you just ran, go ahead and hit this particular "red" button and your problem is solved. Hope this helps!

这篇关于Eclipse中的Spring Boot应用程序,配置为侦听端口XXXX的Tomcat连接器无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆