Spring Cloud Alibaba Seata(一)

news2024/9/24 15:29:14

目录

一、Seata

1、分布式事务简介

1.1、分布式事务理论

1.2、分布式事务解决方案

2、Seata简介

3、Seata安装


一、Seata

1、分布式事务简介

基础概念:事务ACID

A(Atomic):原子性,构成事务的所有操作,要么都执行完成,要么全部不执行,不可能出现部分成功部分失 败的情况。
C(Consistency):一致性,在事务执行前后,数据库的一致性约束没有被破坏。比如:张三向李四转100元, 转账前和转账后的数据是正确状态这叫一致性,如果出现张三转出100元,李四账户没有增加100元这就出现了数 据错误,就没有达到一致性。
I(Isolation):隔离性,数据库中的事务一般都是并发的,隔离性是指并发的两个事务的执行互不干扰,一个事 务不能看到其他事务运行过程的中间状态。通过配置事务隔离级别可以避脏读、重复读等问题。
D(Durability):持久性,事务完成之后,该事务对数据的更改会被持久化到数据库,且不会被回滚。

事务

        本地事务:同一数据库和服务器,称为本地事务。在计算机系统中,更多的是通过关系型数据库来控制事务,这是利用数据库本身的事务特性来实现的,因此叫数据库事务,由于应用主要靠关系数据库来控制事务,而数据库通常和应用在同一个服务器,所以基于关系型数据库的事务又被称为本地事务。
        分布式事务:分布式事务指事务的参与者、支持事务的服务器、资源服务器以及事务管理器分别位于不同的分布式系统的不同节点之上,且属于不同的应用,分布式事务需要保证这些操作要么全部成功,要么全部失败。本质上来说,分布式事务就是为了保证不同数据库的数据一致性。
        举例:分布式系统会把一个应用系统拆分为可独立部署的多个服务,因此需要服务与服务之间远程协作才能完成事务操 作,这种分布式系统环境下由不同的服务之间通过网络远程协作完成事务称之为分布式事务,例如用户注册送积分事务、创建订单减库存事务,银行转账事务等都是分布式事务。

分布式之前:从1:1 --> 1:N --> N: N

只要涉及到操作多个数据源,就可能会产生事务问题,当然在实际开发中我们要尽量避免这种问题的出现,当然如果避免不了,我们就需要进行解决,在我们的微服务系统架构中,目前比较好,比较常用的解决方案就是Seata。

1.1、分布式事务理论

随着互联化的蔓延,各种项目都逐渐向分布式服务做转换。如今微服务已经普遍存在,本地事务已经无法满足分布式的要求,由此分布式事务问题诞生。 分布式事务被称为世界性的难题,目前分布式事务存在两大理论依据:CAP定律 BASE理论。

CAP定律

CAP定理的内容是指的是在一个分布式系统中、Consistency(一致性)、 Availability(可用性)、Partition tolerance(分区容错性),三者不可兼得。

  • 一致性(C):在分布式系统中的所有数据备份,在同一时刻是否同样的值。(等同于所有节点访问同一份最新的数据副本)
  • 可用性(A):在集群中一部分节点故障后,集群整体是否还能响应客户端的读写请求。(对数据更新具备高可用性)
  • 分区容错性(P):以实际效果而言,分区相当于对通信的时限要求。系统如果不能在时限内达成数据一致性,就意味着发生了分区的情况,必须就当前操作在C和A之间做出选择

1. 当库存服务减库存以后,那么需要将数据同步到其他的服务上,这是为了保证数据一致性C,但是网络是不可靠的,所以我们系统就需要保证分区容错性P,也就是我们必须容忍网络所带来的一些问题,此时如果我们想保证C那么就需要舍弃A,也就是说我们在保证C的情况下,就必须舍弃A,也就是CP无法保证高可用。
2. 如果为了保证A,高可用的情况下,也就是必须在限定时间内给出响应,同样由于网络不可靠P,订单服务就有可能无法拿到新的数据,但是也要给用户作出响应,那么也就无法保证C一致性。所以AP是无法保证强一致性的。
3. 如果我们想保证CA,也就是高可用和一致性,也就是必须保证网络良好才能实现,那么也就是说我们需要将库存、订单、用户放到一起,但是这种情况也就丧失了P这个保证,这个时候系统也就不是分布式系统了
4. 总结:在分布式系统中,p是必然的存在的,所以我们只能在C和A之间进行取舍,在这种条件下就诞生了BASE理论。

