当前位置:网站首页>Nacos installation and pit stepping
Nacos installation and pit stepping
2022-07-27 00:19:00 【、wook】
List of articles
Preface :
springcloud alibaba And springboot For version selection, please refer to the official address ( Click on the version description ) :https://github.com/alibaba/spring-cloud-alibaba/wiki
1.windows edition
1. Download from official website https://nacos.io/zh-cn/docs/quick-start.html
Choose the version you want 

After downloading, directly unzip it to the customized directory .
2. Startup and possible errors
Stand alone start : Go to the installation directory /bin Under the table of contents ,shell Execute... In the window startup.cmd -m standalone ( Default password nacos nacos)
1. The default is cluster startup , No addition standalone Will report a mistake
2. If it changes /conf In the catalog application.properties, Remember to execute nacos-mysql.sql and 1.4.0-ipv6_support-update.sql
4. I encountered an embarrassing pit during the test , When building a multi-level directory structure , The business module added pom , Lead to double-screen Start registration naocs Failure ...Param 'serviceName' is illegal, serviceName is blank
<!--springboot 2.4 After that, it will not be loaded by default bootstrap.yml, If you need to load bootstrap Files need to be manually added with dependencies -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
3. To configure Nacos config And errors encountered ( Procedural issues , Understanding can )
1.pom Add to file maven rely on
<!--nacos Configuration center -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
An exception occurred when the startup class was started :
c.a.nacos.client.security.SecurityProxy : [SecurityProxy] login http request failed url: http://tz-nacos:8848/nacos/v1/auth/users/login, params: {
username=nacos}, bodyMap: {
password=}, errorMsg: errCode: 100, errMsg: Nacos serialize for class [com.alibaba.nacos.common.http.HttpRestResult] failed.
as a result of config hinder dataid The configuration should be the same as the service name , example : - data-id: ${spring.application.name}.yml
If appear 403 Error of , It is estimated that permission control is enabled ,bootstrap.yml in nacos To add an account and password !
Example of configuration results :
server:
port: 17888
spring:
application:
name: double-screen-service
cloud:
nacos:
server-addr: tz-nacos:8848
username: nacos
password: tz123456
config:
file-extension: yaml
namespace: public
# notes : Be sure to group here according to your own , I've been here for a long time ..
group: tz4cloud
边栏推荐
- Chapter 7 course summary
- Sliding window problem summary
- Mysql8 installation
- Tencent cloud lightweight application server purchase method steps!
- uni-app学习(二)
- Database: MySQL foundation +crud basic operation
- 深度学习调参技巧
- 放图仓库-Tsai
- Push to origin/master was rejected error resolution
- Codeforces E. maximum subsequence value (greed + pigeon nest principle)
猜你喜欢
随机推荐
哨兵2号(Sentinel-2)的下载及处理
第1章 开发第一个restful应用
Leetcode topic - array
Practice of intelligent code reconstruction of Zhongyuan bank
滑动窗口问题总结
Practice of data storage scheme in distributed system
Relationship between limit, continuity, partial derivative and total differential of multivariate function (learning notes)
uni-app学习(二)
第1章 拦截器入门及使用技巧
Share a regular expression
Transformers is a graph neural network
画冲击函数
[C language] array
PTA 7-3 lists leaf nodes
Codeforces D. two divisors (number theory, linear sieve)
07 design of ponding monitoring system based on 51 single chip microcomputer
The basic operation of data tables in MySQL is very difficult. This experiment will take you through it from the beginning
Method of realizing program startup and self startup through registry
Codeforces E. maximum subsequence value (greed + pigeon nest principle)
Transpose convolution correlation









