尝试从Spring Tool Suite IDE重新部署项目时,8080端口已经出现问题 [英] 8080 port already taken issue when trying to redeploy project from Spring Tool Suite IDE

查看:697
本文介绍了尝试从Spring Tool Suite IDE重新部署项目时,8080端口已经出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在Spring Tool Suite中修改Spring项目时,我有些奇怪。在第一次加载(部署)一切都很好,应用程序编译并在localhost上运行:8080

I have strange thing when I try to modify Spring project inside my Spring Tool Suite. On the first load (deploy) everything is fine, application compiles and runs on localhost:8080

当我在代码中更改某些内容并尝试重新部署它时(再次运行它 - Run As Spring Boot App)我收到错误消息

When I change something inside code and try to redeploy it (Run it again - Run As Spring Boot App) I get error message


****************** *********申请失败

*************************** APPLICATION FAILED TO START

描述:

配置为侦听端口8080的Tomcat连接器无法启动
。该端口可能已在使用中,或者连接器可能是
配置错误。

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

操作:

验证连接器的配置,识别并停止正在侦听端口8080的任何进程
,或将此应用程序配置为在另一个端口上侦听

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

2016 -10-19 00:01:22.615 INFO 10988 --- [main]
ationConfigEmbeddedWebApplicationContext:关闭
org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3023df74:
启动日期[Wed 10月19日00:01:19 CEST 2016];上下文
层次结构2016-10-19 00:01:22.616 INFO 10988 --- [main]
osjeaAnnotationMBeanExporter:在关闭时取消注册JMX暴露的
bean

2016-10-19 00:01:22.615 INFO 10988 --- [ main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3023df74: startup date [Wed Oct 19 00:01:19 CEST 2016]; root of context hierarchy 2016-10-19 00:01:22.616 INFO 10988 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown

如果我手动关闭该端口上的进程一切正常,但这不是重新部署Spring应用程序的正确方法。我在这里做错了吗?

If I shutdown process on that port manually everything works fine again, but this can't be right way of redeploying Spring app. Am I doing something wrong here?

我正在使用 :: Spring Boot ::(v1.4.1.RELEASE)

PS我知道我可以设置某种热插拔机制,在我更改代码后自动重新加载页面,但是现在我想首先解决这个问题。

P.S. I'm aware that I can setup some kind of hot-swap mechanism to have automatic reload of page after I change code, but for now I would like to resolve this issue first.

感谢您提供任何帮助或信息。

Thanks for any kind of help or info.

推荐答案

有时甚至在我们停止在IDE中运行进程时会发生帮助红色按钮,我们继续得到同样的错误。

It sometimes happen even when we stop running processes in IDE with help of Red button , we continue to get same error.

通过以下步骤解决了这个问题,

It was resolved with following steps,


  1. 检查可用端口上正在运行的进程

  1. Check what processes are running at available ports

netstat -ao | find /我倾听

我们得到以下

TCP 0.0.0.0:7981 machinename:0 LISTENING 2428
TCP 0.0.0.0:7982 machinename:0 LISTENING 2428
TCP 0.0.0.0:8080 machinename:0 LISTENING 12704
TCP 0.0.0.0: 8500 machinename:0 LISTENING 2428

ie 。端口号和他们正在监听的进程ID

i.e. Port Numbers and what Process Id they are listening to

停止在您的端口号上运行的进程(在这种情况下,它是8080& ;流程ID为12704)

Stop process running at your port number(In this case it is 8080 & Process Id is 12704)

Taskkill / F / IM 12704 (注意:提及正确的流程ID)

Taskkill /F /IM 12704 (Note: Mention correct Process Id)

我的问题已经解决了,希望这会有所帮助!

My Issue was resolved with this, Hope this helps !

这篇关于尝试从Spring Tool Suite IDE重新部署项目时,8080端口已经出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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