Problem with starting Java IDL HelloClient example

I have no problems when starting orbd and HelloServer on one Windows machine and HelloClient on other Windows machine. But if I start orbd and HelloServer on linux machine I face the problem: HelloClient doesn't want to start. Here is the stacktrace:

org.omg.CORBA.COMM_FAILURE:vmcid: SUN minor code: 201 completed: No

at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2172)

at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2193)

at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:205)

at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:218)

at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:101)

at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)

at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:172)

at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:118)

at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:211)

at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)

at org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelper.java:73)

at HelloClient.main(HelloClient.java:21)

Caused by: java.net.ConnectException: Connection refused: connect

at sun.nio.ch.Net.connect(Native Method)

at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464)

at java.nio.channels.SocketChannel.open(SocketChannel.java:146)

at com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(DefaultSocketFactoryImpl.java:60)

at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:188)

... 9 more

and more:

04.12.2006 11:43:26 com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl <init>

WARNING:"IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.0.1; port: 1049"

org.omg.CORBA.COMM_FAILURE:vmcid: SUN minor code: 201 completed: No

at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2172)

at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2193)

at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:205)

at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:218)

at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:101)

at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)

at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:118)

at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:211)

at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)

at org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelper.java:73)

at HelloClient.main(HelloClient.java:21)

Caused by: java.net.ConnectException: Connection refused: connect

at sun.nio.ch.Net.connect(Native Method)

at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464)

at java.nio.channels.SocketChannel.open(SocketChannel.java:146)

at com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(DefaultSocketFactoryImpl.java:60)

at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:188)

... 8 more

04.12.2006 11:43:27 com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl <init>

WARNING:"IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.0.1; port: 2090"

org.omg.CORBA.COMM_FAILURE:vmcid: SUN minor code: 201 completed: No

at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2172)

at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2193)

at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:205)

at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:218)

at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:101)

at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)

at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:172)

at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:118)

at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:211)

at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)

at org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelper.java:73)

at HelloClient.main(HelloClient.java:21)

Caused by: java.net.ConnectException: Connection refused: connect

at sun.nio.ch.Net.connect(Native Method)

at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464)

at java.nio.channels.SocketChannel.open(SocketChannel.java:146)

at com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(DefaultSocketFactoryImpl.java:60)

at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:188)

... 9 more

Are there common and well-known reasons of this problem? Can anyone help me, please?

[6332 byte] By [ivan2006a] at [2007-10-3 11:31:59]
# 1

The Linux server is bound to the loopback device instead of the network interface. Try one of the following:

1. Set the ORB's com.sun.CORBA.ORBServerHost Property to the hostname or IP address of the network interface on the Linux machine.

2. Modify the 'etc/hosts' file on the Linux machine to make sure that the first entry contains the hostname and IP address of the network interface.

Regards,

Miran

MiranMa at 2007-7-15 13:58:45 > top of Java-index,Core,Core APIs...
# 2
or rather the client is trying to connect to the loopback address instead of the proper IP address where the ORBD is running.
ejpa at 2007-7-15 13:58:45 > top of Java-index,Core,Core APIs...