xxl-job icon indicating copy to clipboard operation
xxl-job copied to clipboard

IpUtlil.getip错误

Open xcw931924821 opened this issue 2 years ago • 4 comments

Please answer some questions before submitting your issue. Thanks!

B1AE8C62-7E79-47f6-A8A1-2B47033E2368

  • [ ] InetAddress.getLocalHost()在复杂网络下是不可信的,尤其是hosts信息不正确时候。所以优先遍历网卡来获取第一个可用的外网地址。
  • [ ] 目前拿到地址不是本地的ip 地址。

xcw931924821 avatar Jun 09 '22 12:06 xcw931924821

版本是2.3.1 偶尔发生,目前我的策略是0/5 * * * * ?

xcw931924821 avatar Jun 09 '22 12:06 xcw931924821

这个确实问题很大,怎么解决

Zttaow avatar Jun 10 '22 02:06 Zttaow

暂时发现不是bug,我自己开了两个trigger .有一个是本地的。

xcw931924821 avatar Jun 10 '22 04:06 xcw931924821

我使用的时候,xxl自动注册通过IpUtil.getIp();获取的是虚拟机ip地址,而不是本机ip,admin调执行器就调不通

Zttaow avatar Jun 10 '22 06:06 Zttaow