Discovery module : reboot does not work over a second routed subnet added (works for the primary)

Problem:
Hello. Added a second DHCP subnet on my foreman server behind a router. I have set properly it in dhcpd.conf and registered it in the foreman configuration. Everything works fine except (I use the discovery plugin) the server does not reboot automatically. I got the errors in production.log Backtrace for 'Unable to perform reboot on mac005056932865 (): invalid address: ’ error (IPAddr::InvalidAddressError): invalid address:

Backtrace for ‘Unable to reboot’ error (Foreman::Exception): ERF42-4036 [Foreman::Exception]: Impossible to run reboot: on “IP ADDRESS”

It works well on my primary non routed subnet. Any idea please ?
If I manually reboot, the installation goes well.

Expected outcome:

Foreman and Proxy versions:
3.5.3
Foreman and Proxy plugin versions:
3.5.3
Distribution and version:
RHEL 8.8

Regards

Are you able to ping the host in the other subnet from your foreman server? Maybe there is an issue with the routing.

The reboot action is actually just a POST http request to an API endpoint of the webserver ran on the discovered host. As long as there is a connectivity, there should not be an issue.

Also, does the error you are mentioning show the correct IP?