-
1. Re: Making 1 Jboss listen to 2 IPs
brian.stansberry Aug 28, 2007 6:09 PM (in response to moeity)See http://wiki.jboss.org/wiki/Wiki.jsp?page=JGroupsUDP, discussion of "receive_on_all_interfaces".
-
2. Re: Making 1 Jboss listen to 2 IPs
moeity Aug 28, 2007 7:01 PM (in response to moeity)Thank you, I read the link, and have tried adding the following attributes to my in cluster-service.xml
bind_addr="192.168.128.100"
receive_on_all_interfaces="true"
send_on_all_interfaces="true"
But I still see clustering errors. My machine is 192.168.128.100, and the other machine in the cluster is 192.168.128.83. They are both started with ./run.sh -b 0.0.0.0 -c all --partition=DefaultPartition -u 228.1.2.6, and both have made the changes above to cluster-service.xml. If I start the servers with the -b parameter as the true IP (192.168.128.100 and .83) then clustering works. If 0.0.0.0, then I see these errors:
ERROR [UDP] failed sending message to 192.168.128.83:32961 (0 bytes)
java.io.IOException: Invalid argument
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:612)
at org.jgroups.protocols.UDP._send(UDP.java:338)
at org.jgroups.protocols.UDP.sendToSingleMember(UDP.java:299)
at org.jgroups.protocols.TP.doSend(TP.java:940)
at org.jgroups.protocols.TP.send(TP.java:926)
at org.jgroups.protocols.TP.down(TP.java:712)
at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:517)
at org.jgroups.stack.Protocol.passDown(Protocol.java:551)
at org.jgroups.protocols.Discovery.up(Discovery.java:246)
at org.jgroups.stack.Protocol.receiveUpEvent(Protocol.java:488)
at org.jgroups.stack.Protocol.passUp(Protocol.java:538)
at org.jgroups.protocols.TP.handleIncomingMessage(TP.java:908)
at org.jgroups.protocols.TP.handleIncomingPacket(TP.java:850)
at org.jgroups.protocols.TP.access$400(TP.java:45)
at org.jgroups.protocols.TP$IncomingPacketHandler.run(TP.java:1296)
at java.lang.Thread.run(Thread.java:595)
Any more tips, help, links appreciated,
David -
3. Re: Making 1 Jboss listen to 2 IPs
brian.stansberry Aug 28, 2007 9:32 PM (in response to moeity)Give this a try:
./run.sh -b 0.0.0.0 -c all --partition=DefaultPartition -u 228.1.2.6 -Djgroups.bind.address=192.168.128.100
If you use -b 0.0.0.0, JBoss will assign InetAddress.getLocalHost().getHostName() to system property jgroups.bind.address, and that will take precedence over your XML value. Directly assigning the system property will override that. -
4. Re: Making 1 Jboss listen to 2 IPs
moeity Aug 31, 2007 12:14 PM (in response to moeity)Thanks for the advice!
Actually, I think my problem was in trying to set JBoss's IP, when all I wanted to do was set Tomcat's listening IPs. If I keep running jboss's run.sh with the system's IP for -b, but edit the jboss-web.deployment/server.xml file so that the elements don't specify an IP, then Tomcat will listen on all ports, but JBoss's clustering will run as normal.
Thanks for the help!
David