Closed dislazy closed 1 year ago
java.lang.NullPointerException这是Java抛出来的异常。
看起来是pyxxl执行完任务,回调xxl-job的时候对方的接口报错了,需要看下xxl-job的日志
下面的是xxl-job的日志,我们使用的xxl-job的版本是2.20
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
14:51:01.027 logback [http-nio-8002-exec-17] ERROR c.x.j.a.c.r.WebExceptionResolver - WebExceptionResolver:{}
好的,我试试看
修改了之后,python就不会注册到xxl-job了 很可能是 api在最新版本有改动
2023-10-12 15:19:59.455 [MainThread] [NotInTask] WARNING /usr/local/lib/python3.9/site-packages/pyxxl/main.py(_register_task:68) - Register task is exit.
好吧,我搞个2.2的镜像试试吧
目前看2.2是支持的,不行的话我这边看看能不能升级xxl-job
找到问题了,2.2版本callback接口接受格式为
[{
"logId":1, // 本次调度日志ID
"logDateTim":0, // 本次调度日志时间
"executeResult":{
"code": 200, // 200 表示任务执行正常,500表示失败
"msg": null
}
}]
之后的版本为
[{
"logId":1, // 本次调度日志ID
"logDateTim":0, // 本次调度日志时间
"handleCode":200, // 200 表示任务执行正常,500表示失败
"handleMsg": null
}
}]
后续我会发布一个新版本兼容一下
安装最新版本 0.3.3 试一下 @dislazy
好的 我试试
已经可以了,没有报错日志了,非常感谢
job方法:
调用结果截图:
报错日志详情
感谢作者开发该项目,希望能一起帮忙解决