|
|
|
[
Permlink
| « Hide
]
Robin Shen [06/Feb/14 02:34 AM]
QB is written in Java and I checked Java socket API to find that it currently does not have options of specifying a range of source ports when set up a socket connection.
Ok, so a single port is impossible. It should be possible to at least limit the port ranges. I could configure each build agent to use a range of e.g. 1000 ports and ditto on the server side.
Sorry this is almost impossible for us. For a specific agent, it may set up many connections to port 8810 of server to handle things such as sending heartbeat, reporting step status, reporting agent cpu/disk meansurements, etc. Actually we don't know how many concurrent connections will be due to the fact that a single agent can run multiple build steps.
We've taken another look at the actual traffic between agents and servers, here is what we found:
build agent starts a connection on a random source port to a target port of 8810 on the server. server receives on 8810 and opens a connection back to the client on a random source port to the agent destination port of 8812. I would guess that limiting the source ports too much is likely to cause collisions. I guess our ideal situation would be to be able to specify the source port on each agent, and then have the server use the same source port when connecting back to the agent. It would be something like this (with a defined source port of 2222 on the agent): Agent Server -------- 2222------------------>8810 8812 <---------------------2222 Each agent would have its own custom configuration for the source port which it would communicate to the server when it connects.. Thanks I work with Bill. This is actually a critical issue for us internally. Is there any way that you could provide a quick patch that would allow the source port on the agents to be constrained to a range? Right now we are dead in the water because of new networking rules. Thanks! |