Sagewire Logo

Using corba from a different machines not working

7 Message(s) by 4 Author(s) originally posted in java corba


From: none Date:   Saturday, December 17, 2005
I've followed
http://JAVA.sun.com/j2se/1.4.2/docs/guide/idl/GShome.html to build a
corba app lication. When I run the orb, server and client on the same
machine it works fine.

When I follow this guide
http://JAVA.sun.com/j2se/1.4.2/docs/guide/idl/tutorial/jidl2machines.html
to run the orb and server on one machine and the client on another
machine it does not work.

The orb and server starts fine but when I start the client I get the
error below.
I've started the orb with orbd -ORB InitialHost 192.168.1.100
-ORBInitialPort 1050 and the server with JAVA HelloServer
-ORBInitialPort 1050

Both systems are Linux Debian with sun j2sdk1.5_1.5.0+update02
Both systems is on an internal lan with ip's 192.168.1.101 and
192.168.1.100 with no firewall and directly connected.

banke@xxxxxxxxxxx# JAVA HelloClient -ORBInitialHost 192.168.1.100
-ORBInitialPort 1050
Dec 17, 2005 11:21:46 PM
com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType:
IIOP_CLEAR_TEXT; host name: 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(Unknown
Source)
at
com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(Unknown
Source)
at
com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(Unknown
Source)
at
com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(Unknown
Source)
at
com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(Unknown
Source)
at
com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(Unknown
Source)
at
com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(Unknown
Source)
at
com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(Unknown Source)
at org.omg.CORBA.portable.ObjectImpl._is_a(Unknown Source)
at org.omg.CosNaming.NamingContextExtHelper.narrow(Unknown Source)
at Client.YellowNotesClient.main(YellowNotesClient.JAVA:22)
Caused by: JAVA.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at JAVA.nio.channels.SocketChannel.open(Unknown Source)
at
com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(Unknown
Source)
... 9 more
Dec 17, 2005 11:21:46 PM
com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType:
IIOP_CLEAR_TEXT; hostname: 127.0.0.1; port: 1050"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at
com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(Unknown
Source)
at
com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(Unknown
Source)
at
com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(Unknown
Source)
at
com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(Unknown
Source)
at
com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(Unknown
Source)
at
com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(Unknown
Source)
at
com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(Unknown
Source)
at
com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(Unknown
Source)
at
com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(Unknown Source)
at org.omg.CORBA.portable.ObjectImpl._is_a(Unknown Source)
at org.omg.CosNaming.NamingContextExtHelper.narrow(Unknown Source)
at Client.YellowNotesClient.main(YellowNotesClient.JAVA:22)
Caused by: JAVA.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at JAVA.nio.channels.SocketChannel.open(Unknown Source)
at
com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(Unknown
Source)
... 10 more
ERROR : org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201
completed: No
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at
com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(Unknown
Source)
at
com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(Unknown
Source)
at
com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(Unknown
Source)
at
com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(Unknown
Source)
at
com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(Unknown
Source)
at
com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(Unknown
Source)
at
com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(Unknown
Source)
at
com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(Unknown
Source)
at
com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(Unknown Source)
at org.omg.CORBA.portable.ObjectImpl._is_a(Unknown Source)
at org.omg.CosNaming.NamingContextExtHelper.narrow(Unknown Source)
at Client.YellowNotesClient.main(YellowNotesClient.JAVA:22)
Caused by: JAVA.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at JAVA.nio.channels.SocketChannel.open(Unknown Source)
at
com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(Unknown
Source)
... 10 more


From: Matthias Ernst Date:   Sunday, December 18, 2005
banke@xxxxxxxxxxx# JAVA HelloClient -ORBInitialHost 192.168.1.100
-ORBInitialPort 1050
Dec 17, 2005 11:21:46 PM
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"127.0.0.1" is your problem. Your client is trying to talk to itself, not


the server. I suspect (what I have seen with other Linux setups) is a funky
/etc/hosts on the server. It'll -as I recall- list 127.0.0.1 as the ip
for the hostname. The JAVA ORB will do a lookup and announce "127.0.0.1"
as its own address in the IOR.

You can fix your /etc/hosts, or start the server with -Dcom.sun.CORBA.ORBServerHost=<server's
real IP>


