alibaba / dubbo-spring-boot-starter

Dubbo Spring Boot Starter
Apache License 2.0
2.1k stars 745 forks source link

consume启动不了 #45

Closed rulinma closed 6 years ago

rulinma commented 6 years ago

com.alibaba.dubbo.remoting.RemotingException: Not found exported service: com.alibaba.dubbo.registry.RegistryService:9090 in [com.alibaba.dubbo.monitor.MonitorService:9090], may be version or group mismatch , channel: consumer: /10.0.10.246:51384 --> provider: /10.0.10.246:9090, message:RpcInvocation [methodName=subscribe, parameterTypes=[class com.alibaba.dubbo.common.URL, interface com.alibaba.dubbo.registry.NotifyListener], arguments=[consumer://10.0.10.246/com.alibaba.dubbo.registry.RegistryService?application=dubbo-spring-boot-starter-consumer-test&callbacks=10000&connect.timeout=10000&dubbo=2.6.0&interface=com.alibaba.dubbo.registry.RegistryService&lazy=true&methods=lookup,unsubscribe,subscribe,unregister,register&pid=2397&reconnect=false&sticky=true&subscribe.1.callback=true&timeout=10000&timestamp=1516761688291&unsubscribe.1.callback=false, null], attachments={path=com.alibaba.dubbo.registry.RegistryService, input=870, sys_callback_arg-1=1089341986, dubbo=2.6.0, interface=com.alibaba.dubbo.registry.RegistryService, version=0.0.0, timeout=10000}] at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.getInvoker(DubboProtocol.java:217) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:86) at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:84) at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:170) at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:52) at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:82) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Provider启动日志: /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:51377,suspend=y,server=n -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/tools.jar:/Users/rollin/dh/gitDH/dubbo-spring-demo/provider/target/classes:/Users/rollin/dh/gitDH/dubbo-spring-demo/api/target/classes:/Users/rollin/.m2/repository/com/alibaba/spring/boot/dubbo-spring-boot-starter/1.0.0/dubbo-spring-boot-starter-1.0.0.jar:/Users/rollin/.m2/repository/com/alibaba/dubbo/2.6.0/dubbo-2.6.0.jar:/Users/rollin/.m2/repository/org/springframework/spring-context/4.3.10.RELEASE/spring-context-4.3.10.RELEASE.jar:/Users/rollin/.m2/repository/org/springframework/spring-aop/4.3.10.RELEASE/spring-aop-4.3.10.RELEASE.jar:/Users/rollin/.m2/repository/org/springframework/spring-core/4.3.10.RELEASE/spring-core-4.3.10.RELEASE.jar:/Users/rollin/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/rollin/.m2/repository/org/springframework/spring-expression/4.3.10.RELEASE/spring-expression-4.3.10.RELEASE.jar:/Users/rollin/.m2/repository/org/springframework/spring-beans/4.3.10.RELEASE/spring-beans-4.3.10.RELEASE.jar:/Users/rollin/.m2/repository/org/springframework/spring-web/4.3.10.RELEASE/spring-web-4.3.10.RELEASE.jar:/Users/rollin/.m2/repository/org/javassist/javassist/3.20.0-GA/javassist-3.20.0-GA.jar:/Users/rollin/.m2/repository/org/jboss/netty/netty/3.2.5.Final/netty-3.2.5.Final.jar:/Users/rollin/.m2/repository/org/springframework/boot/spring-boot-starter-actuator/1.5.9.RELEASE/spring-boot-starter-actuator-1.5.9.RELEASE.jar:/Users/rollin/.m2/repository/org/springframework/boot/spring-boot-starter/1.5.9.RELEASE/spring-boot-starter-1.5.9.RELEASE.jar:/Users/rollin/.m2/repository/org/springframework/boot/spring-boot/1.5.9.RELEASE/spring-boot-1.5.9.RELEASE.jar:/Users/rollin/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.5.9.RELEASE/spring-boot-autoconfigure-1.5.9.RELEASE.jar:/Users/rollin/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.5.9.RELEASE/spring-boot-starter-logging-1.5.9.RELEASE.jar:/Users/rollin/.m2/repository/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar:/Users/rollin/.m2/repository/ch/qos/logback/logback-core/1.1.11/logback-core-1.1.11.jar:/Users/rollin/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar:/Users/rollin/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar:/Users/rollin/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar:/Users/rollin/.m2/repository/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar:/Users/rollin/.m2/repository/org/springframework/boot/spring-boot-actuator/1.5.9.RELEASE/spring-boot-actuator-1.5.9.RELEASE.jar:/Users/rollin/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.8.10/jackson-databind-2.8.10.jar:/Users/rollin/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0.jar:/Users/rollin/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.8.10/jackson-core-2.8.10.jar:/Users/rollin/.m2/repository/org/apache/zookeeper/zookeeper/3.4.6/zookeeper-3.4.6.jar:/Users/rollin/.m2/repository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar:/Users/rollin/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar:/Users/rollin/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar:/Users/rollin/.m2/repository/jline/jline/0.9.94/jline-0.9.94.jar:/Users/rollin/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar:/Users/rollin/.m2/repository/io/netty/netty/3.7.0.Final/netty-3.7.0.Final.jar:/Users/rollin/.m2/repository/com/github/sgroschupf/zkclient/0.1/zkclient-0.1.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar" com.ceair.ec.DubboProviderLauncher Connected to the target VM, address: '127.0.0.1:51377', transport: 'socket' SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/Users/rollin/.m2/repository/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/Users/rollin/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: The requested version 1.7.16 by your slf4j binding is not compatible with [1.6] SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.

. _ _ /\ / '_ () \ \ \ \ ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ \/ _)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||| |\, | / / / / =========|_|==============|__/=//// :: Spring Boot :: (v1.5.9.RELEASE)

2018-01-24 10:41:21.023 INFO 2364 --- [ main] com.ceair.ec.DubboProviderLauncher : Starting DubboProviderLauncher on RulindeMacBook-Pro.local with PID 2364 (/Users/rollin/dh/gitDH/dubbo-spring-demo/provider/target/classes started by rollin in /Users/rollin/dh/gitDH/dubbo-spring-demo) 2018-01-24 10:41:21.029 INFO 2364 --- [ main] com.ceair.ec.DubboProviderLauncher : No active profile set, falling back to default profiles: default 2018-01-24 10:41:21.113 INFO 2364 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@625732: startup date [Wed Jan 24 10:41:21 CST 2018]; root of context hierarchy 2018-01-24 10:41:22.001 INFO 2364 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.dubbo-com.alibaba.dubbo.spring.boot.DubboProperties' of type [com.alibaba.dubbo.spring.boot.DubboProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-01-24 10:41:22.008 INFO 2364 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.dubbo.spring.boot.DubboAutoConfiguration' of type [com.alibaba.dubbo.spring.boot.DubboAutoConfiguration$$EnhancerBySpringCGLIB$$8ed25214] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-01-24 10:41:22.023 INFO 2364 --- [ main] c.a.dubbo.common.logger.LoggerFactory : using logger: com.alibaba.dubbo.common.logger.log4j.Log4jLoggerAdapter 2018-01-24 10:41:22.031 INFO 2364 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'dubboApplicationConfig' of type [com.alibaba.dubbo.config.ApplicationConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-01-24 10:41:22.036 INFO 2364 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'dubboRegistryConfig' of type [com.alibaba.dubbo.config.RegistryConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-01-24 10:41:22.037 INFO 2364 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.dubbo.spring.boot.DubboConsumerAutoConfiguration' of type [com.alibaba.dubbo.spring.boot.DubboConsumerAutoConfiguration$$EnhancerBySpringCGLIB$$5b179ffe] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-01-24 10:41:22.574 INFO 2364 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2018-01-24 10:41:22.640 INFO 2364 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0 2018-01-24 10:41:22.714 INFO 2364 --- [ main] com.ceair.ec.DubboProviderLauncher : Started DubboProviderLauncher in 2.009 seconds (JVM running for 2.447)

配置文件的registry如下: spring.dubbo.registry=multicast:224.5.6.7:1234

xionghuiCoder commented 6 years ago

may be version or group mismatch , channel: consumer: /10.0.10.246:51384 --> provider: /10.0.10.246:9090, message:RpcInvocation... ...

看上面提示应该是找不到provider,检查下provider是否启动或者provider的group和version是否和consumer一致?或者设置下consumer的@Reference的check为false:@Reference(check=false),这是就算找不到provider都不会影响consumer模块启动了。