-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker启动1.5.1版本提示'io.seata.server.console.service.BranchSessionService' that could not be found #4685
Comments
应该是目录映射有问题,自行进入容器的resources目录下看下application.yml是否存在 |
有的 docker exec -it faafa7153cc0 sh
/seata-server # cd resources/
/seata-server/resources # ls
application.yml |
那就检查nacos的配置,可能是namespace的问题,namespace需要填写的是id,而不是name |
建议先不要把type改成nacos,先试着file能不能跑起来 |
不引用任何外部配置文件直接启动是可以的,我直接把容器里的resources目录复制出来了,然后改了下registry配置和config。但是目前会有mysql8驱动报错。 Caused by: java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:677) 并且如果我删除复制出来的非配置文件内容,又会出现缺少 复制出来的文件列表: fan@k3s-master:~/seata/config$ tree .
.
├── application.example.yml
├── application.yml
├── banner.txt
├── io
│ └── seata
│ └── server
│ ├── auth
│ ├── console
│ │ ├── controller
│ │ ├── impl
│ │ │ ├── db
│ │ │ ├── file
│ │ │ └── redis
│ │ ├── param
│ │ ├── service
│ │ └── vo
│ ├── controller
│ ├── coordinator
│ ├── env
│ ├── event
│ ├── lock
│ │ └── distributed
│ ├── logging
│ │ ├── listener
│ │ └── logback
│ │ └── appender
│ ├── metrics
│ ├── session
│ ├── storage
│ │ ├── db
│ │ │ ├── lock
│ │ │ ├── session
│ │ │ └── store
│ │ ├── file
│ │ │ ├── lock
│ │ │ ├── session
│ │ │ └── store
│ │ └── redis
│ │ ├── lock
│ │ ├── session
│ │ └── store
│ ├── store
│ ├── test
│ └── transaction
│ ├── at
│ ├── saga
│ ├── tcc
│ └── xa
├── logback
│ ├── console-appender.xml
│ ├── file-appender.xml
│ ├── kafka-appender.xml
│ └── logstash-appender.xml
├── logback-spring.xml
├── lua
│ └── redislocker
│ └── redislock.lua
├── META-INF
│ ├── services
│ │ ├── io.seata.core.rpc.RegisterCheckAuthHandler
│ │ ├── io.seata.core.store.db.DataSourceProvider
│ │ ├── io.seata.core.store.DistributedLocker
│ │ ├── io.seata.server.coordinator.AbstractCore
│ │ ├── io.seata.server.lock.LockManager
│ │ └── io.seata.server.session.SessionManager
│ ├── spring-configuration-metadata.json
│ └── spring.factories
├── README.md
└── README-zh.md |
driverclassname改为 com.mysql.jdbc.Driver 先用下,至于你说的删除我不知道你删了哪些内容,理论上有application.yml即可 |
检查一下nacos的配置,我是粗心把store.mode=nacos才出现的这个错误,改成db就可以正常启动了 |
你的目录挂载, |
我也遇到这个问题,通过这个方法解决了 |
解决了我的问题! |
Ⅰ. Issue Description
docker 启动1.5.1版本seata,启动后提示
A component required a bean of type 'io.seata.server.console.service.BranchSessionService' that could not be found.
Ⅱ. Describe what happened
使用
docker run
之后出现如下错误:启动命令:
报错提示:
Ⅲ. Describe what you expected to happen
Seata能够正常启动
Ⅳ. How to reproduce it (as minimally and precisely as possible)
将官网中指定的
seataServer.properties
发布到nacos中,主要修改如下:修改
application.yml
使用docker run启动容器
Ⅴ. Anything else we need to know?
None
Ⅵ. Environment:
The text was updated successfully, but these errors were encountered: