[XXLJob] XXLJob FAQ

概述:XXLJob FAQ

FAQ for XXL Job

Q: 执行器无法启动时成功注册到管理端,报403错误

  • 版本信息
  • 管理端: xxl-job-admin : 2.4.0
  • 执行器: xxl-job-executor: 2.3.1
  • 问题描述

执行器无法启动时成功注册到管理端,报403错误

[TID: N/A] [xxl-job-executor-001] [system] [2025/01/13 11:02:48.320] [INFO ] [xxl-job, executor ExecutorRegistryThread] [ExecutorRegistryThread$1] run:54__||__>>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='xxl-job-executor-001', registryValue='http://192.168.100.101:9999/'}, registryResult:ReturnT [code=500, msg=xxl-job remoting fail, StatusCode(403) invalid. for url : https://gateway.xxx.com/xxl-job-admin/api/registry, content=null]
  • 问题分析
  • 报403错误,说明网络是互通的,且似乎是权限方面问题
  • 检查执行器的用户(xxl.job.admin.username)和密码(xxl.job.admin.password),及用户对应管理端的权限:无误
  • 请求目标接口
root@kkk:~# curl https://gateway.xxx.com/xxl-job-admin/api/registry
<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>
root@kkk:~# curl https://gateway.xxx.com/xxl-job-admin/
<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>

初步结论: 负责代理 xxl-管理端 的 nginx 未开放xxl管理端的 url 资源给 执行器
解决了 负责代理 xxl-管理端 的 nginx 未开放xxl管理端的 url 资源给 执行器的根因后,再验证

//正常响应 (nginx有开放xxl管理端)
root@kkk:~# curl https://gateway.xxx.com/xxl-job-admin/api/registry
{"code":500,"msg":"invalid request, HttpMethod not support.","content":null}
root@kkk:~# curl https://gateway.xxx.com/xxl-job-admin/
  • 解决方法:(参见问题分析)

  • 推荐文献

  • xxljob

X 参考文献

posted @ 2025-01-13 14:59  千千寰宇  阅读(25)  评论(0编辑  收藏  举报