The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » GlassFish

Thread: Specifiying Address / Interface for cluster node communication

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 4 - Last Post: Jun 29, 2009 12:07 PM by: jfialli
jmartinloi

Posts: 3
Specifiying Address / Interface for cluster node communication
Posted: Jun 28, 2009 6:55 PM
 
  Click to reply to this thread Reply

Hi folks,

Is it possible to specify the interface or IP address used for cluster node communication? In our data centers, we use eth0 as our management network (backups, monitoring, etc) and eth1 and higher for everything else.

The problem I'm seeing is that when non-DAS nodes are advertising their locations to one another, they are doing so through eth0, which has a very restrictive set of firewall (iptables) rules for traffic. eth1 is open to the network segment that each of the cluster nodes belong to. When I disable iptables and effectively open up eth0, the nodes communicate properly and the cluster works. When I enable iptables, it fails again.

To sum it up, I need a way to specify the interface or address used for internal cluster communication.

I'm using glassfish v2.1 b60e, on Linux.

Thanks,

James

jmartinloi

Posts: 3
Re: Specifiying Address / Interface for cluster node communication
Posted: Jun 29, 2009 6:58 AM   in response to: jmartinloi
 
  Click to reply to this thread Reply

I would like to point out that the eth0 and eth1 one are on 2 different subnets. eth0's network does not have a gateway, and eth1's is set for the default gateway.

jmartinloi

Posts: 3
Re: Specifiying Address / Interface for cluster node communication
Posted: Jun 29, 2009 10:41 AM   in response to: jmartinloi
 
  Click to reply to this thread Reply

Some further debugging:

The creation of the DAS works fine, when I'm trying to do this command it fails on a non-DAS:

asadmin> start-node-agent --user admin --passwordfile passwords.txt --syncinstances=true app2-agent
Redirecting output to /opt/glassfish/nodeagents/app2-agent/agent/logs/server.log
Redirecting application output to /opt/glassfish/nodeagents/app2-agent/agent/logs/server.log
Redirecting output to /var/lib/cpfusion/logs/glassfish/instance-log-service.log
[GC 460816K->8264K(3392000K), 0.0123010 secs]
[Full GC 8264K->8078K(3392000K), 0.0988740 secs]


At this point it just hangs here.

Checking tcpdump on the DAS shows:

[root@qa1-app1 ~]# tcpdump -i eth0 host qa1-app2-mgmt
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
13:28:06.284962 arp who-has 172.17.10.19 tell 172.17.10.18
13:28:06.285050 arp reply 172.17.10.19 is-at 00:1e:c9:fd:71:4b (oui Unknown)
13:28:06.285068 IP 172.17.10.18.40262 > 172.17.10.19.9701: S 1844067691:1844067691(0) win 5840 <mss 1460,sackOK,timestamp 1721196508 0,nop,wscale 7>
13:28:06.285073 IP 172.17.10.18.47606 > 172.17.10.19.9701: S 1838059613:1838059613(0) win 5840 <mss 1460,sackOK,timestamp 1721196508 0,nop,wscale 7>
13:28:06.299169 IP 172.17.10.18.55542 > 172.17.10.19.9701: S 1848689704:1848689704(0) w


(and so forth).

These requests should not be coming in through eth0...

I believe this is the cause:

https://glassfish.dev.java.net/issues/show_bug.cgi?id=5313

Shreedhar Ganap...
Re: Specifiying Address / Interface for cluster node communication
Posted: Jun 29, 2009 11:15 AM   in response to: jmartinloi
  Click to reply to this thread Reply

Hi James
From the following, it appears that Node Agent is waiting for the
instance to startup, and the instance receives messages on 9701 port on
eth0 interface address.

The traffic pertaining to port 9701 belongs to Jxta messages that come
out of Shoal GMS Clustering and the In-memory replication traffic.

This FAQ entry will help you set the interface address to bind to, for
the GMS and replication modules.

http://wiki.glassfish.java.net/Wiki.jsp?page=FaqShoalGMSPropertiesInDomainXML

Note that the FAQ entry applies more to GlassFish v2.1.1 promoted builds
than v2.1 b60e. For v2.1 b60e, the FAQ should apply as well as the
feature exists there as well, but we have not tested on that release
extensively as it was not a release critical feature.

Hope this helps. Please let us know if you have any feedback both on the
FAQ and on the effectiveness of the settings.

--Shreedhar

PS: I suspect you may also need to set the ip addresses of all listeners
(http, https, iiop, jmx, jms, etc) to the specific interface address if
you want to prevent appserver jvms from using IP_ADDRESS_ANY as the
binding option.


glassfish@javadesktop.org wrote:
> Some further debugging:
>
> The creation of the DAS works fine, when I'm trying to do this command it fails on a non-DAS:
>
> asadmin> start-node-agent --user admin --passwordfile passwords.txt --syncinstances=true app2-agent
> Redirecting output to /opt/glassfish/nodeagents/app2-agent/agent/logs/server.log
> Redirecting application output to /opt/glassfish/nodeagents/app2-agent/agent/logs/server.log
> Redirecting output to /var/lib/cpfusion/logs/glassfish/instance-log-service.log
> [GC 460816K->8264K(3392000K), 0.0123010 secs]
> [Full GC 8264K->8078K(3392000K), 0.0988740 secs]
>
>
> At this point it just hangs here.
>
> Checking tcpdump on the DAS shows:
>
> [root@qa1-app1 ~]# tcpdump -i eth0 host qa1-app2-mgmt
> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
> listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
> 13:28:06.284962 arp who-has 172.17.10.19 tell 172.17.10.18
> 13:28:06.285050 arp reply 172.17.10.19 is-at 00:1e:c9:fd:71:4b (oui Unknown)
> 13:28:06.285068 IP 172.17.10.18.40262 > 172.17.10.19.9701: S 1844067691:1844067691(0) win 5840 <mss 1460,sackOK,timestamp 1721196508 0,nop,wscale 7>
> 13:28:06.285073 IP 172.17.10.18.47606 > 172.17.10.19.9701: S 1838059613:1838059613(0) win 5840 <mss 1460,sackOK,timestamp 1721196508 0,nop,wscale 7>
> 13:28:06.299169 IP 172.17.10.18.55542 > 172.17.10.19.9701: S 1848689704:1848689704(0) w
>
>
> (and so forth).
>
> These requests should not be coming in through eth0...
>
> I believe this is the cause:
>
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=5313
> [Message sent by forum member 'jmartinloi' (jmartinloi)]
>
> http://forums.java.net/jive/thread.jspa?messageID=353444
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


jfialli

Posts: 13
Re: Specifiying Address / Interface for cluster node communication
Posted: Jun 29, 2009 12:07 PM   in response to: jmartinloi
 
  Click to reply to this thread Reply

I believe the issue that you have hit had a fix checked in on June 16th and may not be in your
build 60e that you reported using in an earlier email.

Here is the issue:
Token resolution of [cluster] gms-bind-interface-address property does not work in NodeAgent
https://glassfish.dev.java.net/issues/show_bug.cgi?id=8524

The executive summary of the above bug is the nodeagent does not bind to the
specified gms-bind-interface-address for the cluster and just binds to what it
would by default.

Hope this helps,
-Joe Fialli




 XML java.net RSS