[seata]求助!seata server start error: not found service provider for : io.seata.server.session.SessionManager

2024-05-10 184 views
7

seata server版本1.6.1

启动seata-server时,直接执行seata-server.sh不会有任何错误 如果加上参数,执行seata-server.sh -h xxx.xxx.xxx.xxx -p xxxx -m db,就会报错 A105CDE4-C7D9-4445-8FB4-D8C43FAE3092

配置文件

#  Copyright 1999-2019 Seata.io Group.
#
#  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.

server:
  port: xxx2

spring:
  application:
    name: seata-server

logging:
  config: classpath:logback-spring.xml
  file:
    path: /home/seata/logs
  extend:
    logstash-appender:
      destination: 127.0.0.1:4560
    kafka-appender:
      bootstrap-servers: 127.0.0.1:9092
      topic: logback_to_logstash

console:
  user:
    username: xxxx
    password: xxxx

seata:
  config:
    type: nacos
    nacos:
      server-addr: 127.0.0.1:xxx1
      namespace: public
      group: SEATA_GROUP
      username: xxxx
      password: xxxx
      context-path: /nacos
      data-id: seata-server.properties
  registry:
    type: nacos
    nacos:
      application: seata-server
      server-addr: 127.0.0.1:xxx1
      group: SEATA_GROUP
      namespace: public
      cluster: default
      username: xxxx
      password: xxxx
      context-path: /nacos
  store:
    mode: db
    db:
      datasource: druid
      db-type: mysql
      driver-class-name: com.mysql.cj.jdbc.Driver
      url: jdbc:mysql://xxx.xxx.xxx.xxx:xxxx/xxxx?useUnicode=true&rewriteBatchedStatements=true&serverTimezone=GMT
      user: xxxx
      password: xxxx
      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
  server:
    service-port: xxx3
    undo:
      log-save-days: 7
      log-delete-period: 86400000
  security:
    secretKey: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    tokenValidityInMilliseconds: 1800000
    ignore:
      urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login

回答

7

应该是nacos没配置db相关配置

1

应该是nacos没配置db相关配置

解决了,谢谢老师。 1.但是启动后又开始死循环了,这又是怎么回事?

11:25:08.294  INFO --- [                     main] io.seata.server.ServerApplication        : Starting ServerApplication v1.6.1 using Java 1.8.0_361 on ecs-295233-0001 with PID 31016 (/home/seata/target/seata-server.jar started by root in /home/seata/bin)
11:25:08.298  INFO --- [                     main] io.seata.server.ServerApplication        : No active profile set, falling back to 1 default profile: "default"
11:25:08.339  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:08.367  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:08.368  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:08.541  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:08.575  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:08.576  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:08.737  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:08.767  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:08.768  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:08.937  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:08.968  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:08.968  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:09.138  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:09.168  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:09.169  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:09.337  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:09.368  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:09.369  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:09.474  INFO --- [                     main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8002 (http)
11:25:09.484  INFO --- [                     main] o.a.coyote.http11.Http11NioProtocol      : Initializing ProtocolHandler ["http-nio-8002"]
11:25:09.485  INFO --- [                     main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
11:25:09.485  INFO --- [                     main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.62]
11:25:09.539  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:09.568  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:09.568  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:09.589  INFO --- [                     main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
11:25:09.590  INFO --- [                     main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1247 ms
11:25:09.737  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:09.767  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:09.767  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:09.939  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:09.969  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:09.969  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:10.109  INFO --- [                     main] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page: class path resource [static/index.html]
11:25:10.138  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:10.167  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:10.167  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:10.304  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.
11:25:10.305  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/'] with []
11:25:10.306  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.
11:25:10.306  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.css'] with []
11:25:10.306  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.
11:25:10.306  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.js'] with []
11:25:10.306  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.
11:25:10.306  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.html'] with []
11:25:10.306  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.
11:25:10.306  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.map'] with []
11:25:10.306  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.
11:25:10.306  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.svg'] with []
11:25:10.306  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.
11:25:10.306  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.png'] with []
11:25:10.307  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.
11:25:10.307  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/**/*.ico'] with []
11:25:10.307  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.
11:25:10.307  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/console-fe/public/**'] with []
11:25:10.307  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.
11:25:10.307  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Ant [pattern='/api/v1/auth/login'] with []
11:25:10.332  INFO --- [                     main] o.s.s.web.DefaultSecurityFilterChain     : Will not secure any request
11:25:10.344  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:10.367  INFO --- [                     main] o.a.coyote.http11.Http11NioProtocol      : Starting ProtocolHandler ["http-nio-8002"]
11:25:10.375  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:10.375  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:10.390  INFO --- [                     main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8002 (http) with context path ''
11:25:10.399  INFO --- [                     main] io.seata.server.ServerApplication        : Started ServerApplication in 3.329 seconds (JVM running for 3.901)
11:25:10.537  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:10.568  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:10.568  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:10.738  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:10.767  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:10.767  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:10.935  INFO --- [                     main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} inited
11:25:10.937  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties
11:25:10.967  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [polling-resp] config changed. dataId=seata-server.properties, group=SEATA_GROUP, tenant=public
11:25:10.967  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : get changedGroupKeys:[seata-server.properties+SEATA_GROUP+public]
11:25:10.967  INFO --- [                     main] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [subscribe] store.db.distributedLockTable+SEATA_GROUP+public
11:25:10.967  INFO --- [                     main] c.a.nacos.client.config.impl.CacheData   : [fixed-127.0.0.1_8001-public] [add-listener] ok, tenant=public, dataId=store.db.distributedLockTable, group=SEATA_GROUP, cnt=1
11:25:10.967  INFO --- [                     main] c.a.nacos.client.config.impl.CacheData   : [fixed-127.0.0.1_8001-public] [add-listener] ok, tenant=public, dataId=store.db.distributedLockTable, group=SEATA_GROUP, cnt=2
11:25:10.967 ERROR --- [                     main] i.s.s.s.d.l.DataBaseDistributedLocker    : The distribute lock table is not config, please create the target table and config it
11:25:11.078  INFO --- [                     main] i.s.core.rpc.netty.NettyServerBootstrap  : Server started, service listen port: 8003
11:25:11.137  INFO --- [xed-127.0.0.1_8001-public] c.a.n.client.config.impl.ClientWorker    : [fixed-127.0.0.1_8001-public] [data-received] dataId=seata-server.properties, group=SEATA_GROUP, tenant=public, md5=97fa5421a17f8200bbd7f828c0716fb7, content=store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj...., type=properties

2.为什么在application.yml里配置过一遍数据库连接,在nacos-seata-server里还需要配置一遍?它们各自的作用是什么?

3

1.不是死循环,这个是nacos某个版本client的bug,只是日志而已,你可以升级一下解决

  1. @slievrly
6

nacos-seata-server

What is the specific meaning of "nacos-seata-server?"