[omniORB] Re: basic communication stuff
Jorge García Velasco
jgarcia@mabyc.com
Mon, 17 Apr 2000 09:44:46 +-200
On Sat Apr 15 2000 Sean Kessler wrote:
> I am running omniNames on a Linux machine. The machine has
> two interfaces ppp0 and eth0. My omniORB.cfg file contains
> the following entries...
> ORBInitialHost 209.139.139.80
> ORBInitialPort 900
> The address 209.139.139.80 (which I made up here) corresponds
> to the ppp0 interface.
> I am starting up omniNames with the following arguments...
> ./omniNames -ORBtraceLevel 25 -ORBInitialHost 209.139.139.80
> I also have a servant on the same machine that registers itself
> with the naming service. Now, a client running on the same box is
> able to get a reference to the servant and call its methods.
> This works just fine.
> However, clients not residing on the same machine are able
> to get a reference to the naming service but are not able
> to get a reference to the servant. The client in question
> initializes the ORB with the following parameters...
> ORBInitialHost 209.139.139.80
> ORBInitialPort 900
> I just don't get it. Why is a remote client able to connect
> to the naming service and not be able to get a reference to the
> object while a local client is able to both connect to the
> naming service and acquire a reference to the object. I must
> be overlooking something here.
> Any suggestions would be greatly appreciated.
> -Sean Kessler
Hi Sean,
I have the same problem.
When you started the omniNames the first time with:
omniNames -start 900 -ORBInitialHost 209.139.139.80 it generates an IOR and
you should put it in the omniORB.cfg file:
NAMESERVICE IOR:XXXXXXXXXXXXXXXXXXXXXXXXX
ORBInitialHost 209.139.139.80
ORBInitialPort 900
If you check this IOR with the catior aplication you should see that the IP
contained in the IOR
string is not 209.139.139.80 instead is the IP specified in your /etc/host
file for your machine.
These are the steps that I follow to "workarround" the problem:
1) set in the /etc/hosts file the ppp IP instead the original host IP.
2) start omniNames: omniNames -start 900 &
3) copy the IOR to the omniORB.cfg file.
NAMESERVICE IOR:XXXXXXXXXXXXXXXXXXXXXXXXX
ORBInitialHost 209.139.139.80
ORBInitialPort 900
4) start the server: ./server -ORBInitialHost 209.139.139.80
-ORBInitialPort 900
5) start the client: ./client -ORBInitialHost 209.139.139.80
-ORBInitialPort 900
In all test that I have done this only runs if:
- in the /etc/hosts file is the ip of your ppp interface: 209.139.139.80
- in the omniORB.cfg is the IOR that contains the IP address of your ppp
interface: 209.139.139.80
else the client fails. Its like the the code used to get the servant
reference use the hostname and takes the IP from the /etc/hosts file.
I know that this is not a solution, I am very interested to know more
opinions about this subject.
Regards.
Jorge Garcia
R&D Software Engineer
Mabyc S.A.
Barcelona (Spain)