赵冬冬 %!s(int64=4) %!d(string=hai) anos
pai
achega
ff05a7b0f7

+ 1 - 0
nacos/.gitignore

@@ -0,0 +1 @@
+/logs/

+ 19 - 1
nacos/LICENSE

@@ -245,6 +245,24 @@ 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.
@@ -283,7 +301,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.

+ 22 - 45
nacos/bin/startup.cmd

@@ -24,74 +24,51 @@ set BASE_DIR="%BASE_DIR:~0,-5%"
 set DEFAULT_SEARCH_LOCATIONS="classpath:/,classpath:/config/,file:./,file:./config/"
 set CUSTOM_SEARCH_LOCATIONS=%DEFAULT_SEARCH_LOCATIONS%,file:%BASE_DIR%/conf/
 
-rem set MODE="cluster"
 set MODE="standalone"
 set FUNCTION_MODE="all"
 set SERVER=nacos-server
 set MODE_INDEX=-1
 set FUNCTION_MODE_INDEX=-1
 set SERVER_INDEX=-1
-set EMBEDDED_STORAGE_INDEX=-1
-set EMBEDDED_STORAGE=""
 
 
 set i=0
 for %%a in (%*) do (
-    if "%%a" == "-m" ( set /a MODE_INDEX=!i!+1 )
-    if "%%a" == "-f" ( set /a FUNCTION_MODE_INDEX=!i!+1 )
-    if "%%a" == "-s" ( set /a SERVER_INDEX=!i!+1 )
-    if "%%a" == "-p" ( set /a EMBEDDED_STORAGE_INDEX=!i!+1 )
-    set /a i+=1
+   if "%%a" == "-m" ( set /a MODE_INDEX=!i!+1 )
+   if "%%a" == "-f" ( set /a FUNCTION_MODE_INDEX=!i!+1 )
+   if "%%a" == "-s" ( set /a SERVER_INDEX=!i!+1 )
+   set /a i+=1
 )
 
 set i=0
 for %%a in (%*) do (
-    if %MODE_INDEX% == !i! ( set MODE="%%a" )
-    if %FUNCTION_MODE_INDEX% == !i! ( set FUNCTION_MODE="%%a" )
-    if %SERVER_INDEX% == !i! (set SERVER="%%a")
-    if %EMBEDDED_STORAGE_INDEX% == !i! (set EMBEDDED_STORAGE="%%a")
-    set /a i+=1
+   if %MODE_INDEX% == !i! ( set MODE="%%a" )
+   if %FUNCTION_MODE_INDEX% == !i! ( set FUNCTION_MODE="%%a" )
+   if %SERVER_INDEX% == !i! (set SERVER="%%a")
+   set /a i+=1
 )
 
-rem if nacos startup mode is standalone
 if %MODE% == "standalone" (
-    echo "nacos is starting with standalone"
-	  set "NACOS_OPTS=-Dnacos.standalone=true"
-    set "NACOS_JVM_OPTS=-Xms512m -Xmx512m -Xmn256m"
+    set "JAVA_OPT=%JAVA_OPT% -Xms512m -Xmx512m -Xmn256m"
+    set "JAVA_OPT=%JAVA_OPT% -Dnacos.standalone=true"
+) else (
+    set "JAVA_OPT=%JAVA_OPT% -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
+    set "JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%BASE_DIR%\logs\java_heapdump.hprof"
+    set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages"
 )
 
-rem if nacos startup mode is cluster
-if %MODE% == "cluster" (
-    echo "nacos is starting with cluster"
-	  if %EMBEDDED_STORAGE% == "embedded" (
-	      set "NACOS_OPTS=-DembeddedStorage=true"
-	  )
-
-    set "NACOS_JVM_OPTS=-server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%BASE_DIR%\logs\java_heapdump.hprof -XX:-UseLargePages"
-)
-
-rem set nacos's functionMode
 if %FUNCTION_MODE% == "config" (
-    set "NACOS_OPTS=%NACOS_OPTS% -Dnacos.functionMode=config"
+  set "JAVA_OPT=%JAVA_OPT% -Dnacos.functionMode=config"
 )
-
 if %FUNCTION_MODE% == "naming" (
-    set "NACOS_OPTS=%NACOS_OPTS% -Dnacos.functionMode=naming"
+  set "JAVA_OPT=%JAVA_OPT% -Dnacos.functionMode=naming"
 )
 
