You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "liunancun (GitHub)" <gi...@apache.org> on 2019/03/29 00:39:49 UTC
[GitHub] [incubator-dubbo] liunancun opened issue #3770: 从2.7.0升级到2.7.1发现的BUG
- [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
### Environment
* Dubbo version: 2.7.1
* Operating System version: CentOS Linux release 7.6.1810 (Core)
* Java version: 1.8
### Steps to reproduce this issue
1. yml配置文件
dubbo:
application:
name: bessky-boot-service
protocol:
name: dubbo
port: 28300
scan:
basePackages: com.bessky
registry:
address: zookeeper://192.168.99.230:2181
2. 测试接口
public interface HelloService {
String hello(String name);
}
3. 接口实现类
@Service
public class HelloServiceImpl implements HelloService {
@Override
public String hello(String name) {
System.out.println(name);
return "Hello, " + name;
}
}
4.启动类
@SpringBootApplication
public class BesskyBootServiceApplication {
public static void main(String[] args) {
SpringApplication.run(BesskyBootServiceApplication.class, args);
}
}
5.将Spring BOOT工程打包上传到CentOS服务器测试
问题1:注册到ZK上的地址变成了127.0.0.1,回退到Dubbo的2.7.0版本是能正确获取到网卡IP地址的。
问题2:注册到ZK上的服务都变成了静态服务
`
服务地址: | dubbo://127.0.0.1:28300/com.bessky.hello.service.HelloService?anyhost=true&application=bessky-boot-service&bean.name=providers:dubbo:com.bessky.hello.service.HelloService&default.deprecated=false&default.dynamic=false&default.register=true&deprecated=false&dubbo=2.0.2&dynamic=false&generic=false&interface=com.bessky.hello.service.HelloService&methods=hello&pid=181167®ister=true&release=2.7.1&side=provider×tamp=1553819455170
-- | --
(localhost)127.0.0.1:28300
provider
hello
2.7.1
false
2.0.2
181167
false
com.bessky.hello.service.HelloService
false
false
bessky-boot-service
true
false
true
providers:dubbo:com.bessky.hello.service.HelloService
true
2019-03-29 08:30:55 (1553819455170)
静态
已启用
警告
`
Pls. provide [GitHub address] to reproduce this issue.
### Expected Result
What do you expected from the above steps?
### Actual Result
What actually happens?
If there is an exception, please attach the exception trace:
```
Just put your stack trace here!
```
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3770 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] lexburner commented on issue #3770: 从2.7.0升级到2.7.1发现的BUG
Posted by "lexburner (GitHub)" <gi...@apache.org>.
dubbo 2.7.1 add an ipv4 check to avoid local site address:
```java
public boolean isSiteLocalAddress() {
// refer to RFC 1918
// 10/8 prefix
// 172.16/12 prefix
// 192.168/16 prefix
int address = holder().getAddress();
return (((address >>> 24) & 0xFF) == 10)
|| ((((address >>> 24) & 0xFF) == 172)
&& (((address >>> 16) & 0xF0) == 16))
|| ((((address >>> 24) & 0xFF) == 192)
&& (((address >>> 16) & 0xFF) == 168));
}
```
I am not sure this change is suitable, but maybe this change bring your probelm.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3770 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] wmlz commented on issue #3770: 从2.7.0升级到2.7.1发现的BUG
Posted by "wmlz (GitHub)" <gi...@apache.org>.
我也遇到第二个问题,从2.7.0升级到2.7.1后,服务变成了静态,注册中心同样是zookeeper
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3770 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] lexburner commented on issue #3770: 从2.7.0升级到2.7.1发现的BUG
Posted by "lexburner (GitHub)" <gi...@apache.org>.
dubbo 2.7.1 add an ipv4 check to avoid local site address:
```
public boolean isSiteLocalAddress() {
// refer to RFC 1918
// 10/8 prefix
// 172.16/12 prefix
// 192.168/16 prefix
int address = holder().getAddress();
return (((address >>> 24) & 0xFF) == 10)
|| ((((address >>> 24) & 0xFF) == 172)
&& (((address >>> 16) & 0xF0) == 16))
|| ((((address >>> 24) & 0xFF) == 192)
&& (((address >>> 16) & 0xFF) == 168));
}
```
I am not sure this change is suitable, but maybe this change bring your probelm.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3770 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] ylylc commented on issue #3770: 从2.7.0升级到2.7.1发现的BUG
Posted by "ylylc (GitHub)" <gi...@apache.org>.
额我也遇到,只能退回去
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3770 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org