Chat demo & Location Forward

[email protected]
Newsgroups gmane.comp.corba.orbacus
Message-ID <[email protected]>
Hi.

When I run chat.Client on a remote machine, the server responds to the
client's GIOP _is_a request with a Location Forward (127.0.0.1).  The
client tries to connect to a local chat server (there isn't one) and fails
with org.omg.CORBA.TRANSIENT: attempt to establish connection failed... 
The details that led me to this conclusion are below.

Any ideas what I'm doing wrong?

Thanks!
Nate



First, I started the chat server on a Linux 2.6.3 machine (10.0.0.236):

[nate@localhost chat]$ java -cp ../../lib:classes chat.Server
*** Server started at Sat Mar 26 15:39:37 EST 2005
*** Running on host `127.0.0.1', port number 32833

In another terminal window on the same box, I can join the chat:

[nate@localhost chat]$ java -cp ../../lib:classes chat.Client
Host name? 127.0.0.1
Port number? 32833
Using object `broadcaster' from host `127.0.0.1' on port 32833...

I see the chat window appear and the server process logs that I have joined:

*** nate (nate@localhost) has joined the chat



>From my XP box (10.0.0.99) however, I cannot join:

C:\orbacus\JOB-4.2.2-eval\ob\demo\chat>java -cp ..\..\lib;classes chat.Client
Host name? 10.0.0.236
Port number? 32833
Using object `broadcaster' from host `10.0.0.236' on port 32833...
org.omg.CORBA.TRANSIENT: attempt to establish connection failed:
java.net.ConnectException: Connection refused: connect  vmcid: 0x4f4f0000 
minor code: 1  completed: No
        at com.ooc.OCI.IIOP.Connector_impl.connect(Connector_impl.java:130)
        at com.ooc.OB.GIOPClient.getWorker(GIOPClient.java:224)
        at com.ooc.OB.GIOPClient.bind(GIOPClient.java:620)
        at com.ooc.OB.DowncallStub.locate_request(DowncallStub.java:518)
        at com.ooc.CORBA.Delegate._OB_getDowncallStub(Delegate.java:1248)
        at com.ooc.CORBA.Delegate.request(Delegate.java:602)
        at com.ooc.CORBA.Delegate.is_a(Delegate.java:401)
        at org.omg.CORBA.portable.ObjectImpl._is_a(Unknown Source)
        at chat.BroadcasterAdminHelper.narrow(BroadcasterAdminHelper.java:96)
        at chat.Client.run(Client.java:41)
        at chat.Client.main(Client.java:111)



I confirmed that the client was talking to the server using ethereal. 
Here are the GIOP packets (printed from the capture file by tcpdump):

15:49:50.318106 IP 10.0.0.99.3463 > 10.0.0.236.32833: P 1:107(106) ack 1
win 17520
0x0000   4500 0092 80f1 4000 8006 6426 0a00 0063        [email protected]&...c
0x0010   0a00 00ec 0d87 8041 b47c e7f5 81a7 6d56        .......A.|....mV
0x0020   5018 4470 cfeb 0000 4749 4f50 0100 0000        P.Dp....GIOP....
0x0030   0000 005e 0000 0001 0b0b 0b01 0000 0004        ...^............
0x0040   e857 3d00 0000 0004 0100 0000 0000 0010        .W=.............
0x0050   6272 6f61 6463 6173 7465 7241 646d 696e        broadcasterAdmin
0x0060   0000 0006 5f69 735f 6100 0000 0000 0000        ...._is_a.......
0x0070   0000 001e 4944 4c3a 6368 6174 2f42 726f        ....IDL:chat/Bro
0x0080   6164 6361 7374 6572 4164 6d69 6e3a 312e        adcasterAdmin:1.
0x0090   3000                                           0.

15:49:50.318491 IP 10.0.0.236.32833 > 10.0.0.99.3463: P 1:177(176) ack 107
win 5840
0x0000   4500 00d8 15d2 4000 4006 0f00 0a00 00ec        E.....@.@.......
0x0010   0a00 0063 8041 0d87 81a7 6d56 b47c e85f        ...c.A....mV.|._
0x0020   5018 16d0 d46b 0000 4749 4f50 0100 0001        P....k..GIOP....
0x0030   0000 00a4 0000 0000 0000 0004 0000 0003        ................
0x0040   0000 001e 4944 4c3a 6368 6174 2f42 726f        ....IDL:chat/Bro
0x0050   6164 6361 7374 6572 4164 6d69 6e3a 312e        adcasterAdmin:1.
0x0060   3000 0000 0000 0001 0000 0000 0000 0068        0..............h
0x0070   0001 0200 0000 000a 3132 372e 302e 302e        ........127.0.0.
0x0080   3100 8041 0000 0026 abac ab30 5f52 6f6f        1..A...&...0_Roo
0x0090   7450 4f41 0063 6861 7450 4f41 0000 6272        tPOA.chatPOA..br
0x00a0   6f61 6463 6173 7465 7241 646d 696e 0000        oadcasterAdmin..
0x00b0   0000 0001 0000 0001 0000 001c 0000 0000        ................
0x00c0   0001 0001 0000 0002 0001 0020 0501 0001        ................
0x00d0   0001 0109 0000 0000                            ........



To confirm I was reading the Location Forward right, I ran a trivial echo
program in another console on the XP box and reran the chat client to show
that it is indeed trying to connect to the server object locally:

C:\Documents and Settings\me\java>java TCPEchoServer 32833
Accepted connection
GIOP&#9786;&#9787;     ?   &#9830;&#9829;          &½¼½0_RootPOA chatPOA 
broadcasterAdmin     &#9824;_is_a
   &#9787;   &#9786;   &#9792;     &#9786; &#9786; &#9786;&#9786;
&#9794;&#9794;&#9794;&#9786;   &#9830;&#934;W=       
&#9650;IDL:chat/BroadcasterAdmin:1.0


_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.