2 xuke6677 xuke6677 于 2016.01.26 15:02 提问

启动tomcat 报dubbo端口号冲突

启动tomcat ,同时会报下面的错误

14:56:08.607 [localhost-startStop-1] ERROR o.s.web.context.ContextLoader - Context initialization failed
com.alibaba.dubbo.rpc.RpcException: Fail to start server(url: dubbo://172.16.0.62:21889/com.winit.sms.spi.base.customeracct.CustomerAcctService?anyhost=true&application=sms&channel.readonly.sent=true&codec=dubbo&default.cluster=failover&default.executes=500&default.loadbalance=random&default.retries=0&default.service.filter=dubboProviderFilter&default.timeout=60000&default.validation=true&dispatcher=all&dubbo=2.8.3&dynamic=true&generic=false&heartbeat=60000&interface=com.winit.sms.spi.base.customeracct.CustomerAcctService&methods=queryCustomerAcctById,queryCustomerAcctByBpartnerCode,createCustomerAcct,pageCustomerAcct,modifyCustomerAcct&organization=winit&owner=liuyan.chen&pid=14588&revision=1.21.6.NewWorldPhase2.SNAPSHOT&side=provider&threadpool=limited&threads=300&timestamp=1453791368562&version=5.0.0) Failed to bind NettyServer on /172.16.0.62:21889, cause: Failed to bind to: /0.0.0.0:21889
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:331) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.openServer(DubboProtocol.java:308) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.export(DubboProtocol.java:258) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:55) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:56) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.registry.integration.RegistryProtocol.doLocalExport(RegistryProtocol.java:153) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:107) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:53) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:54) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:489) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:285) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:246) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:145) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:109) ~[dubbo-2.8.3.jar:2.8.3]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96) ~[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334) ~[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948) ~[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[spring-context-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410) ~[spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) ~[spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5003) [catalina.jar:7.0.65]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517) [catalina.jar:7.0.65]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.65]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) [catalina.jar:7.0.65]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) [catalina.jar:7.0.65]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) [catalina.jar:7.0.65]
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263) [catalina.jar:7.0.65]
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1978) [catalina.jar:7.0.65]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_80]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
Caused by: com.alibaba.dubbo.remoting.RemotingException: Failed to bind NettyServer on /172.16.0.62:21889, cause: Failed to bind to: /0.0.0.0:21889
at com.alibaba.dubbo.remoting.transport.AbstractServer.(AbstractServer.java:72) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.remoting.transport.netty.NettyServer.(NettyServer.java:63) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.remoting.transport.netty.NettyTransporter.bind(NettyTransporter.java:33) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.remoting.Transporter$Adpative.bind(Transporter$Adpative.java) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.remoting.Transporters.bind(Transporters.java:48) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchanger.bind(HeaderExchanger.java:41) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.remoting.exchange.Exchangers.bind(Exchangers.java:63) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:329) ~[dubbo-2.8.3.jar:2.8.3]
... 35 common frames omitted
Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:21889
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:303) ~[netty-3.2.5.Final.jar:na]
at com.alibaba.dubbo.remoting.transport.netty.NettyServer.doOpen(NettyServer.java:94) ~[dubbo-2.8.3.jar:2.8.3]
at com.alibaba.dubbo.remoting.transport.AbstractServer.(AbstractServer.java:67) ~[dubbo-2.8.3.jar:2.8.3]
... 42 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.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.bind(NioServerSocketPipelineSink.java:148) ~[netty-3.2.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleServerSocket(NioServerSocketPipelineSink.java:100) ~[netty-3.2.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:74) ~[netty-3.2.5.Final.jar:na]
at org.jboss.netty.channel.Channels.bind(Channels.java:468) ~[netty-3.2.5.Final.jar:na]
at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:192) ~[netty-3.2.5.Final.jar:na]
at org.jboss.netty.bootstrap.ServerBootstrap$Binder.channelOpen(ServerBootstrap.java:348) ~[netty-3.2.5.Final.jar:na]
at org.jboss.netty.channel.Channels.fireChannelOpen(Channels.java:176) ~[netty-3.2.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioServerSocketChannel.(NioServerSocketChannel.java:85) ~[netty-3.2.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:142) ~[netty-3.2.5.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:90) ~[netty-3.2.5.Final.jar:na]
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:282) ~[netty-3.2.5.Final.jar:na]
... 44 common frames omitted

