[jboss-user] [Clustering/JBoss] - Only one instance of the "Draw demo application" can be star

brendando do-not-reply at jboss.com
Mon Oct 13 10:13:58 EDT 2008


Hello, I tried appending this to an existing problem with no response,

Having trouble with jgroups runnig on Windows 2000 or XP. I have completed the following steps, can can only ever get one version of Draw application to run on a PC


GetNetworkInterfaces

C:\jgroups\JGROUP~1.BIN>java -Djava.net.preferIPv4Stack=true -Djgroups.bind_addr=170.198.227.92 -Djgroups.udp.mcast_addr=239.10.10.10 -Djgroups.udp.mcast_port=7654
-cp ./;jgroups-all.jar;commons-logging.jar;log4j.properties org.jgroups.util.GetNetworkInterfaces
lo:
MS TCP Loopback interface
/127.0.0.1 (127.0.0.1)
---------------------
eth0:
Broadcom NetXtreme Gigabit Ethernet Driver
/170.198.227.92 (bd01.cstplc.lan)
---------------------





Multicast Discover Test

org.jgroups.tests.McastDiscovery

========================================================
Responses received ordered by interface:

170.198.227.92: [/127.0.0.1:3896, /170.198.227.92:3897]
127.0.0.1: [/127.0.0.1:3896, /170.198.227.92:3897]

-- Valid interfaces are [/170.198.227.92, /127.0.0.1]


Use of any of the above interfaces in "UDP(bind_addr=)" will guarantee that the members will find each other
========================================================


First Instance of the Draw Application

C:\jgroups\JGROUP~1.BIN>java -Djava.net.preferIPv4Stack=true -Djgroups.bind_addr=170.198.227.92 -Djgroups.udp.mcast_addr=239.10.10.10 -Djgroups.udp.mcast_port=7
654 -cp ./;jgroups-all.jar;commons-logging.jar;log4j.properties org.jgroups.demos.Draw
10-Oct-2008 12:32:42 org.jgroups.JChannel init
INFO: JGroups version: 2.6.4.GA

-------------------------------------------------------
GMS: address is 170.198.227.92:4805
-------------------------------------------------------
** View=[170.198.227.92:4805|0] [170.198.227.92:4805]


A nestat -an returns the following info

TCP 170.198.227.92:4806 0.0.0.0:0 LISTENING
UDP 0.0.0.0:7654 *:*

Restarting this first instance, the port showing in the Draw app window is always one less than the port showing in the netstat output.


Second Instance of the Draw Application

C:\jgroups\JGroups-2.6.4.GA.bin>java -Djava.net.preferIPv4Stack=true -Djgroups.bind_addr=170.198.227.92 -Djgroups.udp.mcast_addr=239.10.10.10 -Djgroups.udp.mcas
t_port=7654 -cp ./;jgroups-all.jar;commons-logging.jar;log4j.jar org.jgroups.demos.Draw
log4j:ERROR Could not find value for key log4j.appender.AtsEventLogFile
log4j:ERROR Could not instantiate appender named "AtsEventLogFile".
INFO - [main] JGroups version: 2.6.4.GA
DEBUG - [main] mapping is:
1: class org.jgroups.stack.IpAddress
2: class org.jgroups.protocols.CAUSAL$CausalHeader
3: class org.jgroups.protocols.FD$FdHeader
6: class org.jgroups.protocols.FD_SOCK$FdHeader
7: class org.jgroups.protocols.FragHeader
13: class org.jgroups.protocols.PingHeader
14: class org.jgroups.protocols.TcpHeader
19: class org.jgroups.protocols.TunnelHeader
20: class org.jgroups.protocols.UdpHeader
21: class org.jgroups.protocols.UNICAST$UnicastHeader
22: class org.jgroups.protocols.VERIFY_SUSPECT$VerifyHeader
24: class org.jgroups.protocols.pbcast.GMS$GmsHeader
25: class org.jgroups.protocols.pbcast.NakAckHeader
27: class org.jgroups.protocols.pbcast.STABLE$StableHeader
28: class org.jgroups.protocols.pbcast.STATE_TRANSFER$StateHeader
29: class org.jgroups.protocols.SMACK$SmackHeader
30: class org.jgroups.Message
31: class org.jgroups.View
32: class org.jgroups.ViewId
34: interface org.jgroups.Address
35: class org.jgroups.blocks.RequestCorrelator$Header
36: class org.jgroups.protocols.PingRsp
38: class java.util.Vector
39: class org.jgroups.protocols.pbcast.JoinRsp
40: class org.jgroups.util.Digest
41: class java.util.Hashtable
53: class org.jgroups.protocols.COMPRESS$CompressHeader
54: class org.jgroups.protocols.FC$FcHeader
56: class org.jgroups.protocols.TpHeader
57: class org.jgroups.protocols.ENCRYPT$EncryptHeader
58: class org.jgroups.protocols.SEQUENCER$SequencerHeader
59: class org.jgroups.protocols.FD_SIMPLE$FdHeader
60: class org.jgroups.protocols.VIEW_SYNC$ViewSyncHeader
61: class org.jgroups.protocols.FD_ALL$Header
62: class org.jgroups.protocols.SFC$Header
63: class org.jgroups.mux.MuxHeader
64: class org.jgroups.protocols.pbcast.FLUSH$FlushHeader
65: class org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$StateHeader
66: class org.jgroups.blocks.PullPushAdapter$PullHeader
67: class org.jgroups.protocols.AuthHeader

