Hello, I’m trying to use Nomad to update containers on our customers. But, whenever I install an agent-client on a server where it is not on the same network as the agent-server, the agent is registered but its heartbeat fails after one minute. Is it possible to make this work without a fixed external IP and open ports on the agent-client side?
I am not sure if I understood the problem correctly, but in general Nomad servers don’t need to reach clients directly. The communication is established the other way around, from clients to servers, using registration and heartbeats.
You mentioned that they are in different networks, but are the servers accessible by the clients? This would be the requirement as, otherwise, there would be no way for clients to know what they need to run.
Do you see any error in the logs (both from clients and servers)? Would you be able to post them?
Hi @lgfa29, thanks for the answer!
The problem is: when the server and client are on the same network (10.0.1.1 for example), everything works perfectly. But when they are on different networks (server - 188.8.131.52, client 10.0.1.1), the client registers with the server but after 1 minute the heartbeat fails.
Yes, all ports required for the client to connect to the server are open correctly.
The only log I find is on the server, where it says it has lost the connection with the client, but the client does not show any error.
Are setting up the cluster in one network (10.0.1.1 for example) and then moving the clients to a different network (184.108.40.206)?
If that’s the case you will need a router somewhere in between these two networks to be able to move requests between then, otherwise the clients won’t be able to reach the server (as you observed).