当前位置:网站首页>Gateway reports an error service_ UNAVAILABLE
Gateway reports an error service_ UNAVAILABLE
2022-07-25 14:20:00 【Lin fanchen coding】
List of articles
background
Used when building a microservice framework Gateway gateway , The gateway is connected , But an exception was reported when calling the service .
SERVICE_UNAVAILABLE "Unable to find instance for admin-auth"
Related configuration
admin-gateway.yml rely on
<dependencies>
<!-- reason : In this version SpringCloud No longer load preferentially by default bootstrap.yml file , terms of settlement : add to spring-cloud-starter-bootstrap rely on -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<!-- SpringCloud Gateway -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<!-- SpringCloud Alibaba Nacos -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- SpringCloud Alibaba Nacos Config -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- SpringCloud Alibaba Sentinel -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<!-- SpringCloud Alibaba Sentinel Gateway -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
</dependency>
<!-- Sentinel Datasource Nacos -->
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-datasource-nacos</artifactId>
</dependency>
</dependencies>
To configure
server:
port: 10010
spring:
application:
name: @[email protected]
cloud:
nacos:
server-addr: 127.0.0.1:8848 # nacos Address
gateway:
discovery:
locator:
enabled: true
routes:
- id: admin-auth # Route identification , Must be unique
uri: lb://admin-auth # The destination address of the route ,lb by load balance, Load balancing
predicates: # Route assertion , Determine whether the request meets the rules
- Path=/admin-auth/** # Determine whether the request is /user start
solve
because Gateway The bottom layer uses Ribbon As load balancing , There are no related components in the dependency , Therefore, correct distribution cannot be carried out . Just add in :
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
边栏推荐
- It is predicted that 2021 will accelerate the achievement of super automation beyond RPA
- R语言如何将大型Excel文件转为dta格式详解
- bond0脚本
- The practice of depth estimation self-monitoring model monodepth2 in its own data set -- single card / multi card training, reasoning, onnx transformation and quantitative index evaluation
- 关于ROS2安装connext RMW的进度条卡在13%问题的解决办法
- The security market has entered a trillion era, and the security B2B online mall platform has been accurately connected to deepen the enterprise development path
- ~4.2 CCF 2021-12-1 sequence query
- telnet远程登录aaa模式详解【华为eNSP】
- Flask SSTI injection learning
- Reverse Integer
猜你喜欢

Nuc980 set up SSH xshell connection

Typora cannot open the prompt to install a new version solution
![einsum(): operands do not broadcast with remapped shapes [original->remapped]: [1, 144, 20, 17]->[1,](/img/bb/0fd0fdb7537090829f3d8df25aa59b.png)
einsum(): operands do not broadcast with remapped shapes [original->remapped]: [1, 144, 20, 17]->[1,

sqli-labs Basic Challenges Less11-22

Hyperautomation for the enhancement of automation in industries

IDEA设置提交SVN时忽略文件配置

手把手教你申请SSL证书
![应用实践:Paddle分类模型大集成者[PaddleHub、Finetune、prompt]](/img/b6/62a346174bfa63fe352f9ef7596bfc.png)
应用实践:Paddle分类模型大集成者[PaddleHub、Finetune、prompt]

~5 new solution of CCF 2021-12-2 sequence query

实现一个家庭安防与环境监测系统(二)
随机推荐
金鱼哥RHCA回忆录:CL210管理存储--管理共享文件系统
~5 new solution of CCF 2021-12-2 sequence query
The practice of depth estimation self-monitoring model monodepth2 in its own data set -- single card / multi card training, reasoning, onnx transformation and quantitative index evaluation
CDA level Ⅰ 2021 new version simulation question 2 (with answers)
The supply chain collaborative management system, a new "engine" of digitalization in machinery manufacturing industry, helps enterprises' refined management to a new level
~4.2 CCF 2021-12-1 sequence query
sqli-labs Basic Challenges Less1-10
Easy entry natural language processing series 12 hidden Markov models
苹果手机端同步不成功,退出登录,结果再也登录不了了
Numpy basic package for data analysis
Idea settings ignore file configuration when submitting SVN
IDEA设置提交SVN时忽略文件配置
Maya modeling exercise
Structure size
结构体大小
Reverse Integer
Mlops column introduction
新唐NUC980设置DHCP或者静态IP
Apple failed to synchronize on its mobile terminal, so it exited the login. As a result, it could not log in again
OKA通证权益解析,参与Okaleido生态建设的不二之选