DEBUG - [main] changed role to org.jgroups.protocols.pbcast.ClientGmsImpl
DEBUG - [main] frag_size=60000, overhead=200, new frag_size=59800
DEBUG - [main] received CONFIG event: {bind_addr=/170.198.227.92}
DEBUG - [main] received CONFIG event: {bind_addr=/170.198.227.92}
TRACE - [main] stable task started
DEBUG - [main] creating sockets and starting threads
DEBUG - [main] sockets will use interface 170.198.227.92
org.jgroups.ChannelException: failed to start protocol stack
at org.jgroups.JChannel.startStack(JChannel.java:1545)
at org.jgroups.JChannel.connect(JChannel.java:364)
at org.jgroups.demos.Draw.go(Draw.java:174)
at org.jgroups.demos.Draw.main(Draw.java:144)
Caused by: java.lang.Exception: problem creating sockets (bind_addr=/170.198.227.92, mcast_addr=null)
at org.jgroups.protocols.UDP.start(UDP.java:373)
at org.jgroups.stack.Configurator.startProtocolStack(Configurator.java:124)
at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:392)
at org.jgroups.JChannel.startStack(JChannel.java:1542)
... 3 more
Caused by: java.net.BindException: Address already in use: Cannot bind
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
at java.net.DatagramSocket.bind(DatagramSocket.java:368)
at java.net.MulticastSocket.(MulticastSocket.java:147)
at java.net.MulticastSocket.(MulticastSocket.java:112)
at org.jgroups.protocols.UDP.createSockets(UDP.java:480)
at org.jgroups.protocols.UDP.start(UDP.java:369)
... 6 more

Using wireshark I can see the UDP traffic coming from 170.198.227.92 to 239.10.10.10 with a src/dst port of 7654

Multicast Send/Recieve test works fine

C:\jgroups\JGROUP~1.BIN>java -Djava.net.preferIPv4Stack=true -Djgroups.bind_addr=170.198.227.92 -Djgroups.udp.mcast_addr=239.10.10.10 -Djgroups.udp.mcast_port=7
654 -cp ./;jgroups-all.jar;commons-logging.jar;log4j.properties org.jgroups.tests.McastSenderTest
Socket=0.0.0.0/0.0.0.0:4874, ttl=32, bind interface=/0.0.0.0
> me again
> << Received response from 170.198.227.92:5555: Hello from Bela


C:\jgroups\JGroups-2.6.4.GA.bin>java -Djava.net.preferIPv4Stack=true -Djgroups.bind_addr=170.198.227.92 -Djgroups.udp.mcast_addr=239.10.10.10 -cp jgroups-all.ja
r;commons-logging.jar;log4j.properties org.jgroups.tests.McastReceiverTest
Socket=0.0.0.0/0.0.0.0:5555, bind interface=/0.0.0.0
me again [sender=170.198.227.92:4874]


Can anyone point me in the right direction to resolve this issue. I have also tried this with 2.6.5 and get the same results.

Many Thanks


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181858#4181858

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181858



More information about the jboss-user mailing list