Skip to content

service group is not supported in generic direct invocation #3555

Closed

Description

@axeBig
  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.0
  • Operating System version: all
  • Java version: all

Steps to reproduce this issue

  1. start a dubbo provider with service group="1.0.0"
  2. start a dubbo generic consumer with referenceConfig.setGroup("1.0.0")
  3. call genericService.$invoke

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

success return.

Actual Result

not found exported service,may be version or group mismatch.

If there is an exception, please attach the exception trace:

Exception in thread "main" org.apache.dubbo.rpc.RpcException: Failed to invoke remote method: $invoke, provider: dubbo://127.0.0.1:20890/org.apache.dubbo.samples.context.api.ContextService?application=generic-call-consumer&dubbo=2.0.2&generic=true&group=&interface=org.apache.dubbo.samples.context.api.ContextService&pid=13296&register.ip=x.x.x.x&side=consumer&timestamp=1551067201057, cause: org.apache.dubbo.remoting.RemotingException: Not found exported service: org.apache.dubbo.samples.context.api.ContextService:20890 in [1.0.0/org.apache.dubbo.samples.context.api.ContextService:20890], may be version or group mismatch , channel: consumer: /x.x.x.x:43004 --> provider: /x.x.x.x:20890, message:RpcInvocation [methodName=$invoke, parameterTypes=[class java.lang.String, class [Ljava.lang.String;, class [Ljava.lang.Object;], arguments=[sayHello, [Ljava.lang.String;@42f5a7d7, [Ljava.lang.Object;@4c3251f9], attachments={path=org.apache.dubbo.samples.context.api.ContextService, input=342, dubbo=2.0.2, interface=org.apache.dubbo.samples.context.api.ContextService, version=0.0.0, generic=true}]
org.apache.dubbo.remoting.RemotingException: Not found exported service: org.apache.dubbo.samples.context.api.ContextService:20890 in [1.0.0/org.apache.dubbo.samples.context.api.ContextService:20890], may be version or group mismatch , channel: consumer: /x.x.x.x:43004 --> provider: /x.x.x.x:20890, message:RpcInvocation [methodName=$invoke, parameterTypes=[class java.lang.String, class [Ljava.lang.String;, class [Ljava.lang.Object;], arguments=[sayHello, [Ljava.lang.String;@42f5a7d7, [Ljava.lang.Object;@4c3251f9], attachments={path=org.apache.dubbo.samples.context.api.ContextService, input=342, dubbo=2.0.2, interface=org.apache.dubbo.samples.context.api.ContextService, version=0.0.0, generic=true}]
	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.getInvoker(DubboProtocol.java:223)
	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:82)
	at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:103)
	at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:200)
	at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)
	at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)
	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)

	at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:113)
	at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:156)
	at org.apache.dubbo.rpc.filter.GenericImplFilter.invoke(GenericImplFilter.java:172)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
	at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:88)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
	at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:49)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
	at org.apache.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:54)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
	at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:77)
	at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:57)
	at org.apache.dubbo.common.bytecode.proxy0.$invoke(proxy0.java)
	at org.apache.dubbo.samples.generic.call.GenericCallConsumer.main(GenericCallConsumer.java:74)
Caused by: org.apache.dubbo.remoting.RemotingException: org.apache.dubbo.remoting.RemotingException: Not found exported service: org.apache.dubbo.samples.context.api.ContextService:20890 in [1.0.0/org.apache.dubbo.samples.context.api.ContextService:20890], may be version or group mismatch , channel: consumer: /x.x.x.x:43004 --> provider: /x.x.x.x:20890, message:RpcInvocation [methodName=$invoke, parameterTypes=[class java.lang.String, class [Ljava.lang.String;, class [Ljava.lang.Object;], arguments=[sayHello, [Ljava.lang.String;@42f5a7d7, [Ljava.lang.Object;@4c3251f9], attachments={path=org.apache.dubbo.samples.context.api.ContextService, input=342, dubbo=2.0.2, interface=org.apache.dubbo.samples.context.api.ContextService, version=0.0.0, generic=true}]
org.apache.dubbo.remoting.RemotingException: Not found exported service: org.apache.dubbo.samples.context.api.ContextService:20890 in [1.0.0/org.apache.dubbo.samples.context.api.ContextService:20890], may be version or group mismatch , channel: consumer: /x.x.x.x:43004 --> provider: /x.x.x.x:20890, message:RpcInvocation [methodName=$invoke, parameterTypes=[class java.lang.String, class [Ljava.lang.String;, class [Ljava.lang.Object;], arguments=[sayHello, [Ljava.lang.String;@42f5a7d7, [Ljava.lang.Object;@4c3251f9], attachments={path=org.apache.dubbo.samples.context.api.ContextService, input=342, dubbo=2.0.2, interface=org.apache.dubbo.samples.context.api.ContextService, version=0.0.0, generic=true}]
	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol.getInvoker(DubboProtocol.java:223)
	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:82)
	at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:103)
	at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:200)
	at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)
	at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)
	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)

	at org.apache.dubbo.remoting.exchange.support.DefaultFuture.returnFromResponse(DefaultFuture.java:298)
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:191)
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture.get(DefaultFuture.java:164)
	at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:108)
	... 13 more

Activity

  1. kexianjun commented on Feb 25, 2019

    @kexianjun
    Member

    It works fine for me on the master branch. Could you pls provide a demo to reproduce this issue.

  2. axeBig commented on Feb 25, 2019

    @axeBig
    Author

    download project https://github.com/apache/incubator-dubbo-samples
    IN dubbo-samples-generic-call
    case1: start GenericCallProvider,start GenericCallConsumer. result ok
    case2: start Provider,change consumer to direct call like:

     ApplicationConfig applicationConfig = new ApplicationConfig();
            applicationConfig.setName("generic-call-consumer");
    
            ReferenceConfig<GenericService> referenceConfig = new ReferenceConfig<>();
            referenceConfig.setInterface("org.apache.dubbo.samples.generic.call.api.HelloService");
            referenceConfig.setUrl("dubbo://127.0.0.1:20880");
            referenceConfig.setApplication(applicationConfig);
            referenceConfig.setGeneric(true);
            referenceConfig.setGroup("1.0.0");
            GenericService genericService = referenceConfig.get();
            Object result = genericService.$invoke("sayHello", new String[]{"java.lang.String"}, new Object[]{"world"});
            System.out.println("...." + result);
    

    result OK!. group is mismatch in fact
    case 3: change generic-provider.xml,add group="1.0.0" to dubbo:service.start provider.
    start generic direct consumer in case 2, result error : Not found exported service

  3. changed the title [-]service group is not supported in generic invocation[/-] [+]service group is not supported in generic direct invocation[/+] on Feb 25, 2019
  4. kexianjun commented on Feb 25, 2019

    @kexianjun
    Member

    Thanks, I have reproduced this issue and I'll take a look at this problem latter.

  5. added a commit that references this issue on Mar 8, 2019
    42646d7
  6. added this to the 2.7.1 milestone on Mar 14, 2019
  7. added a commit that references this issue on Mar 26, 2019
    897b80d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions