gang0713 opened a new issue #8225:
URL: https://github.com/apache/dubbo/issues/8225
Dubbo版本2.7.7和3.0.0都有这个问题。
目前发现DubboReference注解中不增加URL并指定IP和端口,消费端就无法访问生产端。提示生产端不存在或是列入了黑名单
1、如果要在URL中指定IP和端口,对于增加生产端的灵活性是不是就降底,对于消费端来说应该是透明的。
2、在application.yml配置文件中是否有什么特别的配置可以去掉DubboReference中的url配置
@DubboReference(version = "${platform.service.version}", **url =
"dubbo://127.0.0.1:12316"**, lazy = true)
目前我的配置
生产端配置
dubbo:
application:
id: ${spring.application.name}
name: ${spring.application.name}
register-mode: instance
service-discovery:
migration: FORCE_APPLICATION
qos-enable: false
qos-accept-foreign-ip: false
scan:
base-packages: com.xykq.modules,com.xykq.framework
registry:
# file:
${user.home}/dubbo-cache/${spring.application.name}/dubbo.cache
address: nacos://${nacos.host}:${nacos.port}/?registry-type=service
monitor:
protocol: registry
protocol:
name: dubbo
port: 12316
server: netty4
serialization: kryo
provider:
retries: 0
delay: -1
timeout: 12000
consumer:
timeout: 12000
check: false # 服务启动时检查被调用服务是否可用
client: netty4
retries: 0 # 服务调用重试次数
消费端配置
dubbo:
application:
id: ${spring.application.name}
name: ${spring.application.name}
service-discovery:
migration: FORCE_APPLICATION
qos-enable: false
qos-accept-foreign-ip: false
registry:
# file:
${user.home}/dubbo-cache/${spring.application.name}/dubbo.cache
address: nacos://${nacos.host}:${nacos.port}
monitor:
protocol: registry
protocol:
name: dubbo
port: 12316
server: netty4
serialization: kryo
consumer:
timeout: 12000
check: false # 服务启动时检查被调用服务是否可用
client: netty4
retries: 0 # 服务调用重试次数
--
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]