docker 启动1.5.1版本seata,启动后提示 A component required a bean of type 'io.seata.server.console.service.BranchSessionService' that could not be found.
使用docker run
之后出现如下错误:
启动命令:
docker run --name seata-server \
-p 8091:8091 \
-p 7091:7091 \
-v /home/ubuntu/seata/:/seata-server/resources \
seataio/seata-server
报错提示:
seata-server | ***************************
seata-server | APPLICATION FAILED TO START
seata-server | ***************************
seata-server |
seata-server | Description:
seata-server |
seata-server | A component required a bean of type 'io.seata.server.console.service.BranchSessionService' that could not be found.
seata-server |
seata-server |
seata-server | Action:
seata-server |
seata-server | Consider defining a bean of type 'io.seata.server.console.service.BranchSessionService' in your configuration.
seata-server |
seata-server exited with code 1
Seata能够正常启动
-
将官网中指定的
seataServer.properties
发布到nacos中,主要修改如下:store.mode=db store.lock.mode=db store.session.mode=db store.db.datasource=druid store.db.dbType=mysql store.db.driverClassName=com.mysql.cj.jdbc.Driver store.db.url=jdbc:mysql://xxxxxxx:3306/seata?useUnicode=true&rewriteBatchedStatements=true store.db.user=root store.db.password=root
-
修改
application.yml
server: port: 8091 spring: application: name: seata-server logging: # config: classpath:logback-spring.xml file: path: ${user.home}/logs/seata # 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: seata password: seata seata: config: # support: nacos 、 consul 、 apollo 、 zk 、 etcd3 type: nacos nacos: server-addr: nacos:8848 namespace: dev group: SEATA_GROUP username: nacos password: nacos ##if use MSE Nacos with auth, mutex with username/password attribute #access-key: "" #secret-key: "" data-id: seataServer.properties registry: # support: nacos, eureka, redis, zk, consul, etcd3, sofa type: nacos nacos: application: seata-server server-addr: nacos:8848 group: SEATA_GROUP namespace: dev cluster: default username: nacos password: nacos ##if use MSE Nacos with auth, mutex with username/password attribute #access-key: "" #secret-key: "" # server: # service-port: 8091 #If not configured, the default is '${server.port} + 1000' security: secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017 tokenValidityInMilliseconds: 1800000 ignore: urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login
-
使用docker run启动容器
docker run --name seata-server \ -p 8091:8091 \ -p 7091:7091 \ -v /home/ubuntu/seata/:/seata-server/resources \ seataio/seata-server
- JDK version: openjdk 11.0.15 2022-04-19
- Seata version: 15.1
- OS : ubuntu-server22.04LTS
- Others: