diff --git a/zlt-register/nacos/LICENSE b/zlt-register/nacos/LICENSE
index 37261723..5be5ed21 100644
--- a/zlt-register/nacos/LICENSE
+++ b/zlt-register/nacos/LICENSE
@@ -245,24 +245,6 @@ The source code of slf4j can be found at https://github.com/qos-ch/slf4j.
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-------
-This product has a bundle fastjson, which is available under the ASL2 License.
-The source code of fastjson can be found at https://github.com/alibaba/fastjson.
-
- Copyright 1999-2016 Alibaba Group Holding Ltd.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
------
This product has a bundle javassist, which is available under the ASL2 License.
The source code of javassist can be found at https://github.com/jboss-javassist/javassist.
@@ -301,7 +283,7 @@ The source code of jna can be found at https://github.com/java-native-access/jna
This product has a bundle guava, which is available under the ASL2 License.
The source code of guava can be found at https://github.com/google/guava.
- Copyright (C) 2007 The Guava authors
+ Copyright (C) 2007 The Guava authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/zlt-register/nacos/bin/startup.sh b/zlt-register/nacos/bin/startup.sh
index 6da373f3..558442f8 100644
--- a/zlt-register/nacos/bin/startup.sh
+++ b/zlt-register/nacos/bin/startup.sh
@@ -54,7 +54,9 @@ fi
export SERVER="nacos-server"
export MODE="cluster"
export FUNCTION_MODE="all"
-while getopts ":m:f:s:" opt
+export MEMBER_LIST=""
+export EMBEDDED_STORAGE=""
+while getopts ":m:f:s:c:p:" opt
do
case $opt in
m)
@@ -63,6 +65,10 @@ do
FUNCTION_MODE=$OPTARG;;
s)
SERVER=$OPTARG;;
+ c)
+ MEMBER_LIST=$OPTARG;;
+ p)
+ EMBEDDED_STORAGE=$OPTARG;;
?)
echo "Unknown parameter"
exit 1;;
@@ -82,6 +88,9 @@ if [[ "${MODE}" == "standalone" ]]; then
JAVA_OPT="${JAVA_OPT} -Xms512m -Xmx512m -Xmn256m"
JAVA_OPT="${JAVA_OPT} -Dnacos.standalone=true"
else
+ if [[ "${EMBEDDED_STORAGE}" == "embedded" ]]; then
+ JAVA_OPT="${JAVA_OPT} -DembeddedStorage=true"
+ fi
JAVA_OPT="${JAVA_OPT} -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${BASE_DIR}/logs/java_heapdump.hprof"
JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages"
@@ -94,6 +103,7 @@ elif [[ "${FUNCTION_MODE}" == "naming" ]]; then
JAVA_OPT="${JAVA_OPT} -Dnacos.functionMode=naming"
fi
+JAVA_OPT="${JAVA_OPT} -Dnacos.member.list=${MEMBER_LIST}"
JAVA_MAJOR_VERSION=$($JAVA -version 2>&1 | sed -E -n 's/.* version "([0-9]*).*$/\1/p')
if [[ "$JAVA_MAJOR_VERSION" -ge "9" ]] ; then
diff --git a/zlt-register/nacos/conf/application.properties b/zlt-register/nacos/conf/application.properties
index c9f762e6..87dc5455 100644
--- a/zlt-register/nacos/conf/application.properties
+++ b/zlt-register/nacos/conf/application.properties
@@ -12,7 +12,6 @@ server.port=8848
# nacos.inetutils.ip-address=
-
#*************** Config Module Related Configurations ***************#
### If user MySQL as datasource:
# spring.datasource.platform=mysql
@@ -21,9 +20,9 @@ server.port=8848
# db.num=1
### Connect URL of DB:
-# db.url.0=jdbc:mysql://1.1.1.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
-# db.user=user
-# db.password=password
+# db.url.0=jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
+# db.user=nacos
+# db.password=nacos
#*************** Naming Module Related Configurations ***************#
@@ -42,6 +41,10 @@ server.port=8848
### If enable the instance auto expiration, kind like of health check of instance:
# nacos.naming.expireInstance=true
+nacos.naming.empty-service.auto-clean=true
+nacos.naming.empty-service.clean.initial-delay-ms=50000
+nacos.naming.empty-service.clean.period-time-ms=30000
+
#*************** CMDB Module Related Configurations ***************#
### The interval to dump external CMDB in seconds:
@@ -105,9 +108,53 @@ nacos.core.auth.default.token.expire.seconds=18000
nacos.core.auth.default.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
### Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay.
-nacos.core.auth.caching.enabled=false
+nacos.core.auth.caching.enabled=true
#*************** Istio Related Configurations ***************#
### If turn on the MCP server:
nacos.istio.mcp.server.enabled=false
+
+
+
+###*************** Add from 1.3.0 ***************###
+
+
+#*************** Core Related Configurations ***************#
+
+### set the WorkerID manually
+# nacos.core.snowflake.worker-id=
+
+### Member-MetaData
+# nacos.core.member.meta.site=
+# nacos.core.member.meta.adweight=
+# nacos.core.member.meta.weight=
+
+### MemberLookup
+### Addressing pattern category, If set, the priority is highest
+# nacos.core.member.lookup.type=[file,address-server,discovery]
+## Set the cluster list with a configuration file or command-line argument
+# nacos.member.list=192.168.16.101:8847?raft_port=8807,192.168.16.101?raft_port=8808,192.168.16.101:8849?raft_port=8809
+## for DiscoveryMemberLookup
+# If you want to use cluster node self-discovery, turn this parameter on
+# nacos.member.discovery=false
+## for AddressServerMemberLookup
+# Maximum number of retries to query the address server upon initialization
+# nacos.core.address-server.retry=5
+
+#*************** JRaft Related Configurations ***************#
+
+### Sets the Raft cluster election timeout, default value is 5 second
+# nacos.core.protocol.raft.data.election_timeout_ms=5000
+### Sets the amount of time the Raft snapshot will execute periodically, default is 30 minute
+# nacos.core.protocol.raft.data.snapshot_interval_secs=30
+### Requested retries, default value is 1
+# nacos.core.protocol.raft.data.request_failoverRetries=1
+### raft internal worker threads
+# nacos.core.protocol.raft.data.core_thread_num=8
+### Number of threads required for raft business request processing
+# nacos.core.protocol.raft.data.cli_service_thread_num=4
+### raft linear read strategy, defaults to index
+# nacos.core.protocol.raft.data.read_index_type=ReadOnlySafe
+### rpc request timeout, default 5 seconds
+# nacos.core.protocol.raft.data.rpc_request_timeout_ms=5000
diff --git a/zlt-register/nacos/conf/application.properties.example b/zlt-register/nacos/conf/application.properties.example
index fd873753..87dc5455 100644
--- a/zlt-register/nacos/conf/application.properties.example
+++ b/zlt-register/nacos/conf/application.properties.example
@@ -1,12 +1,160 @@
-# spring
-
-server.contextPath=/nacos
+#*************** Spring Boot Related Configurations ***************#
+### Default web context path:
server.servlet.contextPath=/nacos
+### Default web server port:
server.port=8848
+#*************** Network Related Configurations ***************#
+### If prefer hostname over ip for Nacos server addresses in cluster.conf:
+# nacos.inetutils.prefer-hostname-over-ip=false
-db.num=2
-db.url.0=jdbc:mysql://11.162.196.16:3306/nacos_devtest?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
-db.url.1=jdbc:mysql://11.163.152.9:3306/nacos_devtest?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
-db.user=nacos_devtest
-db.password=nacos
\ No newline at end of file
+### Specify local server's IP:
+# nacos.inetutils.ip-address=
+
+
+#*************** Config Module Related Configurations ***************#
+### If user MySQL as datasource:
+# spring.datasource.platform=mysql
+
+### Count of DB:
+# db.num=1
+
+### Connect URL of DB:
+# db.url.0=jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
+# db.user=nacos
+# db.password=nacos
+
+
+#*************** Naming Module Related Configurations ***************#
+### Data dispatch task execution period in milliseconds:
+# nacos.naming.distro.taskDispatchPeriod=200
+
+### Data count of batch sync task:
+# nacos.naming.distro.batchSyncKeyCount=1000
+
+### Retry delay in milliseconds if sync task failed:
+# nacos.naming.distro.syncRetryDelay=5000
+
+### If enable data warmup. If set to false, the server would accept request without local data preparation:
+# nacos.naming.data.warmup=true
+
+### If enable the instance auto expiration, kind like of health check of instance:
+# nacos.naming.expireInstance=true
+
+nacos.naming.empty-service.auto-clean=true
+nacos.naming.empty-service.clean.initial-delay-ms=50000
+nacos.naming.empty-service.clean.period-time-ms=30000
+
+
+#*************** CMDB Module Related Configurations ***************#
+### The interval to dump external CMDB in seconds:
+# nacos.cmdb.dumpTaskInterval=3600
+
+### The interval of polling data change event in seconds:
+# nacos.cmdb.eventTaskInterval=10
+
+### The interval of loading labels in seconds:
+# nacos.cmdb.labelTaskInterval=300
+
+### If turn on data loading task:
+# nacos.cmdb.loadDataAtStart=false
+
+
+#*************** Metrics Related Configurations ***************#
+### Metrics for prometheus
+#management.endpoints.web.exposure.include=*
+
+### Metrics for elastic search
+management.metrics.export.elastic.enabled=false
+#management.metrics.export.elastic.host=http://localhost:9200
+
+### Metrics for influx
+management.metrics.export.influx.enabled=false
+#management.metrics.export.influx.db=springboot
+#management.metrics.export.influx.uri=http://localhost:8086
+#management.metrics.export.influx.auto-create-db=true
+#management.metrics.export.influx.consistency=one
+#management.metrics.export.influx.compressed=true
+
+
+#*************** Access Log Related Configurations ***************#
+### If turn on the access log:
+server.tomcat.accesslog.enabled=true
+
+### The access log pattern:
+server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i
+
+### The directory of access log:
+server.tomcat.basedir=
+
+
+#*************** Access Control Related Configurations ***************#
+### If enable spring security, this option is deprecated in 1.2.0:
+#spring.security.enabled=false
+
+### The ignore urls of auth, is deprecated in 1.2.0:
+nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
+
+### The auth system to use, currently only 'nacos' is supported:
+nacos.core.auth.system.type=nacos
+
+### If turn on auth system:
+nacos.core.auth.enabled=false
+
+### The token expiration in seconds:
+nacos.core.auth.default.token.expire.seconds=18000
+
+### The default token:
+nacos.core.auth.default.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
+
+### Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay.
+nacos.core.auth.caching.enabled=true
+
+
+#*************** Istio Related Configurations ***************#
+### If turn on the MCP server:
+nacos.istio.mcp.server.enabled=false
+
+
+
+###*************** Add from 1.3.0 ***************###
+
+
+#*************** Core Related Configurations ***************#
+
+### set the WorkerID manually
+# nacos.core.snowflake.worker-id=
+
+### Member-MetaData
+# nacos.core.member.meta.site=
+# nacos.core.member.meta.adweight=
+# nacos.core.member.meta.weight=
+
+### MemberLookup
+### Addressing pattern category, If set, the priority is highest
+# nacos.core.member.lookup.type=[file,address-server,discovery]
+## Set the cluster list with a configuration file or command-line argument
+# nacos.member.list=192.168.16.101:8847?raft_port=8807,192.168.16.101?raft_port=8808,192.168.16.101:8849?raft_port=8809
+## for DiscoveryMemberLookup
+# If you want to use cluster node self-discovery, turn this parameter on
+# nacos.member.discovery=false
+## for AddressServerMemberLookup
+# Maximum number of retries to query the address server upon initialization
+# nacos.core.address-server.retry=5
+
+#*************** JRaft Related Configurations ***************#
+
+### Sets the Raft cluster election timeout, default value is 5 second
+# nacos.core.protocol.raft.data.election_timeout_ms=5000
+### Sets the amount of time the Raft snapshot will execute periodically, default is 30 minute
+# nacos.core.protocol.raft.data.snapshot_interval_secs=30
+### Requested retries, default value is 1
+# nacos.core.protocol.raft.data.request_failoverRetries=1
+### raft internal worker threads
+# nacos.core.protocol.raft.data.core_thread_num=8
+### Number of threads required for raft business request processing
+# nacos.core.protocol.raft.data.cli_service_thread_num=4
+### raft linear read strategy, defaults to index
+# nacos.core.protocol.raft.data.read_index_type=ReadOnlySafe
+### rpc request timeout, default 5 seconds
+# nacos.core.protocol.raft.data.rpc_request_timeout_ms=5000
diff --git a/zlt-register/nacos/conf/cluster.conf.example b/zlt-register/nacos/conf/cluster.conf.example
index 38eed31a..2cbf5154 100644
--- a/zlt-register/nacos/conf/cluster.conf.example
+++ b/zlt-register/nacos/conf/cluster.conf.example
@@ -1,5 +1,5 @@
#it is ip
#example
-10.10.109.214
-11.16.128.34
-11.16.128.36
\ No newline at end of file
+192.168.16.101:8847
+192.168.16.102
+192.168.16.103
\ No newline at end of file
diff --git a/zlt-register/nacos/conf/nacos-logback.xml b/zlt-register/nacos/conf/nacos-logback.xml
index ce473f39..27da0022 100644
--- a/zlt-register/nacos/conf/nacos-logback.xml
+++ b/zlt-register/nacos/conf/nacos-logback.xml
@@ -393,6 +393,74 @@
+
+ ${LOG_HOME}/protocol-raft.log
+ true
+
+ ${LOG_HOME}/protocol-raft.log.%d{yyyy-MM-dd}.%i
+ 2GB
+ 7
+ 7GB
+ true
+
+
+ %date %level %msg%n%n
+ UTF-8
+
+
+
+
+ ${LOG_HOME}/protocol-distro.log
+ true
+
+ ${LOG_HOME}/protocol-distro.log.%d{yyyy-MM-dd}.%i
+ 2GB
+ 7
+ 7GB
+ true
+
+
+ %date %level %msg%n%n
+ UTF-8
+
+
+
+
+ ${LOG_HOME}/nacos-cluster.log
+ true
+
+ ${LOG_HOME}/nacos-cluster.log.%d{yyyy-MM-dd}.%i
+ 2GB
+ 7
+ 7GB
+ true
+
+
+ %date %level %msg%n%n
+ UTF-8
+
+
+
+
+ ${LOG_HOME}/alipay-jraft.log
+ true
+
+ ${LOG_HOME}/alipay-jraft.log.%d{yyyy-MM-dd}.%i
+ 2GB
+ 7
+ 7GB
+ true
+
+
+ %date %level %msg%n%n
+ UTF-8
+
+
+
@@ -483,6 +551,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -510,7 +598,22 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/zlt-register/nacos/target/nacos-server.jar b/zlt-register/nacos/target/nacos-server.jar
index 60234d47..3e1c4625 100644
Binary files a/zlt-register/nacos/target/nacos-server.jar and b/zlt-register/nacos/target/nacos-server.jar differ