java.net.BindException: Address already in use: bind-程序员宅基地

技术标签: # 异常收藏集  大学与Java那些年  

在启动springboot项目的时候,出现了这个错误:

端口被其他进程占用。

解决方法:关闭后台Tomcat或者Oracle服务进程。如果不行,则关闭console的其他后台进程。

java.net.BindException: Address already in use: bind
	at sun.nio.ch.Net.bind0(Native Method) ~[na:1.7.0_80]
	at sun.nio.ch.Net.bind(Net.java:463) ~[na:1.7.0_80]
	at sun.nio.ch.Net.bind(Net.java:455) ~[na:1.7.0_80]
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.7.0_80]
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.7.0_80]
	at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:990) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:635) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.connector.Connector.startInternal(Connector.java:1022) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) [tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:250) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:193) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) [spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at com.jcn.seckillproject.MainApplication.main(MainApplication.java:14) [classes/:na]

2019-03-28 19:50:13.168 ERROR 18032 --- [           main] o.apache.catalina.core.StandardService   : Failed to start connector [Connector[HTTP/1.1-8080]]

org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8080]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:250) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:193) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) [spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
	at com.jcn.seckillproject.MainApplication.main(MainApplication.java:14) [classes/:na]
Caused by: org.apache.catalina.LifecycleException: service.getName(): "Tomcat";  Protocol handler start failed
	at org.apache.catalina.connector.Connector.startInternal(Connector.java:1031) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
	... 13 common frames omitted
Caused by: java.net.BindException: Address already in use: bind
	at sun.nio.ch.Net.bind0(Native Method) ~[na:1.7.0_80]
	at sun.nio.ch.Net.bind(Net.java:463) ~[na:1.7.0_80]
	at sun.nio.ch.Net.bind(Net.java:455) ~[na:1.7.0_80]
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.7.0_80]
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.7.0_80]
	at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:990) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:635) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
	at org.apache.catalina.connector.Connector.startInternal(Connector.java:1022) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
	... 14 common frames omitted

2019-03-28 19:50:13.179  INFO 18032 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2019-03-28 19:50:13.276  INFO 18032 --- [           main] utoConfigurationReportLoggingInitializer : 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-03-28 19:50:13.280 ERROR 18032 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

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

Description:

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.

Action:

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.

2019-03-28 19:50:13.281  INFO 18032 --- [           main] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@230924b1: startup date [Thu Mar 28 19:50:07 CST 2019]; root of context hierarchy
2019-03-28 19:50:13.282  INFO 18032 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

 

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_41723615/article/details/88876794

智能推荐

简单的Android端新闻App的实现_安卓新闻app开发实例-程序员宅基地

文章浏览阅读3.3k次,点赞5次,收藏50次。先上效果图:图一 : 图二: 总体思路概述:如图本app界面简单,图一的最顶端是安卓原生的标题栏,图二的最顶端是我自己定义的标题栏,具体代码后面再说。图一标题栏下面是五个TextView表示五个板块,再下面是Fragment+ViewPager的滑动页面,Fragment里面是Recyclerview控件,当滑动页面滑到相应版块时上面的相应的TextView会变成浅蓝色。当点击RecyclerView里的item时可以进入到图二:因为所用的api没有返回相应的内容信..._安卓新闻app开发实例

android mac 安装目录在哪个文件夹,Android Studio插件的源文件位置――mac端-程序员宅基地

文章浏览阅读2.6k次。Android Studio插件的源文件位置――mac端Android Studio中我们可以通过菜单栏的Android Studio --> preferences --> plugins来查看我们安装的插件。这里介绍下插件的实际安装位置。系统安装的插件在第一次安装as的时候,系统会为我们安装一堆插件,他们的位置位于/Applications/Android Studio.app/C..._/applications/android studio 2.app/contents/plugins/android/resources文件在

计算机打印共享服务,Windows 7系统快速设置共享打印机-程序员宅基地

文章浏览阅读781次。Windows 7系统快速设置共享打印机共享打印机共享打印是指打印机通过数据线连接某一台电脑(主机)设置共享后,局域网中的其他电脑(客户机)就可以使用此打印机。共享打印和共享文件相同,是Windows系统提供的一项服务,配置共享打印需要两台电脑能够相互访问。本资料适用于32位和32位系统或者64位和64位系统之间共享打印机,不适合32位和64位系统之间共享打印机,因为驱动不同无法快速连接,可以点击..._打印机共享服务

计算机蓝屏 代码0000a,win7电脑蓝屏代码显示0x0000001A的解决方法-程序员宅基地