-rem set nacos options
-set "NACOS_OPTS=%NACOS_OPTS% -Dloader.path=%BASE_DIR%/plugins/health,%BASE_DIR%/plugins/cmdb"
-set "NACOS_OPTS=%NACOS_OPTS% -Dnacos.home=%BASE_DIR%"
-set "NACOS_OPTS=%NACOS_OPTS% -jar %BASE_DIR%\target\%SERVER%.jar"
-
-rem set nacos spring config location
-set "NACOS_CONFIG_OPTS=--spring.config.location=%CUSTOM_SEARCH_LOCATIONS%"
-
-rem set nacos log4j file location
-set "NACOS_LOG4J_OPTS=--logging.config=%BASE_DIR%/conf/nacos-logback.xml"
-
+set "JAVA_OPT=%JAVA_OPT% -Dloader.path=%BASE_DIR%/plugins/health,%BASE_DIR%/plugins/cmdb,%BASE_DIR%/plugins/mysql"
 
-set COMMAND="%JAVA%" %NACOS_JVM_OPTS% %NACOS_OPTS% %NACOS_CONFIG_OPTS% %NACOS_LOG4J_OPTS% nacos.nacos %*
+set "JAVA_OPT=%JAVA_OPT% -Dnacos.home=%BASE_DIR%"
+set "JAVA_OPT=%JAVA_OPT% -jar %BASE_DIR%\target\%SERVER%.jar"
+set "JAVA_OPT=%JAVA_OPT% --spring.config.location=%CUSTOM_SEARCH_LOCATIONS%"
+set "JAVA_OPT=%JAVA_OPT% --logging.config=%BASE_DIR%/conf/nacos-logback.xml"
 
-rem start nacos command
-%COMMAND%
+call "%JAVA%" %JAVA_OPT% nacos.nacos %*

+ 2 - 12
nacos/bin/startup.sh

@@ -54,9 +54,7 @@ fi
 export SERVER="nacos-server"
 export MODE="cluster"
 export FUNCTION_MODE="all"
-export MEMBER_LIST=""
-export EMBEDDED_STORAGE=""
-while getopts ":m:f:s:c:p:" opt
+while getopts ":m:f:s:" opt
 do
     case $opt in
         m)
@@ -65,10 +63,6 @@ do
             FUNCTION_MODE=$OPTARG;;
         s)
             SERVER=$OPTARG;;
-        c)
-            MEMBER_LIST=$OPTARG;;
-        p)
-            EMBEDDED_STORAGE=$OPTARG;;
         ?)
         echo "Unknown parameter"
         exit 1;;
@@ -88,9 +82,6 @@ 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"
@@ -103,7 +94,6 @@ 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
@@ -113,7 +103,7 @@ else
   JAVA_OPT="${JAVA_OPT} -Xloggc:${BASE_DIR}/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
 fi
 
-JAVA_OPT="${JAVA_OPT} -Dloader.path=${BASE_DIR}/plugins/health,${BASE_DIR}/plugins/cmdb"
+JAVA_OPT="${JAVA_OPT} -Dloader.path=${BASE_DIR}/plugins/health,${BASE_DIR}/plugins/cmdb,${BASE_DIR}/plugins/mysql"
 JAVA_OPT="${JAVA_OPT} -Dnacos.home=${BASE_DIR}"
 JAVA_OPT="${JAVA_OPT} -jar ${BASE_DIR}/target/${SERVER}.jar"
 JAVA_OPT="${JAVA_OPT} ${JAVA_OPT_EXT}"

+ 22 - 71
nacos/conf/application.properties

@@ -1,24 +1,14 @@
-#
-# Copyright 1999-2018 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.
-#
-
 #*************** Spring Boot Related Configurations ***************#
 ### Default web context path:
 server.servlet.contextPath=/nacos
 ### Default web server port:
 server.port=8898
+spring.datasource.platform=mysql
+
+db.num=1
+db.url.0=jdbc:mysql://172.16.90.253:3306/forest-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
+db.user=root          
+db.password=123456  
 
 #*************** Network Related Configurations ***************#
 ### If prefer hostname over ip for Nacos server addresses in cluster.conf:
@@ -28,17 +18,18 @@ server.port=8898
 # nacos.inetutils.ip-address=
 
 
+
 #*************** Config Module Related Configurations ***************#
-### If use MySQL as datasource:
- spring.datasource.platform=mysql
+### If user MySQL as datasource:
+# spring.datasource.platform=mysql
 
 ### Count of DB:
- db.num=1
+# db.num=1
 
 ### Connect URL of DB:
- db.url.0=jdbc:mysql://172.16.90.253:3306/forest-qb-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
- db.user=root
- db.password=123456
+# 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
 
 
 #*************** Naming Module Related Configurations ***************#