Matthias


From: Frederik Sorensen Date:   Sunday, December 18, 2005
> You can fix your /etc/hosts, or start the server with
> -Dcom.sun.CORBA.ORBServerHost=<server's real IP>
>
> Matthias
>
>

I do not think it is my hosts file :
127.0.0.1 localhost.localdomain localhost spand
192.168.1.100 watch.patch.lan watch

If I try to start the client with the option you suggested, no
difference. I've even tried to define the InitialHost and InitialPort
in the app it self with:
Properties props = new Properties();
props.put("org.omg.CORBA.ORBInitialPort", "1050");
props.put("org.omg.CORBA.ORBInitialHost", "192.168.1.100");
ORB orb = ORB.init(args, props);

Apparently it makes no difference wheter I use a ip or a hostname it
still uses 127.0.0.1

If I change the ORBInitialHost to an non resolvable adress like "foo" it
show the host "foo" in the error not 127.0.0.1 but I have no clue to why.

/Frederik


From: Matthias Ernst Date:   Sunday, December 18, 2005
Hello Frederik,

You can fix your /etc/hosts, or start the ***server*** with
-Dcom.sun.CORBA.ORBServerHost=<server's real IP>

If I try to start the ***client*** with the option you suggested, no
difference.



Please try on the server. Is the server "watch" ? Does it have
127.0.0.1 localhost.localdomain localhost watch in its /etc/hosts?

You don't want "watch" in that line.

Matthias


From: Matthias Ernst Date:   Sunday, December 18, 2005
But I must say that i do not find it logic that it do not accept the ip



Frederik,

your initial lookup probably works fine, but the object reference you receive
is faulty then. The "problem" is the object references (IORs) contain addresses
themselves,
like URLs. It's like a webserver that'd publish a URLs pointing to "localhost"
because it misidentified its own address.

Matthias


From: Frederik Sorensen Date:   Monday, December 19, 2005
wrote in message:
But I must say that i do not find it logic that it do not accept the ip
>
>
> Frederik,
>
> your initial lookup probably works fine, but the object reference you
> receive is faulty then. The "problem" is the object references (IORs)
> contain addresses themselves,
> like URLs. It's like a webserver that'd publish a URLs pointing to
> "localhost" because it misidentified its own address.
>
> Matthias
>
>

The hosts file was to blame, it was as you saied that watch was mapped
to 127.0.0.1 instead of the real ip.

Thanks for the great help.

I've one last question, is it possible to use CORBA with HTTP as
transport. That is, is it possible to use CORBA trough a HTTP proxy server?

/Frederik


From: jinghua2008 Date:   Sunday, January 08, 2006
Is it necessary to add the IP and the hostname to the /etc/hosts file?



Next Message: Sinottico


Blogs related to Using corba from a different machines not working

Building Effective Enterprise Distributed Software Systems
Way back in the '90s, while working at Microsoft, I built middle-ware systems using C++ and DCOM. At one point I redid some of a system with MSMQ messaging and had an ah-ha experience. MSMQ is not the most robust MOM feature-wise, ...

informatyk
db4o is an object database available for Java and for . ... Kit) provides tools for developing and executing, in a MIX virtual machine, MIXAL programs. ... It is a complete wrapping of all of MAPI into a (large) set of CORBA interfaces. ...

NetReadySensorsWorkshop_2006_08_0203
Support for Remote sensor panels and cameras using RPMs; Geographic feature; ... but under hood interoperability was done by network model under CORBA, ... Provides the ease of JAVA for development deployment and debugging, ...

Blanchard’s Law
Later on I encountered CORBA. CORBA seemed pretty cool - like Remote ... CORBA using a single proxy object that could stand in for any object. ... If this is not possible, then it is time to evaluate different tools and approaches.

最近运气真不错,想啥来啥!哈哈
Java offered a single language, virtual machine, and standard class ... with Common Object Request Broker Architecture (CORBA) systems using Internet ... .Net also was designed with the explicit requirement to support different ...

CS at the AUST
Topics include: sets, finite state machines, regular languages and grammars, ... This course studies the aspects and types of the Java programming language. ... Common Object Request Broker Architecture (CORBA) and Java Based Wireless ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional