Are you sure the camera is not going into some kind of low power sleep mode and then has a wake-on-LAN functionality that only responds to icmp/magic packets? The number of embedded devices that have aggressive power saving measures built in is kinda stupid tbh.
Can you reliably rtsp from a different machine to rule out the routing table?
The android app, if proprietary and manufacturer specific, could very well be sending its own magic wake-on-lan packet to check if the camera is alive.
I unfortunately don't know enough about nitty-gritty networking stuff to help with the actual routing though, refer to the other commenters for that.
Dunno how helpful this is but when I’ve had this problem in the past it was an IP conflict. Are you setting static IPs or are you using DHCP reserves for everything?
Is there an IPSec tunel in the mix? Often, IPSec Phase2 goes down when idle, while Phase1 stays up. Upon traffic, Phase2 is brought up again, with a delay.
I usually work around this with a crontab on one of the remote servers that sends a single ping packet every minute to a local server, and pipe any output to /dev/null.
I can guess at some things but let me first start with what I think is happening:
You have a gateway set. Your device sends a broadcast arp message asking 'who has ip ' and the device with that ip is supposed to send back 'me with this mac address!'.
That device is either sending it so slowly that your machine says 'I can't go past the gateway, the gateway isn't responding' which in your error message is no route to host.
Assuming that you have no custom manual network route in play.
So things that can cause that are usually link layer and layer two issues and sometimes duplicate IPs. Two devices with the gateway ip.
You should watch your mac address table and arp table (arp a) and watch if the router gateway disappears or changes Mac addresses.
I had an issue where my docker networks started overlapping my network addresses and I had some issues to connect to the machine etc. so perhaps check to make sure your docker addresses don’t overlap your home network range somehow. Also keep the subnet mask in mind as the range might be bigger than what the first few numbers indicate.