spring cloud alibaba 2021.0.4.0版本 gateWay NotFoundException: 503 SERVICE_UNAVAILABLE

   

[4b55461c-1] Resolved [NotFoundException: 503 SERVICE_UNAVAILABLE "Unable to find instance for admin-server"] for HTTP GET /admin/hi
2022-12-02 00:52:50.247 DEBUG 24903 --- [ctor-http-nio-2] o.s.core.codec.CharSequenceEncoder       : [4b55461c-1] Writing "<html><body><h1>Whitelabel Error Page</h1><p>This application has no configured error view, so you a (truncated)..."
2022-12-02 00:52:50.253 DEBUG 24903 --- [ctor-http-nio-2] r.n.http.server.HttpServerOperations     : [4b55461c-1, L:/[0:0:0:0:0:0:0:1]:8081 - R:/[0:0:0:0:0:0:0:1]:54279] Decreasing pending responses, now 0
2022-12-02 00:52:50.254 DEBUG 24903 --- [ctor-http-nio-2] r.n.http.server.HttpServerOperations     : [4b55461c-1, L:/[0:0:0:0:0:0:0:1]:8081 - R:/[0:0:0:0:0:0:0:1]:54279] Last HTTP packet was sent, terminating the channel
2022-12-02 00:52:50.258 DEBUG 24903 --- [ctor-http-nio-2] o.s.w.s.adapter.HttpWebHandlerAdapter    : [4b55461c-1] Completed 503 SERVICE_UNAVAILABLE
2022-12-02 00:52:50.259 DEBUG 24903 --- [ctor-http-nio-2] r.n.http.server.HttpServerOperations     : [4b55461c-1, L:/[0:0:0:0:0:0:0:1]:8081 - R:/[0:0:0:0:0:0:0:1]:54279] Last HTTP response frame

如果碰到此问题,首先确认其他服务是否注册成功,如果都注册成功,请确认是否导入了

implementation "org.springframework.cloud:spring-cloud-loadbalancer"

缺少这个jar包会导致客户端无法发现服务,官方文档也没有过多介绍。