Problem with build agent IP and NAT

I've a problem with a build agent running on a different PC than the
server. The PC gets a different IP address via NAT.

The only way I found to make the agent work on the PC is to enter the
outside IP address of the agent PC in the buildAgent.properties file.
However, since the IP changes whenever I turn on the PC this is a bit
annoying.

Question: Is there another way to let the server find out the agent IP
address (I'm not a networking expert...)? If not, are there any plans to
support this scenario (e.g. agents could announce themselves via SLP)?

Thanks,
Axel

2 comments

Axel,

Could you please describe your environment in more detail?

Does the computer running agent have single network interface/IP address?
Where is the NAT service located and what connections does it affect?
Since TeamCity agent and server establish connections both ways, in case there is a firewall between them, it should be properly configured to allow server-agent communications.

It seems that your particular issue can be workarounded by writing a customized start script that will detect agent's computer IP address, write it to the buildAgnet.properties file and then run the agent.
However, please note that agent with new IP will be automatically disabled on server and for the time being you will need to enable the agent each time it changes its IP address. (This issue is addressed by http://www.jetbrains.net/jira/browse/TW-2961 )

AFAIK there are no plans as to SLP since as far as I understand this will address only LAN-confined scenarios while usual LAN configurations work "out of the box" most of the time.

--
Best regards,

Yegor Yarko
Quality Assurance Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Yegor Yarko (JetBrains) wrote:

Axel,

Could you please describe your environment in more detail?

Does the computer running agent have single network interface/IP address?
Where is the NAT service located and what connections does it affect?
Since TeamCity agent and server establish connections both ways, in case there is a firewall between them, it should be properly configured to allow server-agent communications.


Hi Yegor,

the agent PC has a single network interface and IP address, let's say x.
In our scenario, the TC server is accessible from outside as other
people must have access to it. When ssh'ing from the agent PC to the
server, the "who" command reveals that the connected client (the agent
PC) has a different name and IP y. Hence, the NAT service is/seems to be
somewhere between agent PC and server (the agent PC is my office machine
and part of an internal network). When entering ownAddress=y in the
buildAgent.properties and restarting the agent everything works (after
enabling it on the server).

The server-agent communication isn't a problem (I turned off the agent
pc firewall).

It seems that your particular issue can be workarounded by writing a customized start script that will detect agent's computer IP address, write it to the buildAgnet.properties file and then run the agent.


Yes, that could work (e.g. via some http remote address output). I will
give it a try.

However, please note that agent with new IP will be automatically disabled on server and for the time being you will need to enable the agent each time it changes its IP address. (This issue is addressed by http://www.jetbrains.net/jira/browse/TW-2961 )


Yes, I see. Some agent ID independent of the name and IP sounds good...

AFAIK there are no plans as to SLP since as far as I understand this will address only LAN-confined scenarios while usual LAN configurations work "out of the box" most of the time.


Yes, I expected so. In fact, our setting is (hopefully ;) a temporary
solution for a few months. So, with an adapted start script the whole
thing is reduced to enabling the agent. That sounds ok... :)

Thanks again,
Axel

0

Please sign in to leave a comment.