文章浏览阅读2k次。这里为大家介绍的是解决win7电脑蓝屏代码显示0x0000001A的方法,在使用电脑的时候遇到蓝屏的问题想必已经是老生常谈了吧,不过对于出现蓝屏的原因有很多,每次出现蓝屏都会产生一个代码,只要知道了代码的含义就可以找到方法对症下药的解决这个蓝屏问题,现在就随小编来学习一下电脑蓝屏代码显示0x0000001A怎么解决吧。故障图:原因分析:这是内存管理错误,往往是由硬件引起的,比如新安装的硬件、内存本..._电脑蓝屏00000001a

QSS祛除QTreeView虚线框用法_qss treeview setstylesheet-程序员宅基地

文章浏览阅读2k次。祛除QTreeView的虚线框,主要在QSS中,用outline:none,用法:QTreeView{outline:none}。1.1下面是一个具体的应用用法:recoveryTreeView->setStyleSheet("QTreeView{background-color: transparent;color:white;font: bold 14px;outline:none;}"..._qss treeview setstylesheet

黑马程序员——java第二十二天:GUI_private button b什么意思-程序员宅基地

文章浏览阅读980次。------- android培训、java培训、期待与您交流! ----------GUIGUI——Graphical UserInterface(图形用户接口)。CLI——Command line UserInterface (命令行用户接口)就是常见的Dos命令行操作。 Java为GUI提供的对象都存在java.Awt和javax.Swing两个包中。 jav_private button b什么意思

随便推点

vue组件中使用elementUI样式(row-class-name)无效问题_label-class-name失效-程序员宅基地

文章浏览阅读1.6w次,点赞7次,收藏11次。问题描述vue项目中,需要给vue表格中的每一行加入自定义的样式,根据文档给<el-table>组件加上row-class-name属性即可,直接加入该属性并且在当前vue组件中配置对应class发现样式并没有生效。解决方案1.使用全局属性在elementUI中,row-class-name、row-style、cell-class-name等属性要想生效必须使用全局class..._label-class-name失效

linux性能优化-cpu使用率_linux 系统节拍率-程序员宅基地

文章浏览阅读1k次,点赞30次,收藏24次。当然,也可以用每一个场景的CPU 时间,除以总的 CPU 时间,计算出每个场景的CPU使用率。不是平均负载,也不是CPU上下文切换,而是另一个更直观的指标CPU使用率,CPU使用率是单位时间内CPU使用情况的统计,以百分比的方式展示。性能分析工具给出的都是间隔一段时间的平均CPU使用率,所以要注意间隔时间的设置,特别是用多个工具对比分析时,你一定要保证他们用的是相同的间隔时间。,是动态共享对象的类型。虽然实时展示了系统的性能信息,但它的缺点是并不保存数据,也就无法用于离线或者后续的分析。_linux 系统节拍率

设置HTML中的checkbox默认为选中的状态_checkbox 默认勾选-程序员宅基地

文章浏览阅读1.2w次。<input type="checkbox" checked/> _checkbox 默认勾选

计算器界面布局JAVA_JAVA开发简易计算器界面-SWT-程序员宅基地

文章浏览阅读721次。大家好,我是成都[LD],博客四年前就申请了,一直没打理,最近正好有时间,遂萌生了写技术博客的念头。我不得不感慨现在新技术更新很快,一不小心,就感觉自身就Out了。记得一年前,当时我也是在51CTO上了解到NoSQL和Hadoop这样的信息,当时就简单觉得很新奇,没想到一年之后发展如此迅速~~当然我这样说,并不是叫大家去追寻新技术,最根本的还是基础打牢靠,休息的时候多去了解下最新的IT动态、学习下..._简易计算器布局java

Bootstrap fileinput插件使用的那些坑_fileinput.js 坑-程序员宅基地

文章浏览阅读7.8k次。最近找到了一个好用的文件上传插件,最主要的是兼容Bootstrap样式,这样对后天的开发人员来说就比较舒服了,但是在使用的时候遇到了一些问题,我把它记下来 一、文件加载顺序问题fileinput.js需要加载这个js。 在这个js加载之前先加载bootstrap.js,还有这个插件有中文zh.js需要在fileinput.js之后引入,还有css文件引入顺序也跟这个差不多。不然之后页面刷新可_fileinput.js 坑

访问权限修饰符详解(public,private,protected和friendly(默认))_访问权限修饰符有哪几种-程序员宅基地

文章浏览阅读3.2k次。访问权限修饰符详解(public,private,protected和friendly(默认))在Java语言中提供了多个作用域修饰符,其中常用的有public,private,protected,final,abstract,static,transient和volatile,这些修饰符有类修饰符,变量修饰符和方法修饰符。本文将只要介绍访问权限修饰符。在现实生活中,一个公司不同职位的职工,被分配的任务不同,所拥有的权力也不同。想要执行某一操作,必修要先得到执行该操作的权力。一般而言,这对对象也同样适用_访问权限修饰符有哪几种