alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
27.98k stars 8.35k forks source link

spring boot admin can not detect online micro service client registed under nacos's non-public namespace #1752

Open tfnick opened 4 years ago

tfnick commented 4 years ago

Which Component Nacos Discovery,

Describe the bug spring boot admin can not detect online micro service client registed in nacos under non-public namespace.

but If the spring boot admin server and all mico service client redisted under nacos's public namespace, everything is OK.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior micro service client under nacos's non-public namespace can display in spring boot admin console correctly.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here. e.g. MacOS 、Java8 、 Version 2.2.X.RELEASE

tfnick commented 4 years ago

admin client properties in bootstrap.yml

server:
  port: 8003

spring:
  main:
    allow-bean-definition-overriding: true
  application:
    name: admin-client
  cloud:
    nacos:
      config:
        server-addr: 127.0.0.1:8848
        namespace: 9ec8ea98-8795-472c-bdb7-abcd
        file-extension: yml
      discovery:
        server-addr: 127.0.0.1:8848
        namespace: 9ec8ea98-8795-472c-bdb7-abcd
    sentinel:
      enabled: true

logging:
  file:
    name: /home/lbl/logs/app/admin-client.log
tfnick commented 4 years ago

admin properties in bootstrap.yml

server:
  port: 8002

spring:
  main:
    allow-bean-definition-overriding: true
  application:
    name: admin-server
    cloud:
      nacos:
        config:
          server-addr: 127.0.0.1:8848
          namespace: 9ec8ea98-8795-472c-bdb7-abcd
          group: DEFAULT_GROUP
          file-extension: yml

        discovery:
          server-addr: 127.0.0.1:8848
          namespace: 9ec8ea98-8795-472c-bdb7-abcd
          group: DEFAULT_GROUP
logging:
  file:
    name: /home/lbl/logs/app/admin-server.log
yuhuangbin commented 3 years ago

image

Service client redisted under nacos's public namespace. The Spring Boot Admin Console show service as health status. If you not, Please provide simple project to reproduce. @tfnick