当前位置:网站首页>Solve the problem that the local nacos is not configured but the localhost8848 connection exception always occurs
Solve the problem that the local nacos is not configured but the localhost8848 connection exception always occurs
2022-07-30 05:57:00 【Free stuff】
Introduction
The thing is like this, the registration center nacos is configured for a project, and the nacos service of the local machine is configured at the beginning. After changing the nacos address to a virtual machine later, although the project is successfully started, it reports a nacos exception, as follows:

There are two configuration files:

Configured separately:


You can see that there is no configuration about localhost:8848 at all, but the exception of localhost:8848 is still reported. Open the nacos visualization interface of the virtual machine and find that the service has been registered in the nacos of the virtual machine

The version in question is:
com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery 2.2.6.RELEASE com.alibaba.cloud spring-cloud-starter-alibaba-nacos-config 2.2.6.RELEASE
Resolve
This is caused when nacos reads its own automatic configuration with a higher priority than the configuration in the application file, and the automatic configuration of nacos itself is the nacos service on port 127.0.0.1:8848, so the above exception occurs, so it is necessary toRaise the priority of the configuration file
Create a bootstrap.properties or bootstrap.yml file to configure the nacos address.This configuration is system-level and has the highest priority. If you first read the nacos address from this file, no error will be reported

spring.cloud.nacos.server-addr=192.168.190.128:8848
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
- 视野 | KeyDB:为 Web 应用而生的高性能 Redis 分支
- Seata异常:endpoint format should like ip:port
- 容器化 | 在 KubeSphere 中部署 MySQL 集群
- JVM之GC 调优基础知识(一)
- [Mysql] DATEDIFF函数
- leetcode刷题
- Concurrent Programming Review
- [其他] DS5
- How MySQL to prepare SQL pretreatment (solve the query IN SQL pretreatment can only query out the problem of a record)
- MySQL Basics (DDL, DML, DQL)
猜你喜欢

【图像处理】基于中轴变换实现图像骨架提取附matlab代码

Programmers care guide, give yourself a chance to make the occasional relaxation of body and mind

ClickHouse 数据插入、更新与删除操作 SQL

RadonDB MySQL Kubernetes 2.2.0 发布!

Different lower_case_table_names settings for server (‘1‘) and data dictionary (‘0‘) 解决方案

文档在线化管理系统Confluce使用

cookie和session区别

【小程序项目开发 -- 京东商城】uni-app 商品分类页面(下)

无代码开发平台重新申请入门教程

微信支付及支付回调
随机推荐
WeChat payment and payment callback
IDEA的database使用教程(使用mysql数据库)
Nacos 原理
This article will take you through js to deal with the addition, deletion, modification and inspection of tree structure data
【图像检测】基于灰度图像的积累加权边缘检测方法研究附matlab代码
【Redis高手修炼之路】Jedis——Jedis的基本使用
2022 Pengcheng Cup web
力扣344-反转字符串——双指针法
The difference between asyncawait and promise
cmd(命令行)操作或连接mysql数据库,以及创建数据库与表
Golang——从入门到放弃
MySQL夺命10问,你能坚持到第几问?
Kyligence 亮相第五届南方信息大会并获评“CIO 优选数字化服务商”
[Image processing] Image skeleton extraction based on central axis transformation with matlab code
腾讯面试居然跟我扯了半小时的CountDownLatch
Docker-compose安装mysql
从字节码角度带你彻底理解i++与++i
五一去见了一些身价数千万的成功人士,我一些新的思路和启示
G巴士计数(Google Kickstart2014 Round D Problem B)(DAY 89)
JVM之GC 调优基础知识(一)