当前位置:网站首页>Nacos调用微服务两个问题:1.Load balancer does not contain an instance for the service 2.Connection refused
Nacos调用微服务两个问题:1.Load balancer does not contain an instance for the service 2.Connection refused
2022-06-27 03:13:00 【nightwind2017】
项目场景:
Spring Boot + Spring Cloud + Spring Cloud Alibaba + Nacos
1、问题描述
local项目启动后,利用nacos访问注册中心里的名为test服务时,在test服务已经注册到注册中心的情况下,loca仍然访问不到test,日志显示:
Load balancer does not contain an instance for the service “test”
解决方案:
这个时候要检查local项目的配置文件,找到nacos的配置位置
将这里的ip配置为该项目启动所在机器的ip地址,如机器ip为本地,就配置为127.0.0.1
2、问题描述
上述问题修正之后,local访问test可能会出现如下问题:
Connection refused: connect executing POST http:
解决方案:
test 如果是部署在某个服务器上,就要检查test项目在这个服务器上所使用的端口是否开启,并且外部可以访问
检测方法是,打开windows系统的cmd命令行,输入如下指令:
telnet xxx.xx.xx.xx(test项目所在服务器的ip) 0000(test项目使用的端口号)
如果命令行无法识别telnet命令,可查询如何在windows系统开启telnet服务
如何在windows系统开启telnet服务
如果端口访问不通,则在服务器开启该端口
边栏推荐
- Google began to roll itself, AI architecture pathways was blessed, and 20billion generation models were launched
- Stack overflow vulnerability
- Getting started with Scala_ Immutable list and variable list
- Flink學習2:應用場景
- 对数器
- Easy to use plug-ins in idea
- 2021:AdaVQA: Overcoming Language Priors with Adapted Margin Cosine Loss∗自适应的边缘余弦损失解决语言先验
- 投资理财产品的钱有保障吗?会不会没有了?
- lodash get js代码实现
- Docker deploy redis cluster
猜你喜欢
Calculation of average wind direction and speed (unit vector method)
How does source insight (SI) display the full path? (do not display omitted paths) (turn off trim long path names with ellipses)
ESP8266
Cs5213 HDMI to VGA (with audio) single turn scheme, cs5213 HDMI to VGA (with audio) IC
2021:AdaVQA: Overcoming Language Priors with Adapted Margin Cosine Loss∗自适应的边缘余弦损失解决语言先验
Flink learning 5: how it works
Learn Tai Chi maker mqtt (IX) esp8266 subscribe to and publish mqtt messages at the same time
jmeter将上一个请求的结果作为下一个请求的参数
Flink学习2:应用场景
PAT甲级 1018 Public Bike Management
随机推荐
Human soberness: bottom logic and top cognition
Career outlook, money outlook and happiness outlook
PAT甲级 1026 Table Tennis
Paddlepaddle 21 is implemented based on dropout with 4 lines of code droplock
pytorch_grad_cam——pytorch下的模型特征(Class Activation Mapping, CAM)可视化库
Pat grade a 1020 tree Traversals
The use and introduction of pytorch 23 hook and the implementation of plug and play dropblock based on hook
2021:Beyond Question-Based Biases:Assessing Multimodal Shortcut Learning in Visual Question Answeri
Is the money invested in financial products guaranteed? Is there no more?
2016Analyzing the Behavior of Visual Question Answering Models
Cvpr2021:separating skills and concepts for new visual question answering
2022 operation of simulated examination platform for tea artist (Senior) work license question bank
Pat grade a 1019 general palindromic number
剑指Offer || :栈与队列(简单)
Stack overflow vulnerability
企业数字化转型:信息化与数字化
2021:passage retrieval for outside knowledgevisual question answering
JWT certification process and use cases
2021:adavqa: overlapping language priors with adapted margin cosine loss *
TopoLVM: 基于LVM的Kubernetes本地持久化方案,容量感知,动态创建PV,轻松使用本地磁盘