diff --git a/zlt-register/nacos/bin/shutdown.sh b/zlt-register/nacos/bin/shutdown.sh index 3df4a03e6e3ae726f9cbc836ce1ac3bcf853c566..e3e14fedd862f6ec26f71c9493eff42c91443007 100644 --- a/zlt-register/nacos/bin/shutdown.sh +++ b/zlt-register/nacos/bin/shutdown.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 1999-2018 Alibaba Group Holding Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/zlt-register/nacos/bin/startup.cmd b/zlt-register/nacos/bin/startup.cmd index 2df9905f0c1122051feab18d3c3a0684f9f45b57..c9910877229d6637b61f44e6e162e21a313e75e5 100644 --- a/zlt-register/nacos/bin/startup.cmd +++ b/zlt-register/nacos/bin/startup.cmd @@ -21,10 +21,9 @@ rem added double quotation marks to avoid the issue caused by the folder names c rem removed the last 5 chars(which means \bin\) to get the base DIR. 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/ +set CUSTOM_SEARCH_LOCATIONS=file:%BASE_DIR%/conf/ -set MODE="standalone" +set MODE="cluster" set FUNCTION_MODE="all" set SERVER=nacos-server set MODE_INDEX=-1 @@ -36,46 +35,61 @@ 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 ) + if "%%a" == "-p" ( set /a EMBEDDED_STORAGE_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") + if %EMBEDDED_STORAGE_INDEX% == !i! (set EMBEDDED_STORAGE="%%a") + set /a i+=1 ) +rem if nacos startup mode is standalone if %MODE% == "standalone" ( - set "JAVA_OPT=%JAVA_OPT% -Xms512m -Xmx512m -Xmn256m" - set "JAVA_OPT=%JAVA_OPT% -Dnacos.standalone=true" -) else ( - if %EMBEDDED_STORAGE% == "embedded" ( - set "JAVA_OPT=%JAVA_OPT% -DembeddedStorage=true" - ) - 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" + echo "nacos is starting with standalone" + set "NACOS_OPTS=-Dnacos.standalone=true" + set "NACOS_JVM_OPTS=-Xms512m -Xmx512m -Xmn256m" ) +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 "JAVA_OPT=%JAVA_OPT% -Dnacos.functionMode=config" + set "NACOS_OPTS=%NACOS_OPTS% -Dnacos.functionMode=config" ) + if %FUNCTION_MODE% == "naming" ( - set "JAVA_OPT=%JAVA_OPT% -Dnacos.functionMode=naming" + set "NACOS_OPTS=%NACOS_OPTS% -Dnacos.functionMode=naming" ) -set "JAVA_OPT=%JAVA_OPT% -Dloader.path=%BASE_DIR%/plugins/health,%BASE_DIR%/plugins/cmdb" +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.additional-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% -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" +set COMMAND="%JAVA%" %NACOS_JVM_OPTS% %NACOS_OPTS% %NACOS_CONFIG_OPTS% %NACOS_LOG4J_OPTS% nacos.nacos %* -call "%JAVA%" %JAVA_OPT% nacos.nacos %* +rem start nacos command +%COMMAND% diff --git a/zlt-register/nacos/bin/startup.sh b/zlt-register/nacos/bin/startup.sh index 52b345c1bc6090deeb9c9450f16e853ec50dfdc9..f16c5e6c7d02ca278126df4ca478b9809d37b650 100644 --- a/zlt-register/nacos/bin/startup.sh +++ b/zlt-register/nacos/bin/startup.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 1999-2018 Alibaba Group Holding Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -78,8 +78,7 @@ done export JAVA_HOME export JAVA="$JAVA_HOME/bin/java" export BASE_DIR=`cd $(dirname $0)/..; pwd` -export DEFAULT_SEARCH_LOCATIONS="classpath:/,classpath:/config/,file:./,file:./config/" -export CUSTOM_SEARCH_LOCATIONS=${DEFAULT_SEARCH_LOCATIONS},file:${BASE_DIR}/conf/ +export CUSTOM_SEARCH_LOCATIONS=file:${BASE_DIR}/conf/ #=========================================================================================== # JVM Configuration @@ -117,7 +116,7 @@ JAVA_OPT="${JAVA_OPT} -Dloader.path=${BASE_DIR}/plugins/health,${BASE_DIR}/plugi 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}" -JAVA_OPT="${JAVA_OPT} --spring.config.location=${CUSTOM_SEARCH_LOCATIONS}" +JAVA_OPT="${JAVA_OPT} --spring.config.additional-location=${CUSTOM_SEARCH_LOCATIONS}" JAVA_OPT="${JAVA_OPT} --logging.config=${BASE_DIR}/conf/nacos-logback.xml" JAVA_OPT="${JAVA_OPT} --server.max-http-header-size=524288" diff --git a/zlt-register/nacos/conf/1.4.0-ipv6_support-update.sql b/zlt-register/nacos/conf/1.4.0-ipv6_support-update.sql new file mode 100644 index 0000000000000000000000000000000000000000..f480147afa107f0d628acd6fc0840367f0b4fb30 --- /dev/null +++ b/zlt-register/nacos/conf/1.4.0-ipv6_support-update.sql @@ -0,0 +1,27 @@ +/* + * 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. + */ + +ALTER TABLE `config_info_tag` +MODIFY COLUMN `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'source ip' AFTER `src_user`; + +ALTER TABLE `his_config_info` +MODIFY COLUMN `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL AFTER `src_user`; + +ALTER TABLE `config_info` +MODIFY COLUMN `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'source ip' AFTER `src_user`; + +ALTER TABLE `config_info_beta` +MODIFY COLUMN `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'source ip' AFTER `src_user`; \ No newline at end of file diff --git a/zlt-register/nacos/conf/application.properties b/zlt-register/nacos/conf/application.properties index cc660bdd4c49bb60680dc25264a85341c46ee886..ae496acd796992591ecf90cf02149c21fc09c18a 100644 --- a/zlt-register/nacos/conf/application.properties +++ b/zlt-register/nacos/conf/application.properties @@ -37,9 +37,14 @@ server.port=8848 ### 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 +# db.user.0=nacos +# db.password.0=nacos +### Connection pool configuration: hikariCP +db.pool.config.connectionTimeout=30000 +db.pool.config.validationTimeout=10000 +db.pool.config.maximumPoolSize=20 +db.pool.config.minimumIdle=2 #*************** Naming Module Related Configurations ***************# ### Data dispatch task execution period in milliseconds: @@ -98,7 +103,7 @@ management.metrics.export.influx.enabled=false server.tomcat.accesslog.enabled=true ### The access log pattern: -server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i +server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i ### The directory of access log: server.tomcat.basedir= @@ -109,7 +114,7 @@ server.tomcat.basedir= #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/** +nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/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 @@ -126,6 +131,13 @@ nacos.core.auth.default.token.secret.key=SecretKey012345678901234567890123456789 ### 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 +### Since 1.4.1, Turn on/off white auth for user-agent: nacos-server, only for upgrade from old version. +nacos.core.auth.enable.userAgentAuthWhite=true + +### Since 1.4.1, worked when nacos.core.auth.enabled=true and nacos.core.auth.enable.userAgentAuthWhite=false. +### The two properties is the white list for auth and used by identity the request from other server. +nacos.core.auth.server.identity.key= +nacos.core.auth.server.identity.value= #*************** Istio Related Configurations ***************# ### If turn on the MCP server: @@ -148,15 +160,18 @@ nacos.istio.mcp.server.enabled=false ### MemberLookup ### Addressing pattern category, If set, the priority is highest -# nacos.core.member.lookup.type=[file,address-server,discovery] +# nacos.core.member.lookup.type=[file,address-server] ## 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 +## Server domain name address of [address-server] mode +# address.server.domain=jmenv.tbsite.net +## Server port of [address-server] mode +# address.server.port=8080 +## Request address of [address-server] mode +# address.server.url=/nacos/serverlist #*************** JRaft Related Configurations ***************# @@ -164,13 +179,11 @@ nacos.istio.mcp.server.enabled=false # 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 +### raft linear read strategy. Safe linear reads are used by default, that is, the Leader tenure is confirmed by heartbeat # 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 56642f0cadd749f4fc9c821cff04f76cfb59b90d..8e171829e20360caf99fe3b501a67eabee035e1b 100644 --- a/zlt-register/nacos/conf/application.properties.example +++ b/zlt-register/nacos/conf/application.properties.example @@ -29,7 +29,7 @@ server.port=8848 #*************** Config Module Related Configurations ***************# -### If user MySQL as datasource: +### If use MySQL as datasource: # spring.datasource.platform=mysql ### Count of DB: @@ -37,8 +37,8 @@ server.port=8848 ### 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 +# db.user.0=nacos +# db.password.0=nacos #*************** Naming Module Related Configurations ***************# @@ -98,7 +98,7 @@ management.metrics.export.influx.enabled=false server.tomcat.accesslog.enabled=true ### The access log pattern: -server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i +server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i ### The directory of access log: server.tomcat.basedir= @@ -109,7 +109,7 @@ server.tomcat.basedir= #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/** +nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/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 @@ -148,15 +148,18 @@ nacos.istio.mcp.server.enabled=false ### MemberLookup ### Addressing pattern category, If set, the priority is highest -# nacos.core.member.lookup.type=[file,address-server,discovery] +# nacos.core.member.lookup.type=[file,address-server] ## 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 +## Server domain name address of [address-server] mode +# address.server.domain=jmenv.tbsite.net +## Server port of [address-server] mode +# address.server.port=8080 +## Request address of [address-server] mode +# address.server.url=/nacos/serverlist #*************** JRaft Related Configurations ***************# @@ -164,13 +167,11 @@ nacos.istio.mcp.server.enabled=false # 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 +### raft linear read strategy. Safe linear reads are used by default, that is, the Leader tenure is confirmed by heartbeat # 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/nacos-logback.xml b/zlt-register/nacos/conf/nacos-logback.xml index b3b4fa772c31d2aeac32012fc5145269c0ecee7d..289a5905a9a5f07c27ee5b148272c85721b2b40a 100644 --- a/zlt-register/nacos/conf/nacos-logback.xml +++ b/zlt-register/nacos/conf/nacos-logback.xml @@ -614,17 +614,17 @@ - + - + - + diff --git a/zlt-register/nacos/conf/nacos-mysql.sql b/zlt-register/nacos/conf/nacos-mysql.sql index d932c3cea6979da8b55a0091ce988208cb60fd51..551d65987d93ee5918014663caca25e7b33403a9 100644 --- a/zlt-register/nacos/conf/nacos-mysql.sql +++ b/zlt-register/nacos/conf/nacos-mysql.sql @@ -27,7 +27,7 @@ CREATE TABLE `config_info` ( `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', `src_user` text COMMENT 'source user', - `src_ip` varchar(20) DEFAULT NULL COMMENT 'source ip', + `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip', `app_name` varchar(128) DEFAULT NULL, `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', `c_desc` varchar(256) DEFAULT NULL, @@ -72,7 +72,7 @@ CREATE TABLE `config_info_beta` ( `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', `src_user` text COMMENT 'source user', - `src_ip` varchar(20) DEFAULT NULL COMMENT 'source ip', + `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip', `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', PRIMARY KEY (`id`), UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) @@ -94,7 +94,7 @@ CREATE TABLE `config_info_tag` ( `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', `src_user` text COMMENT 'source user', - `src_ip` varchar(20) DEFAULT NULL COMMENT 'source ip', + `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip', PRIMARY KEY (`id`), UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag'; @@ -150,7 +150,7 @@ CREATE TABLE `his_config_info` ( `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `src_user` text, - `src_ip` varchar(20) DEFAULT NULL, + `src_ip` varchar(50) DEFAULT NULL, `op_type` char(10) DEFAULT NULL, `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', PRIMARY KEY (`nid`), diff --git a/zlt-register/nacos/conf/schema.sql b/zlt-register/nacos/conf/schema.sql index fd6bf4708306def3c4dae1ba440eb8981a7eeda0..dfa8d7544af05a7e89b549f49f7cf9597e7fcb38 100644 --- a/zlt-register/nacos/conf/schema.sql +++ b/zlt-register/nacos/conf/schema.sql @@ -27,7 +27,7 @@ CREATE TABLE config_info ( gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', src_user varchar(128) DEFAULT NULL, - src_ip varchar(20) DEFAULT NULL, + src_ip varchar(50) DEFAULT NULL, c_desc varchar(256) DEFAULT NULL, c_use varchar(64) DEFAULT NULL, effect varchar(64) DEFAULT NULL, @@ -52,7 +52,7 @@ CREATE TABLE his_config_info ( gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000', gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000', src_user varchar(128), - src_ip varchar(20) DEFAULT NULL, + src_ip varchar(50) DEFAULT NULL, op_type char(10) DEFAULT NULL, constraint hisconfiginfo_nid_key PRIMARY KEY (nid)); @@ -73,7 +73,7 @@ CREATE TABLE config_info_beta ( gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', src_user varchar(128), - src_ip varchar(20) DEFAULT NULL, + src_ip varchar(50) DEFAULT NULL, constraint configinfobeta_id_key PRIMARY KEY (id), constraint uk_configinfobeta_datagrouptenant UNIQUE (data_id,group_id,tenant_id)); @@ -89,7 +89,7 @@ CREATE TABLE config_info_tag ( gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', src_user varchar(128), - src_ip varchar(20) DEFAULT NULL, + src_ip varchar(50) DEFAULT NULL, constraint configinfotag_id_key PRIMARY KEY (id), constraint uk_configinfotag_datagrouptenanttag UNIQUE (data_id,group_id,tenant_id,tag_id)); @@ -210,3 +210,19 @@ CREATE TABLE permissions ( INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE); INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN'); + + +/******************************************/ +/* ipv6 support */ +/******************************************/ +ALTER TABLE `config_info_tag` +MODIFY COLUMN `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'source ip' AFTER `src_user`; + +ALTER TABLE `his_config_info` +MODIFY COLUMN `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL AFTER `src_user`; + +ALTER TABLE `config_info` +MODIFY COLUMN `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'source ip' AFTER `src_user`; + +ALTER TABLE `config_info_beta` +MODIFY COLUMN `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'source ip' AFTER `src_user`; \ No newline at end of file diff --git a/zlt-register/nacos/target/nacos-server.jar b/zlt-register/nacos/target/nacos-server.jar index 2520bf40395f073111b38fcacc1650f77795173d..af284ce15f648c964f3c680a357cffc75a5597b5 100644 Binary files a/zlt-register/nacos/target/nacos-server.jar and b/zlt-register/nacos/target/nacos-server.jar differ