users@glassfish.java.net

RE: Hi Guys plz help me in removing this bug...

From: Shevland, Joe <joe.shevland_at_capgemini.com>
Date: Fri, 27 Apr 2007 10:14:56 +1000

> I am trying to call a remote EJB from a client...
> Here is [b]my client code...[/b]
>
> InitialContext ic = new InitialContext();
> Object o=
> ic.lookup("iiop://127.0.0.1:3700/ejb/TellHelloBean");
> TellHelloRemoteHome helloHome =
> (TellHelloRemoteHome) PortableRemoteObject.narrow(o,
> TellHelloRemoteHome.class);
> TellHelloRemoteBusiness obj=helloHome.create();
> System.out.println("" + obj.printHello());
>
> If try this it is working prperly...
> [b]But if i change the ip address to 127.0.0.1 to my real ip
> address like 172.20.34.218...[/b] It is giving this error:
>
> [b]Connection failure: socketType: IIOP_CLEAR_TEXT; hostname:
> 172.20.33.218; port: 3700"
> org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201
> completed: No[/b]
> [Message sent by forum member 'gopal1_v' (gopal1_v)]

Do a 'netstat -an' on your machine and see what address port 3700 is
bound to. On mine it looks like:

  TCP 0.0.0.0:3700 0.0.0.0:0 LISTENING

Which means it's listening on all interfaces - so if your 172.20.33.218
interface was up at the time of starting Glassfish, it should be
accepting connections; so at a guess perhaps your 172 interface came up
after Glassfish started and bound to all interfaces; try restarting GF
with that interface up.

Cheers
Joe

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.