BASE理论

BASE是Basically Available(基本可用)、Soft state(软状态)和 Eventually consistent(最终一致性)三个短语的缩写。BASE理论是对CAP中一致性和可用性权衡的结果,其来源于对大规模互联网系统分布式实践的总结, 是基于CAP定理逐步演化而来的。BASE理论的核心思想是:即使无法做到强一致性,但每个应用都可以根据自身业务特点,采用适当的方式来使系统达到最终一致性。

        基本可用是指分布式系统在出现不可预知故障的时候,允许损失部分可用性—-注意,这绝不等价于系统不可用。比如:

  1. 响应时间上的损失。正常情况下,一个在线搜索引擎需要在0.5秒之内返回给用户相应的查询结果,但由于出现故障,查询结果的响应时间增加了1~2秒
  2. 系统功能上的损失:正常情况下,在一个电子商务网站上进行购物的时候,消费者几乎能够顺利完成每一笔订单,但是在一些节日大促购物高峰的时候,由于消费者的购物行为激增,为了保护购物系统的稳定性,部分消费者可能会被引导到一个降级页面

        软状态指允许系统中的数据存在中间状态,并认为该中间状态的存在不会影响系统的整体可用性,即允许系统在不同节点的数据副本之间进行数据同步的过程存在延时
        最终一致性强调的是所有的数据副本,在经过一段时间的同步之后,最终都能够达到一个一致的状态。因此,最终一致性的本质是需要系统保证最终数据能够达到一致,而不需要实时保证系统数据的强一致性。

例:

基本可用:保证核心服务是可以使用的,至于其他的服务可以适当的降低响应时间,甚至是服务降级

软状态:存在中间状态,不影响整体系统使用,数据同步存在延时

最终一致性:再过了流量高峰期以后,经过一段时间的同步,保持各服务数据的一致

 

1.2、分布式事务解决方案

2PC即两阶段提交协议,是将整个事务流程分为两个阶段,P是指准备阶段,C是指提交阶段。

1、准备阶段(Prepare phase)2、提交阶段(commit phase)

例:

2人去吃饭AA制,只有2人都付钱才能坐下吃饭,只要有1人不付钱,就不能落座吃饭。

准备阶段:老板要求A1付款,A1付款。老板要求A2付款,A2付款

提交阶段:老板出餐,两人落座吃饭

此例子就形成了一个事务,只要有1人拒绝付款,那么老板就不会出餐,并且把已收的钱原路退回。

整个事务过程是由事务管理器和参与者组成的,店老板就是事务管管理器,2个人就是参与者,事务管理器决策整个分布式事务在计算机中关系数据库支持的两阶段提交协议:

  • 准备阶段(Prepare phase):事务管理器给每个参与者发送Prepare消息,每个数据库参与者在本地执行事务,并写本地的Undo/Redo日志,此时事务没有提交。
  • (Undo日志是记录修改前的数据,用于数据库回滚,Redo日志是记录修改后的数据,用于提交事务后写入数据文件)
  • 提交阶段(commit phase):如果事务管理器收到了参与者的执行失败或者超时消息时,直接给每个参与者发送回滚(Rollback)消息;否则,发送提交(Commit)消息;参与者根据事务管理器的指令执行提交或者回滚操作,并释放事务处理过程中使用的资源。

成功

 失败

2、Seata简介

Seata 是一款开源的分布式事务解决方案,致力于提供高性能和简单易用的分布式事务服务。Seata 将为用户提供了 AT、TCC、SAGA 和 XA 事务模式,为用户打造一站式的分布式解决方案。

Seata官网

在我们的微服务系统中,对应业务被对应的拆分成独立模块,在官方提供的架构图中,我们可以看出当前是三个服务:

  • 仓储服务:对给定的商品进行增删操作记录数量
  • 订单服务:根据采购者的需求创建订单
  • 账户服务:从用户账户中扣除余额、积分等