4个回答

Iamxiaoxiong
Iamxiaoxiong   2016.01.26 15:33

21889 这个端口被占用了
如果是linux系统,可以用netstat -anp |grep 21889 查看
windows也可以用netstat查看

mijklgps
mijklgps sb
大约 2 年之前 回复
xuke6677
xuke6677   2016.02.27 23:26

改了端口号也不行,如果我把端口号改成了2288,也会报2288端口号冲突。

github_35196979
github_35196979   2016.06.02 12:24

我也遇到这个问题了,正在突破中

github_35196979
github_35196979   2016.06.02 12:25

我也遇到这个问题了,正在突破中

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
Dubbo 端口冲突的时候 会报一个 Error: ListenerFaild.
Dubbo 端口冲突的时候 会报一个 Error: ListenerFaild. Tomcat 启动遇到同样问题的时候,会报 Port 8080 already used. Dubbo 的这个报错太不明显了。查了半天没查出问题。最后想到是多个服务运行在同一台服务器上,可能是端口冲突,修改Dubbo 监听端口后正常。
Tomcat端口冲突的解决方法
1.输入以下两条命令 --1.dos窗口中输入:netstat -ano | findstr 8080 找到占用的端口,然后kill --2.kill占用的端口 taskkill -pid (进程pid) -f 2.Maven中tomcat的端口占用问题 右击项目--》 Maven build --》 goals中输入: -Dmaven.tomcat.port=8087(或者其他的数字...
Tomcat 启动端口冲突异常
项目发布时,控制台输入了下面的异常、 严重: StandardServer.await: create[8005]:  java.net.BindException: Address already in use: JVM_Bind         at java.net.PlainSocketImpl.socketBind(Native Method) at java.net
一台机器上启动两个tomcat端口号冲突问题
有时候我们需要在一台机器上启动多个项目,但是一个tomcat下启动多个项目会导致调试会出不可预期的问题,所以可以试着启动两个tomcat服务器 步骤如下: 1.打开tomcat的安装目录找到conf文件夹下的server.xml文件 C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf 2.如果只是为了解决808
解决多个tomcat端口冲突
tomcat端口冲突解决
tomcat无法启动的原因排错以及端口被占用的解决办法
1)tomcat无法启动的原因排错; 2)端口被占用的解决办法
多个Tomcat运行,端口冲突,端口修改心得
自从项目模块化开发以来,部分模块需要发布到同服务器上不同的Tomcat上面,发现一些有趣的问题:         1.如果忘记修改Tomcat conf/server.xml下面的端口,我遇到两种情况: 一是Tomcat启动报端口已被使用错误,无法启动 二是启动成功,之前的同端口Tomcat会崩掉无法访问          2.所以我们会修改接口,但当Tomcat太多了,这端口也会乱掉并且
Eclipse开发中tomcat服务器端口号冲突
netsh  winsock  reset 重启软件就可以了
dubbo启动jetty端口占用问题
Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.1.26:run (default-cli) on project dubbo-admin: Failure: Address already in use -> [Help 1] 在:dubbo/dubbo-admin下的pom.xml中更改端口号
Dubbo tomcat启动报错
Dubbo tomcat启动报错 Tomcat中duboo启动时候报错 Caused by: java.lang.RuntimeException: java.io.IOException: invalid constant type: 18 at javassist.CtClassType.getClassFile2(CtClassType.java:204) ~[javassist