Dubbo 启动报错 Failed to bind NettyServer on /192.168.96.1:20880, cause: Failed to bind to: /0.0.0.0:208

错误信息:
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-07-02 18:10:15.812 ERROR [org.springframework.boot.SpringApplication:771] Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appointmentJfFacadeImpl' defined in URL [jar:file:/app/gme/gme.computer-1.0-SNAPSHOT.jar!/BOOT-INF/classes!/com/minivision/gmepartner/computer/facade/AppointmentJfFacadeImpl.class]: Initialization of bean failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Fail to start server(url: dubbo://10.144.144.2:20880/com.minivision.gmepartner.computer.AppointmentJfFacade?anyhost=true&application=gme-computer&channel.readonly.sent=true&codec=dubbo&dubbo=2.8.4&generic=false&heartbeat=60000&interface=com.minivision.gmepartner.computer.AppointmentJfFacade&methods=addAgreeJf,getAppointmentDetail4jf,getAppointmentJFs&pid=21778&side=provider&timeout=60000&timestamp=1530526215723) Failed to bind NettyServer on /10.144.144.2:20880, cause: Failed to bind to: /0.0.0.0:20880
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564) ~[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) ~[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) ~[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) ~[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) ~[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) ~[spring-boot-1.5.8.RELEASE.jar!/:1.5.8.RELEASE]
	at com.minivision.gmepartner.ComputerApplication.main(ComputerApplication.java:38) ~[classes!/:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_152]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_152]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_152]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_152]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[gme.computer-1.0-SNAPSHOT.jar:?]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[gme.computer-1.0-SNAPSHOT.jar:?]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[gme.computer-1.0-SNAPSHOT.jar:?]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) ~[gme.computer-1.0-SNAPSHOT.jar:?]
Caused by: com.alibaba.dubbo.rpc.RpcException: Fail to start server(url: dubbo://10.144.144.2:20880/com.minivision.gmepartner.computer.AppointmentJfFacade?anyhost=true&application=gme-computer&channel.readonly.sent=true&codec=dubbo&dubbo=2.8.4&generic=false&heartbeat=60000&interface=com.minivision.gmepartner.computer.AppointmentJfFacade&methods=addAgreeJf,getAppointmentDetail4jf,getAppointmentJFs&pid=21778&side=provider&timeout=60000&timestamp=1530526215723) Failed to bind NettyServer on /10.144.144.2:20880, cause: Failed to bind to: /0.0.0.0:20880
	at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:331) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.openServer(DubboProtocol.java:308) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.export(DubboProtocol.java:258) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:55) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:56) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.registry.integration.RegistryProtocol.doLocalExport(RegistryProtocol.java:153) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:107) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:53) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:54) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:489) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:285) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:246) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:145) ~[dubbo-2.8.4.jar!/:2.8.4]
	at com.alibaba.dubbo.config.spring.AnnotationBean.postProcessAfterInitialization(AnnotationBean.java:202) ~[dubbo-2.8.4.jar!/:2.8.4]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:423) ~[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1633) ~[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]
	... 23 more

配置文件信息:

spring.dubbo.application.name=gme-computer
spring.dubbo.registry.protocol=zookeeper
spring.dubbo.registry.address=10.144.144.3:2181
spring.dubbo.protocol.name=dubbo
spring.dubbo.protocol.port=48610
spring.dubbo.consumer.check=false
spring.dubbo.scan=com.minivision.gmepartner
#\u6570\u636E\u5E93\u914D\u7F6E

错误分析:

每个子项目zookeeper的端口号是独立的。别占用就会报错,如下:


改成和其他子项目不相同的端口号,重新打jar包,部署环境,启动项目。


  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值