在这套架构中,用户下单购买商品的业务,就需要三个服务来完成,每个服务内部的数据一致性由本地事务来保证,但是全局的数据一致性问题就没办法保证,Seata就是来进行解决这种问题的解决方案。

Seata术语

TC (Transaction Coordinator) - 事务协调者:维护全局和分支事务的状态,驱动全局事务提交或回滚。
TM (Transaction Manager) - 事务管理器:定义全局事务的范围:开始全局事务、提交或回滚全局事务。
RM (Resource Manager) - 资源管理器:管理分支事务处理的资源,与TC交谈以注册分支事务和报告分支事务的状态,并驱动分支事务提交或回滚。

3、Seata安装

Seata下载

Seata-Server下载

seata-server-1.6.1.zip 下载完成之后需要解压

1、需要打开conf目录,参照application.example.yml,先配置application.yml(registry.conf1.4.2版本)配置文件,修改Seata的注册中心和配置中心为nacos

seata:
  config:
    # support: nacos 、 consul 、 apollo 、 zk  、 etcd3
    type: nacos
    nacos:
      server-addr: 127.0.0.1:8848
      group : "SEATA_GROUP"
      namespace: "50aa0147-a0c3-4b89-ab70-d60d2370e674"
      username: "nacos"
      password: "nacos"
      context-path:
      data-id: "seataServer.properties"
  registry:
    # support: nacos 、 eureka 、 redis 、 zk  、 consul 、 etcd3 、 sofa
    type: nacos
    preferred-networks: 30.240.*
    nacos:
      application: seata-server
      server-addr: 127.0.0.1:8848
      group : "SEATA_GROUP"
      namespace: "50aa0147-a0c3-4b89-ab70-d60d2370e674"
      cluster: default
      username: "nacos"
      password: "nacos"
      context-path:

2、修改Seata的存储模式store为db(file.conf1.4.2版本),修改jdbc

  store:
    # support: file 、 db 、 redis
    mode: db
    session:
      mode: db
    lock:
      mode: db
    db:
      datasource: druid
      db-type: mysql
      driver-class-name: com.mysql.jdbc.Driver
      url: jdbc:mysql://127.0.0.1:3306/seata?rewriteBatchedStatements=true
      user: root
      password: root
      min-conn: 10
      max-conn: 100
      global-table: global_table
      branch-table: branch_table
      lock-table: lock_table
      distributed-lock-table: distributed_lock
      query-limit: 1000
      max-wait: 5000

3、seata\script\server\db\mysql.sql数据库刷到库中

seata官网文档快速启动新增undo表

SEATA AT 模式需要 UNDO_LOG 表

-- 注意此处0.3.0+ 增加唯一索引 ux_undo_log
CREATE TABLE `undo_log` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `branch_id` bigint(20) NOT NULL,
  `xid` varchar(100) NOT NULL,
  `context` varchar(128) NOT NULL,
  `rollback_info` longblob NOT NULL,
  `log_status` int(11) NOT NULL,
  `log_created` datetime NOT NULL,
  `log_modified` datetime NOT NULL,
  `ext` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

4、nacos配置seataServer.properties分组为SEATA_GROUP

此配置位于源代码中seata/script/config-center/config.txt

#For details about configuration items, see https://seata.io/zh-cn/docs/user/configurations.html
#Transport configuration, for client and server
transport.type=TCP
transport.server=NIO
transport.heartbeat=true
transport.enableTmClientBatchSendRequest=false
transport.enableRmClientBatchSendRequest=true
transport.enableTcServerBatchSendResponse=false
transport.rpcRmRequestTimeout=30000
transport.rpcTmRequestTimeout=30000
transport.rpcTcRequestTimeout=30000
transport.threadFactory.bossThreadPrefix=NettyBoss
transport.threadFactory.workerThreadPrefix=NettyServerNIOWorker
transport.threadFactory.serverExecutorThreadPrefix=NettyServerBizHandler
transport.threadFactory.shareBossWorker=false
transport.threadFactory.clientSelectorThreadPrefix=NettyClientSelector
transport.threadFactory.clientSelectorThreadSize=1
transport.threadFactory.clientWorkerThreadPrefix=NettyClientWorkerThread
transport.threadFactory.bossThreadSize=1
transport.threadFactory.workerThreadSize=default
transport.shutdown.wait=3
transport.serialization=seata
transport.compressor=none

