hookokoko opened a new issue, #2591:
URL: https://github.com/apache/dubbo-go/issues/2591

   ### Environment
   
   - Server: Dubbo-go, branch release-3.1
   - Client: Dubbo-go, branch release-3.1
   - Protocol: Dubbo
   - Registry: zk
   
   
   ### Issue description
   
   <!-- Here is a brief description about the issue. -->
   使用release-3.1分支的dubbogo进行接口级别的泛化调用时,需要请求2次,才能返回正常结果。
   
   参考dubbo-go-sample/generic/default中的例子:
   
   如下,服务端dubbogo 指定registry-type: interface
   ```
     registries:
       zk:
         protocol: zookeeper
         timeout: 3s
         address: 127.0.0.1:2181
         registry-type: interface
   ```
   
   当client进行如下调用时,第一次会提示Failed to invoke the method $invoke,第二次惨能正常返回结果
   ```
   func callGetUser(refConf config.ReferenceConfig) {
        service := refConf.GetRPCService().(*generic.GenericService)
        resp, _ := service.Invoke(
                context.TODO(),
                "GetUser1",
                []string{"java.lang.String"},
                []hessian.Object{"A003"},
        )
        fmt.Println(resp)
   
        <-time.After(time.Second)
        resp, _ = service.Invoke(
                context.TODO(),
                "GetUser1",
                []string{"java.lang.String"},
                []hessian.Object{"A003"},
        )
        fmt.Println(resp)
   }
   ```
   
   结果如下,第一次调用报错,返回结果nil,第二次正常
   ```
   2024-01-31 22:42:36     WARN    proxy/proxy.go:212      [CallProxy] received 
rpc err: Failed to invoke the method $invoke. No provider available for the 
service 
dubbo://:@:/?interface=org.apache.dubbo.samples.UserProvider&group=&version= 
from registry 
zookeeper://127.0.0.1:2181?registry=zookeeper&registry.group=&registry.label=true&registry.namespace=&registry.preferred=false&registry.role=0&registry.timeout=5s&registry.ttl=15m&registry.weight=0&registry.zone=&remote-client-name=dubbo.registries-zookeeper-127.0.0.1%3A2181&simplified=false
 on the consumer 192.168.199.108 using the dubbo version 3.1.1 .Please check if 
the providers have been started and registered.
   <nil>
   
   map[age:48 class:org.apache.dubbo.samples.User iD:A003 name:Joe 
time:2024-01-31 22:42:37.224 +0800 CST]
   ```
   
   ### Logs
   
   <details><summary>Click me to check logs</summary>
   
   
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to