SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Bind agent listener on dedicated interrface

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Bind agent listener on dedicated interrface
Author Message
Redemann



Joined: 11 Jul 2007
Posts: 90
Country: Germany

Post Bind agent listener on dedicated interrface Reply with quote
Hi there,

we have a very special firewall situation and due to the fact that the master - agent communication is a bit tricky when (like we) have to use NATted-IP.
Now I added another agent on a Linux heartbeart cluster. It would make things much easier to bind the agent to a dedicated network interface.
Is this possible via preferences.xml or a special call of the agent?

Thanks in advance.
Wed Sep 17, 2008 5:46 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
Quote:
bind the agent to a dedicated network interface


Yes, this should be possible. Please take a look at http://java.sun.com/j2se/1.4.2/docs/guide/rmi/javarmiproperties.html
The scheduler/agent communications are based on RMI technology and so the behavior of RMI can be configured using additional parameters specified on the command line, you will need to edit the command line in the agent startup file agent.sh file, in particular, I think you need to set java.rmi.server.hostname=IP to the IP address of that specific interface..

Please let us know if that helps.

Please note that in comparison to scheduler/agent communications (I mean remote job running), the command console, the web console and internal APIs are NOT using RMI and the above change will have no effect on them.
Wed Sep 17, 2008 9:34 am View user's profile Send private message
Redemann



Joined: 11 Jul 2007
Posts: 90
Country: Germany

Post Reply with quote
Thanks a lot!
That's exactly what I've been looking for (I'm a real JAVA noob). Works fine.

To make things clear: This is no interface binding - the agent is still listening on all interfaces (netstat will show this).

What changes is the ip communication:
If there is a remote call from the master to a firewall-nat'ed agent there are always a sequence of 2 IP connections:

1. master -> agent (i.e port 1098) - of course to the agent's ip address from master's point of view.
2. master -> agent : now the master will try to use the ip address received from the first connection which is now the real local ip of the agent

If you now use the -Djava.rmi.server.hostname=ip then the second connect will use this ip address (and not the DNS ip sent back from the agent).
You should of course use the same ip-address as configured on the master.

Hope I expressed/explained that correctly...

Regards
Thu Sep 18, 2008 4:56 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
Thanks for the detailed explanation. Yes, as you noticed the agent doesn't listen on a particular IP address, it listens for incoming connections on a particular port (1096 by default, but in your case you have it set to 1098). It doesn't really matter what the agent's IP address is at that point. As long as the scheduler can reach the agent, any IP or host name can be specified in the agent profile settings (on the scheduler) for the initial "handshake."

The "hostname" property specified on the command line simply overrides then agent's own identification of the local IP address, and forces the agent to respond to scheduler connection request reporting that the specified hostname value is the actual endpoint IP address. The scheduler then rebinds connection to that IP value.
Fri Sep 19, 2008 12:44 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.