Open icodegarden opened 1 day ago
v2.0.0 k8s完全按照官方的配置(镜像版本和nacos地址按实际配置)
apiVersion: apps/v1 kind: Deployment metadata: name: seata-server namespace: default labels: k8s-app: seata-server spec: replicas: 1 selector: matchLabels: k8s-app: seata-server template: metadata: labels: k8s-app: seata-server spec: containers:
apiVersion: v1 kind: ConfigMap metadata: name: seata-server-config data: registry.conf: | registry { type = "nacos" nacos { application = "seata-server" serverAddr = "192.168.199.2" } } config { type = "nacos" nacos { serverAddr = "192.168.199.2" group = "SEATA_GROUP" } }
容器内的log如下,依然还是[mode](mode: file),容器内能看到挂载到了文件
root@seata-server-85889c84b5-ff9cs:/seata-server# cd /root/seata-config root@seata-server-85889c84b5-ff9cs:~/seata-config# ls registry.conf root@seata-server-85889c84b5-ff9cs:~/seata-config# cat registry.conf registry { type = "nacos" nacos { application = "seata-server" serverAddr = "172.22.122.27" namespace = "seata" username = "nacos" password = "otanacos01" } } config { type = "nacos" nacos { serverAddr = "172.22.122.27" namespace = "seata" username = "nacos" password = "otanacos01" data-id = "seata-server" } } root@seata-server-85889c84b5-ff9cs:~/seata-config#
apm-skywalking not enabled JMX disabled Affected JVM parameters: -Dlog.home=/root/logs/seata -server -Dloader.path=/lib -Xmx2048m -Xms2048m -Xss640k -XX:SurvivorRatio=10 -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -XX:MaxDirectMemorySize=1024m -XX:-OmitStackTraceInFastThrow -XX:-UseAdaptiveSizePolicy -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/root/logs/seata/java_heapdump.hprof -XX:+DisableExplicitGC -Xloggc:/root/logs/seata/seata_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -Dio.netty.leakDetectionLevel=advanced -Dapp.name=seata-server -Dapp.pid=1 -Dapp.home=/ -Dbasedir=/ OpenJDK 64-Bit Server VM warning: Cannot open file /root/logs/seata/seata_gc.log due to No such file or directory
███████╗███████╗ █████╗ ████████╗ █████╗ ██╔════╝██╔════╝██╔══██╗╚══██╔══╝██╔══██╗ ███████╗█████╗ ███████║ ██║ ███████║ ╚════██║██╔══╝ ██╔══██║ ██║ ██╔══██║ ███████║███████╗██║ ██║ ██║ ██║ ██║ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
15:42:41.328 INFO --- [ main] [ta.config.ConfigurationFactory] [ load] [] : load Configuration from :Spring Configuration 15:42:41.344 INFO --- [ main] [ta.config.ConfigurationFactory] [ buildConfiguration] [] : load Configuration from :Spring Configuration 15:42:41.751 INFO --- [ main] [seata.server.ServerApplication] [ logStarting] [] : Starting ServerApplication using Java 1.8.0_342 on seata-server-85889c84b5-ff9cs with PID 1 (/seata-server/classes started by root in /seata-server) 15:42:41.752 INFO --- [ main] [seata.server.ServerApplication] [ogStartupProfileInfo] [] : No active profile set, falling back to 1 default profile: "default" 15:42:43.565 INFO --- [ main] [mbedded.tomcat.TomcatWebServer] [ initialize] [] : Tomcat initialized with port(s): 7091 (http) 15:42:43.575 INFO --- [ main] [oyote.http11.Http11NioProtocol] [ log] [] : Initializing ProtocolHandler ["http-nio-7091"] 15:42:43.577 INFO --- [ main] [.catalina.core.StandardService] [ log] [] : Starting service [Tomcat] 15:42:43.578 INFO --- [ main] [e.catalina.core.StandardEngine] [ log] [] : Starting Servlet engine: [Apache Tomcat/9.0.82] 15:42:43.680 INFO --- [ main] [rBase.[Tomcat].[localhost].[/]] [ log] [] : Initializing Spring embedded WebApplicationContext 15:42:43.687 INFO --- [ main] [letWebServerApplicationContext] [ebApplicationContext] [] : Root WebApplicationContext: initialization completed in 1872 ms 15:42:44.629 INFO --- [ main] [vlet.WelcomePageHandlerMapping] [ ] [] : Adding welcome page: class path resource [static/index.html] 15:42:44.939 INFO --- [ main] [oyote.http11.Http11NioProtocol] [ log] [] : Starting ProtocolHandler ["http-nio-7091"] 15:42:44.960 INFO --- [ main] [mbedded.tomcat.TomcatWebServer] [ start] [] : Tomcat started on port(s): 7091 (http) with context path '' 15:42:45.036 INFO --- [ main] [seata.server.ServerApplication] [ logStarted] [] : Started ServerApplication in 4.914 seconds (JVM running for 5.639) 15:42:45.190 INFO --- [ main] [rver.lock.LockerManagerFactory] [ init] [] : use lock store mode: file 15:42:45.196 INFO --- [ main] [a.server.session.SessionHolder] [ init] [] : use session store mode: file 15:42:45.293 INFO --- [ main] [.jraft.util.JRaftServiceLoader] [ newProvider] [] : SPI service [com.alipay.sofa.jraft.rpc.RaftRpcFactory - com.alipay.sofa.jraft.rpc.impl.BoltRaftRpcFactory] loading. Sofa-Middleware-Log SLF4J : Actual binding is of type [ com.alipay.remoting Logback ] 15:42:45.380 INFO --- [ main] [com.alipay.sofa.common.log ] [ report] [] : Sofa-Middleware-Log SLF4J : Actual binding is of type [ com.alipay.remoting Logback ] 15:42:45.610 INFO --- [ main] [rpc.netty.NettyServerBootstrap] [ start] [] : Server started, service listen port: 8091 15:42:45.626 INFO --- [ main] [io.seata.server.ServerRunner ] [ run] [] : you can visit seata console UI on http://127.0.0.1:7091. log path: /root/logs/seata. 15:42:45.626 INFO --- [ main] [io.seata.server.ServerRunner ] [ run] [] : seata server started in 587 millSeconds
Are you referring to lock store mode? If you want to change its configuration, you need to refer to this link https://seata.apache.org/docs/user/configurations/#server-%E7%AB%AF, search for 'store.lock.mode'.
v2.0.0 k8s完全按照官方的配置(镜像版本和nacos地址按实际配置)
apiVersion: apps/v1 kind: Deployment metadata: name: seata-server namespace: default labels: k8s-app: seata-server spec: replicas: 1 selector: matchLabels: k8s-app: seata-server template: metadata: labels: k8s-app: seata-server spec: containers:
apiVersion: v1 kind: ConfigMap metadata: name: seata-server-config data: registry.conf: | registry { type = "nacos" nacos { application = "seata-server" serverAddr = "192.168.199.2" } } config { type = "nacos" nacos { serverAddr = "192.168.199.2" group = "SEATA_GROUP" } }
容器内的log如下,依然还是[mode](mode: file),容器内能看到挂载到了文件
root@seata-server-85889c84b5-ff9cs:/seata-server# cd /root/seata-config root@seata-server-85889c84b5-ff9cs:~/seata-config# ls registry.conf root@seata-server-85889c84b5-ff9cs:~/seata-config# cat registry.conf registry { type = "nacos" nacos { application = "seata-server" serverAddr = "172.22.122.27" namespace = "seata" username = "nacos" password = "otanacos01" } } config { type = "nacos" nacos { serverAddr = "172.22.122.27" namespace = "seata" username = "nacos" password = "otanacos01" data-id = "seata-server"
} } root@seata-server-85889c84b5-ff9cs:~/seata-config#
apm-skywalking not enabled JMX disabled Affected JVM parameters: -Dlog.home=/root/logs/seata -server -Dloader.path=/lib -Xmx2048m -Xms2048m -Xss640k -XX:SurvivorRatio=10 -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -XX:MaxDirectMemorySize=1024m -XX:-OmitStackTraceInFastThrow -XX:-UseAdaptiveSizePolicy -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/root/logs/seata/java_heapdump.hprof -XX:+DisableExplicitGC -Xloggc:/root/logs/seata/seata_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -Dio.netty.leakDetectionLevel=advanced -Dapp.name=seata-server -Dapp.pid=1 -Dapp.home=/ -Dbasedir=/ OpenJDK 64-Bit Server VM warning: Cannot open file /root/logs/seata/seata_gc.log due to No such file or directory
███████╗███████╗ █████╗ ████████╗ █████╗ ██╔════╝██╔════╝██╔══██╗╚══██╔══╝██╔══██╗ ███████╗█████╗ ███████║ ██║ ███████║ ╚════██║██╔══╝ ██╔══██║ ██║ ██╔══██║ ███████║███████╗██║ ██║ ██║ ██║ ██║ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
15:42:41.328 INFO --- [ main] [ta.config.ConfigurationFactory] [ load] [] : load Configuration from :Spring Configuration 15:42:41.344 INFO --- [ main] [ta.config.ConfigurationFactory] [ buildConfiguration] [] : load Configuration from :Spring Configuration 15:42:41.751 INFO --- [ main] [seata.server.ServerApplication] [ logStarting] [] : Starting ServerApplication using Java 1.8.0_342 on seata-server-85889c84b5-ff9cs with PID 1 (/seata-server/classes started by root in /seata-server) 15:42:41.752 INFO --- [ main] [seata.server.ServerApplication] [ogStartupProfileInfo] [] : No active profile set, falling back to 1 default profile: "default" 15:42:43.565 INFO --- [ main] [mbedded.tomcat.TomcatWebServer] [ initialize] [] : Tomcat initialized with port(s): 7091 (http) 15:42:43.575 INFO --- [ main] [oyote.http11.Http11NioProtocol] [ log] [] : Initializing ProtocolHandler ["http-nio-7091"] 15:42:43.577 INFO --- [ main] [.catalina.core.StandardService] [ log] [] : Starting service [Tomcat] 15:42:43.578 INFO --- [ main] [e.catalina.core.StandardEngine] [ log] [] : Starting Servlet engine: [Apache Tomcat/9.0.82] 15:42:43.680 INFO --- [ main] [rBase.[Tomcat].[localhost].[/]] [ log] [] : Initializing Spring embedded WebApplicationContext 15:42:43.687 INFO --- [ main] [letWebServerApplicationContext] [ebApplicationContext] [] : Root WebApplicationContext: initialization completed in 1872 ms 15:42:44.629 INFO --- [ main] [vlet.WelcomePageHandlerMapping] [] [] : Adding welcome page: class path resource [static/index.html]
15:42:44.939 INFO --- [ main] [oyote.http11.Http11NioProtocol] [ log] [] : Starting ProtocolHandler ["http-nio-7091"]
15:42:44.960 INFO --- [ main] [mbedded.tomcat.TomcatWebServer] [ start] [] : Tomcat started on port(s): 7091 (http) with context path ''
15:42:45.036 INFO --- [ main] [seata.server.ServerApplication] [ logStarted] [] : Started ServerApplication in 4.914 seconds (JVM running for 5.639)
15:42:45.190 INFO --- [ main] [rver.lock.LockerManagerFactory] [ init] [] : use lock store mode: file
15:42:45.196 INFO --- [ main] [a.server.session.SessionHolder] [ init] [] : use session store mode: file
15:42:45.293 INFO --- [ main] [.jraft.util.JRaftServiceLoader] [ newProvider] [] : SPI service [com.alipay.sofa.jraft.rpc.RaftRpcFactory - com.alipay.sofa.jraft.rpc.impl.BoltRaftRpcFactory] loading.
Sofa-Middleware-Log SLF4J : Actual binding is of type [ com.alipay.remoting Logback ]
15:42:45.380 INFO --- [ main] [com.alipay.sofa.common.log ] [ report] [] : Sofa-Middleware-Log SLF4J : Actual binding is of type [ com.alipay.remoting Logback ]
15:42:45.610 INFO --- [ main] [rpc.netty.NettyServerBootstrap] [ start] [] : Server started, service listen port: 8091
15:42:45.626 INFO --- [ main] [io.seata.server.ServerRunner ] [ run] [] :
you can visit seata console UI on http://127.0.0.1:7091.
log path: /root/logs/seata.
15:42:45.626 INFO --- [ main] [io.seata.server.ServerRunner ] [ run] [] : seata server started in 587 millSeconds