解决 eclipse出现 Address already in use: bind

今天开发遇到下面问题,贴出部分异常信息,如下:

[WARNING] failed [email protected]0.0.0.0:8080
java.net.BindException: Address already in use: bind
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:444)
    at sun.nio.ch.Net.bind(Net.java:436)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
    at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:315)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.Server.doStart(Server.java:233)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
    at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:384)
    at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:320)
    at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:205)
    at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[WARNING] failed [email protected]

[INFO] Shutdown hook executing
[INFO] Destroying Spring FrameworkServlet ‘springmvc‘
2016-10-12 15:39:02,237  INFO XmlWebApplicationContext:1042 - Closing WebApplicationContext for namespace ‘springmvc-servlet‘: startup date [Wed Oct 12 15:38:57 CST 2016]; parent: Root WebApplicationContext
2016-10-12 15:39:02,238  INFO DefaultListableBeanFactory:444 - Destroying singletons in org.s[email protected]551b8762: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,accountAO,accountController,AccountBuzLogAO,accountBuzLogController,accountAmountAO,flowAO,flowController,accountOpenLogAO,accountOpenLogController,RechargeAO,rechargeController,accountRequestLogAO,accountRequestLogController,supplementAO,supplementController,acctransferAO,acctransferController,advForShopAO,advForShopController,billManageAO,billManageController,blockLogAO,blockController,buyerGoodsAO,buyerGoodsController,changeAcountAO,changeAcountController,adminController,compareAO,accountCompareController,cycleSettlementAO,cycleSettlementItemAO,cycleSettItemController,cycleSettlementController,inputInvoiceAccAO,inputInvoiceAccountController,inputInvoiceAccCloseAO,inputInvoiceAccountCloseController,inputInvoiceRecordAO,invoiceRecordController,inputInvoiceAO,invoiceController,/settlementLogAO,settlementLogController,mallDealAO,mallDealController,logisticsAO,logisticsController,processAO,processController,ordersDetailController,orderDetailController,goodsAO,goodsController,payAO,payController,payCancelAO,payCancelController,permissController,proceedsAO,proceedsController,rechargeRefundAO,rechargeRefundController,refundLogAO,refundLogController,secondSettlementAO,secondSettlementController,serviceFeeAO,serviceFeeController,suplierlogisticAO,suplierlogisticController,suplierprocessAO,suplierProcessController,accountAmtAO,fixInvoiceAO,fixPayAO,logisticProcessTempAO,payDBCompletingAO,accountAmtController,invoiceFixController,logisticProcessTempController,payFixController,testSellerGoodsController,testSendMQ,withdrawalsAO,withdrawalsController,contentNegotiationManager,org.springframework.web.servlet.view.ContentNegotiatingViewResolver#0,stringHttpMessageConverter,fastJsonHttpMessageConverter,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#1,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,velocityConfig,velocityViewResolver,exceptionResolver,multipartResolver,localeResolver,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; parent: org.s[email protected]39ced71b
[ERROR] failed jsp
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/JspApplicationContextImpl
    at org.apache.jasper.servlet.JspServlet.destroy(JspServlet.java:411)
    at org.mortbay.jetty.servlet.ServletHolder.destroyInstance(ServletHolder.java:318)
    at org.mortbay.jetty.servlet.ServletHolder.doStop(ServletHolder.java:289)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:78)
    at org.mortbay.jetty.servlet.ServletHandler.doStop(ServletHandler.java:171)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:78)
    at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:142)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:78)
    at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:142)
    at org.mortbay.jetty.servlet.SessionHandler.doStop(SessionHandler.java:124)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:78)
    at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:142)
    at org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:591)
    at org.mortbay.jetty.webapp.WebAppContext.doStop(WebAppContext.java:498)
    at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStop(Jetty6PluginWebAppContext.java:132)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:78)
    at org.mortbay.jetty.handler.HandlerCollection.doStop(HandlerCollection.java:169)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:78)
    at org.mortbay.jetty.handler.HandlerCollection.doStop(HandlerCollection.java:169)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:78)
    at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:142)
    at org.mortbay.jetty.Server.doStop(Server.java:281)
    at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:78)
    at org.mortbay.jetty.Server$ShutdownHookThread.run(Server.java:559)
Caused by: java.lang.ClassNotFoundException: org.apache.jasper.runtime.JspApplicationContextImpl
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
    ... 24 more
[ERROR] failed [email protected]

刚看到这个异常以为是启动了两个jetty,结果按照解决办法不行,重启eclipse也不行,到任务管理器里也没有发现占用端口的进程。

最终网上找到解决办法:

1、进入命令窗口,输入命令 :tasklist

其实这显示的就是任务管理器里服务那个页面内容,但是要比任务管理器里展示内容更多,就如我遇到的这个问题,其实是有个pid在任务管理器中是没有显示的。

