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
一年多之前 回复
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币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!