@@ -52,14 +43,18 @@ server.port=8898
 # 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=false
+# 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
+
+### If enable the empty service auto clean, services with an empty instance are automatically cleared
+nacos.naming.empty-service.auto-clean=false
+### The empty service cleanup task delays startup time in milliseconds
+nacos.naming.empty-service.clean.initial-delay-ms=60000
+### The empty service cleanup task cycle execution time in milliseconds
+nacos.naming.empty-service.clean.period-time-ms=20000
 
 
 #*************** CMDB Module Related Configurations ***************#
@@ -124,53 +119,9 @@ 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=true
+nacos.core.auth.caching.enabled=false
 
 
 #*************** 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

+ 7 - 171
nacos/conf/application.properties.example

@@ -1,176 +1,12 @@
-#
-# Copyright 1999-2018 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.
-#
+# spring
 
-#*************** Spring Boot Related Configurations ***************#
-### Default web context path:
+server.contextPath=/nacos
 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
 
-### 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
+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

+ 3 - 19
nacos/conf/cluster.conf.example

@@ -1,21 +1,5 @@
-#
-# Copyright 1999-2018 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.
-#
-
 #it is ip
 #example
-192.168.16.101:8847
-192.168.16.102
-192.168.16.103
+10.10.109.214
+11.16.128.34
+11.16.128.36

+ 22 - 141
nacos/conf/nacos-logback.xml

@@ -1,20 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Copyright 1999-2018 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.
-  -->
-
 <configuration scan="true" scanPeriod="10 seconds">
 
     <springProperty scope="context" name="logPath" source="nacos.logs.path" defaultValue="${nacos.home}/logs"/>
@@ -27,7 +11,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${nacos.home}/logs/cmdb-main.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>2GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>7GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -51,7 +35,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/naming-server.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>1GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>7GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -75,7 +59,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/naming-raft.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>1GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>3GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -100,7 +84,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/naming-distro.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>1GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>3GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -124,7 +108,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/naming-event.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>1GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>3GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -148,7 +132,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/naming-push.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>1GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>3GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -164,7 +148,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/naming-rt.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>1GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>3GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -181,7 +165,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/naming-performance.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>1GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>3GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -199,7 +183,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/config-dump.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>2GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>7GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -215,7 +199,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/config-pull.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>20MB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>128MB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -231,7 +215,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/config-fatal.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>20MB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>128MB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -247,7 +231,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/config-memory.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>20MB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>128MB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -263,7 +247,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/config-pull-check.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>1GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>3GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -280,7 +264,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/config-client-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>2GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>7GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -297,7 +281,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/config-trace.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>2GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>7GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -314,7 +298,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/config-notify.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>1GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>3GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -331,7 +315,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/config-server.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>50MB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>512MB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -348,7 +332,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/nacos.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>50MB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>512MB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -365,7 +349,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/nacos-address.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>2GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>7GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -382,7 +366,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/istio-main.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>2GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>7GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -399,75 +383,7 @@
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <fileNamePattern>${LOG_HOME}/core-auth.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
             <maxFileSize>2GB</maxFileSize>