#Transaction routing rules configuration, only for the client
service.vgroupMapping.default_tx_group=default # 事务分组
#If you use a registry, you can ignore it
service.default.grouplist=127.0.0.1:8091
service.enableDegrade=false
service.disableGlobalTransaction=false

#Transaction rule configuration, only for the client
client.rm.asyncCommitBufferLimit=10000
client.rm.lock.retryInterval=10
client.rm.lock.retryTimes=30
client.rm.lock.retryPolicyBranchRollbackOnConflict=true
client.rm.reportRetryCount=5
client.rm.tableMetaCheckEnable=true
client.rm.tableMetaCheckerInterval=60000
client.rm.sqlParserType=druid
client.rm.reportSuccessEnable=false
client.rm.sagaBranchRegisterEnable=false
client.rm.sagaJsonParser=fastjson
client.rm.tccActionInterceptorOrder=-2147482648
client.tm.commitRetryCount=5
client.tm.rollbackRetryCount=5
client.tm.defaultGlobalTransactionTimeout=60000
client.tm.degradeCheck=false
client.tm.degradeCheckAllowTimes=10
client.tm.degradeCheckPeriod=2000
client.tm.interceptorOrder=-2147482648
client.undo.dataValidation=true
client.undo.logSerialization=jackson
client.undo.onlyCareUpdateColumns=true
server.undo.logSaveDays=7
server.undo.logDeletePeriod=86400000
client.undo.logTable=undo_log
client.undo.compress.enable=true
client.undo.compress.type=zip
client.undo.compress.threshold=64k
#For TCC transaction mode
tcc.fence.logTableName=tcc_fence_log
tcc.fence.cleanPeriod=1h
# You can choose from the following options: fastjson, jackson, gson
tcc.contextJsonParserType=fastjson

#Log rule configuration, for client and server
log.exceptionRate=100

#Transaction storage configuration, only for the server. The file, db, and redis configuration values are optional.
store.mode=file
store.lock.mode=file
store.session.mode=file
#Used for password encryption
store.publicKey=

#If `store.mode,store.lock.mode,store.session.mode` are not equal to `file`, you can remove the configuration block.
store.file.dir=file_store/data
store.file.maxBranchSessionSize=16384
store.file.maxGlobalSessionSize=512
store.file.fileWriteBufferCacheSize=16384
store.file.flushDiskMode=async
store.file.sessionReloadReadSize=100

#-----------修改这个区域的JDBC连接-----------   
#These configurations are required if the `store mode` is `db`. If `store.mode,store.lock.mode,store.session.mode` are not equal to `db`, you can remove the configuration block.
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.jdbc.Driver
store.db.url=jdbc:mysql://127.0.0.1:3306/seata?useUnicode=true&rewriteBatchedStatements=true
store.db.user=root
store.db.password=root
store.db.minConn=5
store.db.maxConn=30
store.db.globalTable=global_table
store.db.branchTable=branch_table
store.db.distributedLockTable=distributed_lock
store.db.queryLimit=100
store.db.lockTable=lock_table
store.db.maxWait=5000

#These configurations are required if the `store mode` is `redis`. If `store.mode,store.lock.mode,store.session.mode` are not equal to `redis`, you can remove the configuration block.
store.redis.mode=single
store.redis.type=pipeline
store.redis.single.host=127.0.0.1
store.redis.single.port=6379
store.redis.sentinel.masterName=
store.redis.sentinel.sentinelHosts=
store.redis.maxConn=10
store.redis.minConn=1
store.redis.maxTotal=100
store.redis.database=0
store.redis.password=
store.redis.queryLimit=100

#Transaction rule configuration, only for the server
server.recovery.committingRetryPeriod=1000
server.recovery.asynCommittingRetryPeriod=1000
server.recovery.rollbackingRetryPeriod=1000
server.recovery.timeoutRetryPeriod=1000
server.maxCommitRetryTimeout=-1
server.maxRollbackRetryTimeout=-1
server.rollbackRetryTimeoutUnlockEnable=false
server.distributedLockExpireTime=10000
server.xaerNotaRetryTimeout=60000
server.session.branchAsyncQueueSize=5000
server.session.enableBranchAsyncRemove=false
server.enableParallelRequestHandle=true
server.enableParallelHandleBranch=false

