startjava opened a new issue #8704:
URL: https://github.com/apache/dubbo/issues/8704
写法1
```
dubbo:
registry:
# 注册中心地址
address: zookeeper://127.0.0.1
port: 2181
reference:
com.ghy.www.api.IService1.check: true
application:
logger: slf4j
```
写法1异常
`java.lang.IllegalStateException: Should has at least one way to know which
services this interface belongs to, subscription url:
dubbo://192.168.56.1/com.ghy.www.api.IService1?application=my-check1&category=providers,configurators,routers&check=true&dubbo=2.0.2&interface=com.ghy.www.api.IService1&logger=slf4j&metadata-type=remote&methods=getHello&pid=412&qos.enable=false&release=3.0.3-SNAPSHOT&side=consumer&sticky=false×tamp=1630975814461`
写法2
```
@Configuration
public class JavaConfigDubbo {
@DubboReference(check = true)
private IService1 service1;
}
```
写法2异常
```
2021-09-07 08:53:48.088 WARN 13128 --- [ main]
o.a.d.r.integration.DynamicDirectory : [DUBBO] unexpected error when
unregister service com.ghy.www.api.IService1 from registry:
zookeeper://127.0.0.1:2181/org.apache.dubbo.registry.RegistryService?application=my-check2&dubbo=2.0.2&interface=org.apache.dubbo.registry.RegistryService&logger=slf4j&pid=13128&qos.enable=false&release=3.0.3-SNAPSHOT,
dubbo version: 3.0.3-SNAPSHOT, current host: 192.168.56.1
java.lang.RuntimeException:
org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode
for /services
2021-09-07 08:53:48.089 WARN 13128 --- [ main]
o.a.d.r.integration.DynamicDirectory : [DUBBO] unexpected error when
unsubscribe service com.ghy.www.api.IService1 from registry:
zookeeper://127.0.0.1:2181/org.apache.dubbo.registry.RegistryService?application=my-check2&dubbo=2.0.2&interface=org.apache.dubbo.registry.RegistryService&logger=slf4j&pid=13128&qos.enable=false&release=3.0.3-SNAPSHOT,
dubbo version: 3.0.3-SNAPSHOT, current host: 192.168.56.1
java.lang.RuntimeException:
org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode
for /services
java.lang.IllegalStateException: Failed to check the status of the service
com.ghy.www.api.IService1. No provider available for the service
com.ghy.www.api.IService1 from the url
dubbo://192.168.56.1/com.ghy.www.api.IService1?application=my-check2&dubbo=2.0.2&interface=com.ghy.www.api.IService1&logger=slf4j&metadata-type=remote&methods=getHello&pid=13128&qos.enable=false®ister.ip=192.168.56.1&release=3.0.3-SNAPSHOT&side=consumer&sticky=false×tamp=1630976027827
to the consumer 192.168.56.1 use dubbo version 3.0.3-SNAPSHOT
```
写法1和写法2的异常信息不统一,另外控制台出现的异常数量也不一样,写法1只出现一个异常,而写法2在控制台出现了3个异常。
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]