-            <maxHistory>7</maxHistory>
-            <totalSizeCap>7GB</totalSizeCap>
-            <cleanHistoryOnStart>true</cleanHistoryOnStart>
-        </rollingPolicy>
-        <encoder>
-            <Pattern>%date %level %msg%n%n</Pattern>
-            <charset>UTF-8</charset>
-        </encoder>
-    </appender>
-
-    <appender name="protocol-raft"
-              class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <file>${LOG_HOME}/protocol-raft.log</file>
-        <append>true</append>
-        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-            <fileNamePattern>${LOG_HOME}/protocol-raft.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
-            <maxFileSize>2GB</maxFileSize>
-            <maxHistory>7</maxHistory>
-            <totalSizeCap>7GB</totalSizeCap>
-            <cleanHistoryOnStart>true</cleanHistoryOnStart>
-        </rollingPolicy>
-        <encoder>
-            <Pattern>%date %level %msg%n%n</Pattern>
-            <charset>UTF-8</charset>
-        </encoder>
-    </appender>
-
-    <appender name="protocol-distro"
-              class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <file>${LOG_HOME}/protocol-distro.log</file>
-        <append>true</append>
-        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-            <fileNamePattern>${LOG_HOME}/protocol-distro.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
-            <maxFileSize>2GB</maxFileSize>
-            <maxHistory>7</maxHistory>
-            <totalSizeCap>7GB</totalSizeCap>
-            <cleanHistoryOnStart>true</cleanHistoryOnStart>
-        </rollingPolicy>
-        <encoder>
-            <Pattern>%date %level %msg%n%n</Pattern>
-            <charset>UTF-8</charset>
-        </encoder>
-    </appender>
-
-    <appender name="nacos-cluster"
-              class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <file>${LOG_HOME}/nacos-cluster.log</file>
-        <append>true</append>
-        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-            <fileNamePattern>${LOG_HOME}/nacos-cluster.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
-            <maxFileSize>2GB</maxFileSize>
-            <maxHistory>7</maxHistory>
-            <totalSizeCap>7GB</totalSizeCap>
-            <cleanHistoryOnStart>true</cleanHistoryOnStart>
-        </rollingPolicy>
-        <encoder>
-            <Pattern>%date %level %msg%n%n</Pattern>
-            <charset>UTF-8</charset>
-        </encoder>
-    </appender>
-
-    <appender name="alipay-jraft"
-              class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <file>${LOG_HOME}/alipay-jraft.log</file>
-        <append>true</append>
-        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-            <fileNamePattern>${LOG_HOME}/alipay-jraft.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
-            <maxFileSize>2GB</maxFileSize>
-            <maxHistory>7</maxHistory>
+            <MaxHistory>7</MaxHistory>
             <totalSizeCap>7GB</totalSizeCap>
             <cleanHistoryOnStart>true</cleanHistoryOnStart>
         </rollingPolicy>
@@ -567,26 +483,6 @@
         <appender-ref ref="core-auth"/>
     </logger>
 
-    <logger name="com.alibaba.nacos.core.protocol.raft" additivity="false">
-        <level value="INFO"/>
-        <appender-ref ref="protocol-raft"/>
-    </logger>
-
-    <logger name="com.alipay.sofa.jraft" additivity="false">
-        <level value="INFO"/>
-        <appender-ref ref="alipay-jraft"/>
-    </logger>
-
-    <logger name="com.alibaba.nacos.core.protocol.distro" additivity="false">
-        <level value="INFO"/>
-        <appender-ref ref="protocol-distro"/>
-    </logger>
-
-    <logger name="com.alibaba.nacos.core.cluster" additivity="false">
-        <level value="INFO"/>
-        <appender-ref ref="nacos-cluster"/>
-    </logger>
-
     <springProfile name="standalone">
         <logger name="org.springframework">
             <appender-ref ref="CONSOLE"/>
@@ -614,22 +510,7 @@
         </logger>
     </springProfile>
 
-    <logger name="com.alibaba.nacos.core.code.StartingSpringApplicationRunListener">
-        <appender-ref ref="CONSOLE"/>
-        <level value="INFO"/>
-    </logger>
-
-    <logger name="com.alibaba.nacos.common.notify.NotifyCenter">
-        <appender-ref ref="CONSOLE"/>
-        <level value="INFO"/>
-    </logger>
-
-    <logger name="com.alibaba.nacos.core.file.WatchFileCenter">
-        <appender-ref ref="CONSOLE"/>
-        <level value="INFO"/>
-    </logger>
-
-    <logger name="com.alibaba.nacos.common.executor.ThreadPoolManager">
+    <logger name="com.alibaba.nacos.core.listener.StartingSpringApplicationRunListener">
         <appender-ref ref="CONSOLE"/>
         <level value="INFO"/>
     </logger>

+ 1 - 17
nacos/conf/nacos-mysql.sql

@@ -1,19 +1,3 @@
-/*
- * Copyright 1999-2018 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.
- */
-
 /******************************************/
 /*   数据库全名 = nacos_config   */
 /*   表名称 = config_info   */
@@ -208,7 +192,7 @@ CREATE TABLE `roles` (
 
 CREATE TABLE `permissions` (
     `role` varchar(50) NOT NULL,
-    `resource` varchar(255) NOT NULL,
+    `resource` varchar(512) NOT NULL,
     `action` varchar(8) NOT NULL,
     UNIQUE INDEX `uk_role_permission` (`role`,`resource`,`action`) USING BTREE
 );

+ 0 - 16
nacos/conf/schema.sql

@@ -1,19 +1,3 @@
-/*
- * Copyright 1999-2018 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.
- */
-
 CREATE SCHEMA nacos AUTHORIZATION nacos;
 
 CREATE TABLE config_info (

+ 0 - 0
nacos/target/logs/access_log.2020-06-02.log


BIN=BIN
nacos/target/nacos-server.jar