问题: mac启动springboot失败,8080端口被占用,mac命令行关闭端口|Java Web后台开发|在线助手,您的在线生成制作工具箱!
问题关键字: mac启动springboot失败,8080端口被占用,mac命令行关闭端口,mac命令行查找占用端口,Java Web后台开发,Spring Boot,Spring Mvc,thymeleaf,在线助手,在线工具,!
问题详细描述: mac启动springboot失败端口被占用,8080端口被占用如何关闭,mac命令行怎么关闭端口,mac命令行怎么查找占用端口,it399在线助手以及在线助手博客专注于提供在线生成、在线制作等在线工具,以及提供在windows、Mac环境下使用eclipse、intellij idea进行JavaWeb后台开发专栏主要记录了开发过程中SpringBoot报错,SpringMVC报错,thymeleaf模板,vue使用,jsp报错,servlet报错,Mysql数据库报错等常见问题!
二三九九
mac启动springboot失败,8080端口被占用,mac命令行关闭端口
在线助手博客首页
###Hello world!
####如下图,idea启动springboot失败,8080端口被占用 ```java Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2018-05-23 22:18:43.688 ERROR 3793 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Web server failed to start. Port 8020 was already in use. Action: Identify and stop the process that's listening on port 8020 or configure this application to listen on another port. ``` ####mac下怎么使用命令行关闭端口呢? ####打开mac终端,或者idea的终端,输入: ```java lsof -i:端口号(我的是8020,那么输入如下命令) lsof -i:8020 ``` 输入 **lsof -i:8020** 后回车 ```java bogon:it399_springboot chenshouyin$ lsof -i:8020 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 1472 chenshouyin 120u IPv6 0x71c9463ce2ac6f49 0t0 TCP *:intu-ec-svcdisc (LISTEN) bogon:it399_springboot chenshouyin$ ``` 可以看到我的端口对应的进程id是1472,那么kill这个进程即可 ####mac下关闭进程 kill 进程id,上面我的进程id是1472,那么直接输入如下命令即可 ```java kill 1472 ``` ####关闭占用端口的进程之后,再启动springboot不再报错了 > 本文同步发布在 [在线助手](https://www.it399.com) ,**转载请注明来自 [在线助手博客](https://www.it399.com/blog/index) 频道【mac启动springboot失败,8080端口被占用,mac命令行关闭端口](http://localhost:8021/blog/web/201805251638)】,原文链接**:**https://www.it399.com/blog/web/201805251638**
返回顶部
下载Android客户端
Copyright © 2017-2018 . All Rights Reserved.
粤ICP备18008506号