springboot 3.1.4 集成openjob,无工作节点
Opened this issue · 6 comments
Jinger-Yes commented
System (please complete the following information):
- OS:
linux
[e.g. linux, macOS, windows] - JAVA Version:
17
[e.g.1.13
] - Pkg Version:
1.1.1
[e.g.1.1.1
]
Describe the bug
springboot 3.1.4 集成openjob,无工作节点,server报错
目前发现是未正确读取yml文件造成worker没有初始化
To Reproduce
application.yml 配置文件
spring:
openjob:
enable: true # 是否开启
server:
address: http://192.168.8.133:8080 # Server 集群地址
worker:
heartbeat-interval: 5 # 心跳时间,单位秒
host: 192.168.8.133 # Worker host
port: 25588 # Worker prot
app-name: openjob # 应用名称,必须配置
actor:
heartbeat-num: 1 # 心跳 actor 最大数量
task-master-num: 32 # 任务 Master actor 最大数量
task-container-num: 32 # 任务 Container actor 最大数量
persistent-num: 2 # 持久化 actor 最大数量
delay-master-num: 1 # 延时任务 Master actor 最大数量
delay:
enable: false # 是否开启延时任务
pull-size: 8 # 延时任务拉取数量
pull-sleep: 500L # 延时任务拉取空闲休眠时间,单位毫秒
pull-step: 500L # 延时任务主题空闲休眠步长时间,单位毫秒
timeout: 3000L # 延时任务发送超时时间,单位毫秒
Expected behavior
Additional context
stelin commented
@Jinger-Yes 这个错误是server 节点检查错误,和你说这问题,无关。有其它错误吗
Jinger-Yes commented
@Jinger-Yes 这个错误是server 节点检查错误,和你说这问题,无关。有其它错误吗
希望支持springboot3。
无工作站节点的原因:worker初始化时没有读取到application.yml配置
zjcscut commented
看源码找到原因,原因是部分注解改包名了导致初始化失败,详细见OpenjobWorkerAutoConfiguration,因为SpringBoot3.x中@javax.annotation.PostConstruct包名变更为@jakarta.annotation.PostConstruct。另外还有spring.factories的问题,见我之前写过的一篇文章:https://www.cnblogs.com/throwable/p/16950353.html
zjcscut commented
已经提交PR
Jinger-Yes commented
什么时间更新版本?