#Metrics configuration, only for the server
metrics.enabled=false
metrics.registryType=compact
metrics.exporterList=prometheus
metrics.exporterPrometheusPort=9898

5、启动bin/seata-server.bat出现闪退,但是log中报GC错误,最后启动截屏定位问题。

报不能解析'console.user.username'

不能解析''seata.security.secretKey'

错误原因:参照application.example.yml把application.yml中的参数覆盖掉了,保证如下信息存在

console:
  user:
    username: seata
    password: seata

seata:
  security:
    secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
    tokenValidityInMilliseconds: 1800000
    ignore:
      urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login

6、启动bin/seata-server.bat

Active code page: 65001
"D:\seata-server-1.6.1\seata/logs"
"apm-skywalking not enabled"
[[ [ [ [
XTTTTaXTTTTaXTT[^TTXTTaXTT[
[[  U   U   U
^TTTTUXTTa  XTTU   U   XTTU
U[U  U   U   U  U
^TTTTTTa^TTTTTTa^Ta  ^Ta   ^Ta   ^Ta  ^Ta


00:49:49.835  INFO --- [                     main] io.seata.server.ServerApplication        : Starting ServerApplication v1.6.1 using Java 1.8.0_202 on MS-DUDTFEVNDKRF with PID 17844 (D:\seata-server-1.6.1\seata\target\seata-server.jar started by Administrator in D:\seata-server-1.6.1\seata\bin)
00:49:49.841  INFO --- [                     main] io.seata.server.ServerApplication        : No active profile set, falling back to 1 default profile: "default"
00:49:51.657  INFO --- [                     main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 7091 (http)
00:49:51.674  INFO --- [                     main] o.a.coyote.http11.Http11NioProtocol      : Initializing ProtocolHandler ["http-nio-7091"]
00:49:51.675  INFO --- [                     main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
00:49:51.675  INFO --- [                     main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.62]
00:49:51.920  INFO --- [                     main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
00:49:51.920  INFO --- [                     main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2023 ms
00:49:52.736  INFO --- [                     main] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page: class path resource [static/index.html]
00:49:53.051  WARN --- [                     main] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
00:49:53.055  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/'] with []
00:49:53.056  WARN --- [                     main] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/**/*.css']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
00:49:53.058  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.css'] with []
00:49:53.059  WARN --- [                     main] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/**/*.js']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
00:49:53.059  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.js'] with []
00:49:53.060  WARN --- [                     main] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/**/*.html']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
00:49:53.061  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.html'] with []
00:49:53.061  WARN --- [                     main] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/**/*.map']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
00:49:53.062  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.map'] with []
00:49:53.063  WARN --- [                     main] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/**/*.svg']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
00:49:53.064  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.svg'] with []
00:49:53.064  WARN --- [                     main] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/**/*.png']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
00:49:53.065  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.png'] with []
00:49:53.066  WARN --- [                     main] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/**/*.ico']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
00:49:53.067  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.ico'] with []
00:49:53.067  WARN --- [                     main] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/console-fe/public/**']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
00:49:53.068  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/console-fe/public/**'] with []
00:49:53.068  WARN --- [                     main] o.s.s.c.a.web.builders.WebSecurity       : You are asking Spring Security to ignore Ant [pattern='/api/v1/auth/login']. This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
00:49:53.069  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/api/v1/auth/login'] with []
00:49:53.129  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will not secure any request
00:49:53.191  INFO --- [                     main] o.a.coyote.http11.Http11NioProtocol      : Starting ProtocolHandler ["http-nio-7091"]
00:49:53.236  INFO --- [                     main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 7091 (http) with context path ''
00:49:53.257  INFO --- [                     main] io.seata.server.ServerApplication        : Started ServerApplication in 8.398 seconds (JVM running for 9.397)
00:49:56.476  INFO --- [                     main] i.s.core.rpc.netty.NettyServerBootstrap  : Server started, service listen port: 8091
00:49:56.504  INFO --- [                     main] com.alibaba.nacos.client.naming          : initializer namespace from System Property :null
00:49:57.080  INFO --- [                     main] com.alibaba.nacos.client.naming          : [BEAT] adding beat: BeatInfo{port=8091, ip='192.168.0.172', weight=1.0, serviceName='SEATA_GROUP@@seata-server', cluster='default', metadata={}, scheduled=false, period=5000, stopped=false} to beat map.
00:49:57.082  INFO --- [                     main] com.alibaba.nacos.client.naming          : [REGISTER-SERVICE] 50aa0147-a0c3-4b89-ab70-d60d2370e674 registering service SEATA_GROUP@@seata-server with instance: Instance{instanceId='null', ip='192.168.0.172', port=8091, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='default', serviceName='null', metadata={}}
00:49:57.225  INFO --- [                     main] io.seata.server.ServerRunner             : seata server started in 3965 millSeconds

nacos服务列表中可以看到服务

是日已过,命亦随减;如少水鱼,斯有何乐;当勤精进,如救头燃;但念无常,慎勿放逸;

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/672610.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

L0到L4级别下的泊车功能设计详解(上)

摘要: 乘用车自动驾驶/辅助驾驶按场景分主要包括城区场景、高速场景和泊车场景。 媳妇和我工作地点一南一北,工作地点公共交通又都不方便,在只有一辆车的背景下,我是早送仙女晚接美人,毫无怨言。但看到今年新车层出不…

Kali Linux 2023.2为Xfce版带来PipeWire支持

Kali Linux 2023.2为Xfce版带来PipeWire支持,彻底改造i3桌面,这个版本还引入了一个新的Hyper-V VM镜像,以及几个新的黑客工具。 Offensive Security宣布了他们流行的道德黑客和渗透测试GNU/Linux发行版的新版本,带来了新的功能&am…

chatgpt赋能python:Python整人代码:开发有趣的恶作剧工具

Python整人代码:开发有趣的恶作剧工具 Python是一种高级编程语言,它有着众多功能库和API,能够用于各种不同的领域。但是,Python也可以用来编写有趣的恶作剧代码,搞乐一下!在这篇文章中,我们将介…

通过使用SpringBoot与ElementUI来实现数据的分页功能

背景 分页: 如果一次性的查询全部数据, 响应时间就太长了, 使得浏览器, java虚拟机都有延迟, 用户使用上就会容易出现卡顿:所以就要降低数据库的压力, 使用分页来显示, 一次显示一部分数据 例子: 假设有五条数据, 每一页都显示两条 实现分页要知道: 每页多少条数据当前的页数一…

C++ [STL容器适配器]

本文已收录至《C语言和高级数据结构》专栏! 作者:ARMCSKGT STL容器适配器 前言正文容器适配器stack 栈stack的使用stack模拟实现 queue 队列queue的使用queue模拟实现 priority_queue 优先级队列priority_queue的使用priority_queue模拟实现 deque 双端队…

第二章 VGG网络详解

系列文章目录 第一章 AlexNet网络详解 第二章 VGG网络详解 第三章 GoogLeNet网络详解 第四章 ResNet网络详解 第五章 ResNeXt网络详解 第六章 MobileNetv1网络详解 第七章 MobileNetv2网络详解 第八章 MobileNetv3网络详解 第九章 ShuffleNetv1网络详解 第十章…

Debian12中Grub2识别Windows

背景介绍:windows10 debian11,2023年6月,Debian 12正式版发布了。抵不住Debian12新特性的诱惑,我将Debian11升级至Debian12。升级成功,但Debian12的Grub2无法识别Window10。于是执行如下命令: debian:~# update-grub G…

图片加载错误的捕获及处理

引言 前端开发中,图片是我们在网页中加载最多的静态资源类型之一,但是图片加载过程中也有可能出现加载失败的情况,这是十分影响用户体验的。那么如何正确的判断图片是否成功加载,以及图片加载失败的时候,如何处理&…

了解 Dockerfile 和搭建 Docker 私有仓库:让容器化部署变得更简单

目录 1、Dockerfile 1.1什么是Dockerfile 1.2常用命令 1.3使用脚本创建镜像 2、Docker私有仓库 2.1私有仓库介绍: 2.2私有仓库搭建与配置 2.3上传镜像到私有仓库: 1、Dockerfile 1.1什么是Dockerfile Dockerfile是由一些列命令和参数构成的脚本…

【服务器数据恢复】IBM存储分配的卷无法访问的数据恢复案例

服务器故障: 一台IBM DS存储出现故障,存储分配给aix小机的卷无法访问。从底层查看分配给aix小机的3个卷的lvm信息丢失。 服务器数据恢复过程: 1、将存储中所有磁盘编号后取出,以只读方式做全盘镜像,后续的数据分析和数…

【C++篇】字符串:标准库string类

友情链接:C/C系列系统学习目录 知识总结顺序参考C Primer Plus(第六版)和谭浩强老师的C程序设计(第五版)等,内容以书中为标准,同时参考其它各类书籍以及优质文章,以至减少知识点上的…

Eyeshot 2023 Added NuGet packages.

Added Microsoft Visual Studio 2022 Extensions menu item.Microsoft .NET 6 Windows Toolbox items.Added NuGet packages.Planar curve projection on Sketch plane.Improved fillet surfaces quality and speed.Added ICurve.ConverToLinearPath() family of methods.   …

RabbitMQ学习笔记4(小滴课堂)RabbitMQ工作队列模型实战

Java项目整合RabbitMQ 创建一个maven项目。 然后我们在maven里加上jdk和rabbitmq的依赖设置: 我们写一段生产者的代码: 然后我们去运行它: 可以看到这里有一个队列。 现在我们是可以查看到队列的。 我们去写消费者代码: 这里的之…

LeetCode 2090. K Radius Subarray Averages【前缀和,滑动窗口,数组】中等

本文属于「征服LeetCode」系列文章之一,这一系列正式开始于2021/08/12。由于LeetCode上部分题目有锁,本系列将至少持续到刷完所有无锁题之日为止;由于LeetCode还在不断地创建新题,本系列的终止日期可能是永远。在这一系列刷题文章…

Redis是什么,如何学习,如何整合SpringBoot?

目录 一、Redis是什么? 二、如何学习Redis 三、如何整合SpringBoot 一、Redis是什么? Redis 是一个高性能的开源 NoSQL 数据库,支持多种数据结构,包括字符串、哈希、列表、集合和有序集合等。它采用内存存储,可以快…

Python3 函数与数据结构 | 菜鸟教程(十一)

目录 一、Python3 函数 (一)定义一个函数 1、你可以定义一个由自己想要功能的函数,以下是简单的规则: 2、语法 3、实例 ①让我们使用函数来输出"Hello World!": ②更复杂点的应用&#xff…

axios 发送请求请求头信息不包含Cookie信息

问题 axios 发送请求请求头信息不包含Cookie信息 详细问题 使用VueSpringBoot进行项目开发,axios进行网络请求,发送请求,请求头信息不包含Cookie信息 具体如下 实际效果 预期效果 解决方案 作用域 Vue项目全局配置 打开Vue项目的入口…

SpringSecurity是什么,如何学习SpringSecurity?

目录 一、SpringSecurity是什么 二、如何学习SpringSecurity 三、SpringSecurity整合springboot 一、SpringSecurity是什么 Spring Security是一个功能强大的安全框架,它为企业级应用程序提供了完整的身份验证和授权管理。它是一个开源项目,由Pivota…

Linux:第五章课后习题及答案

第五章 Linux常用命令 Q1:常用的文本内容显示命令有哪些?区别是什么? 文本内容显示的命令有cat,more,less, head,tailcat:显示文本文件, 也可以把几个文件 内容附加到另…

第一章 AlexNet网络详解

系列文章目录 第一章 AlexNet网络详解 第二章 VGG网络详解 第三章 GoogLeNet网络详解 第四章 ResNet网络详解 第五章 ResNeXt网络详解 第六章 MobileNetv1网络详解 第七章 MobileNetv2网络详解 第八章 MobileNetv3网络详解 第九章 ShuffleNetv1网络详解 第十章…