2、输入命令:taskkill /im 要杀死的进程名称 /f

提示杀死成功,重启eclipse,启动项目,ok。

下面贴图 :

查询taskkill命令的使用方法:

“taskkill /im 映像名称.exe /f” 其中,“/im”后面接映像名称,“/f”的意思的强制结束如想看taskkill的更多用法,可用命令“taskkill /?”进行查看

时间: 2024-11-05 00:16:44

解决 eclipse出现 Address already in use: bind的相关文章

解决springboot 出现异常: java.net.BindException: Address already in use: bind

解决springboot 出现异常: java.net.BindException: Address already in use: bind 这是引文在启动springboot 的时候,没有关闭端口号8080(或者自定义的端口号),需要进行手动关闭. 操作步骤: 1,windows+R -->cmd,进入命令窗口. 2,命令行内输入 :netstat   -ano|findstr  8080 8080指的是你启动的时候的端口号 查找最后一列的pid. 命令行输入: taskkill  /pid

springboot项目启动时提示Address already in use: bind

PS:web项目在启动的时候,一般会报Address already in use: bind,常规的处理思路为:删除任务管理器中的javaw.exe进程即可:当删除仍然解决不了时,一般处理思路如下,以windows系统为例. 1.查看当前端口被哪个进程占用了(进入到CMD中) netstat -ano|findstr "8990" 输出结果为:       TCP    127.0.0.1:8990         0.0.0.0:0              LISTENING  

问题解决-Address already in use: bind

JavaWeb项目运行Jetty服务器的时候,出现这个错误 java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:437) at sun.nio.ch.Net.bind(Net.java:429) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocke

解决Eclipse中C++代码显示Symbol 'std' could not be resolved的问题

第一次在Eclipse中写C++代码,写了一个简单的hello world程序,还没有等我编译.就报出了各种错误,但是这么简单的代码.怎么可能这么多错误.于是没有理会.编译执行后,能够正常输出!!!Hello World!!!,但是我的代码中还是有非常多红叉,把鼠标放在上面显示:Symbol 'std' could not be resolved 这种信息. 于是问题来了.怎样解决? 方法:写完库函数以后立刻保存.这样写之后的代码就不会报错了 比如:-->首先写#include <iostre

【转】解决eclipse连接不到genymotion的问题

(1)很多朋友在使用genymotion开发安卓应用程序的时候,会遇见完全正确的安装但是在运行的时候仍然找不到,genymotion上的设备,在打开的devices上找不到如下图所示: (2)解决的方法如下: 1.关闭eclipse.genymotion等相关软件: 2.打开你的genymotion--找到settings---找到ADB.按照我下图所示的地方勾选--在勾选的地方选择你本机的sdk即可!确认! 3.找到你的android-SDK目录下--platform-tools有一个adb

解决Eclipse不能打包APK报错的问题

1.在Android SDK Tool r19之后, Export的时候遇到xxx is not translated in yyy, zzz的问题. 例如说"auto_exit" is not translated in zh, zh_CN. 这是因为Android SDK Tool 將 ANDROID_LINT_COMPLETE_REGIONS 改为了需要检查. 临时解决方法:Eclipse > Preference > Android > Lint Error

解决Eclipse中文乱码

使用Eclipse编辑文件经常出现中文乱码或者文件中有中文不能保存的问题,Eclipse提供了灵活的设置文件编码格式的选项,我们可以通过设置编码 格式解决乱码问题.在Eclipse可以从几个层面设置编码格式:Workspace.Project.Content Type.File 本文以Eclipse 3.3(英文)为例加以说明: 1. 设置Workspace的编码格式: Windows->Preferences... 打开"首选项"窗口,点击左侧导航树到General->W

解决eclipse: Resource is out of sync with the file system 报错问题

eclipse版本:4.3 在eclipse中搜索时,搜索完之后有时候会弹出错误对话框,错误摘录如下: Resource is out of sync with the file system......分析:这个问题是由于eclipse中文件不同步引起的.在eclipse中,工程文件是由eclipse自动扫描添加的,如果在外部修改了工程目录中的文件但 又关闭了自动刷新功能,则会引起文件不同步,从而搜索时出现Resource is out of sync with the file system

Eclipse 在ubuntu桌面显示快捷启动以及解决Eclipse 在ubuntu中点击菜单栏不起作用的原因.

要在Eclipse中设置好之后,可以通过如下方式在周末显示快捷启动以及解决Eclipse在ubuntu高版本中点击菜单栏项不显示列表的问题 在usr/share/app-install/desktop目录下创建一个eclipse.desktop文件,如下命令: sudo gedit /usr/share/app-install/desktop/eclipse.desktop 在这个文件中输入: [Desktop Entry] Name=eclipse Comment=eclipse IDE Ex