Re: getting ORBit examples to work across the network



Hi Amir,

On Tue, 2008-02-05 at 14:55 -0800, Amir Afrah wrote:
>  Jules, I dont really know how to set the ORB_init option to use
> "ipaddr" since it doesnt seem to be doing it automatically. Thanks
> alot!!

Just add this command line parameter to your app: 

	--ORBNetID=ipaddr


You can also customize argv and create the ORB explicitly:

static CORBA_ORB
create_orb(CORBA_Environment *ev)
{
	CORBA_ORB orb = CORBA_OBJECT_NIL;
	int init_argc = 2;
	char **init_argv = (char**)malloc(sizeof(char*) * (init_argc));
	if (!init_argv)
		return CORBA_OBJECT_NIL;

	init_argv[0] = "DUMMY_ARGV0";
	init_argv[1] = "--ORBNetID=ipaddr";

	// initialize the ORB
	orb = CORBA_ORB_init(&init_argc, init_argv, "orb_orbit-io-thread", ev);
	if (ORBIT2_EX(ev))
		orb = CORBA_OBJECT_NIL;

	free(init_argv);

	return orb;
}

HTH,
  jules



> Amir
>  
> On Feb 5, 2008 1:27 AM, Jules Colding <colding 42tools com> wrote:
>         
>         On Tue, 2008-02-05 at 16:03 +0800, Kuang-Chun Cheng wrote:
>         > Hi Amir,
>         >
>         > Make sure your client can see server by hostname.  Two hosts
>         connected
>         > OK by IP address is not enough for ORBit2, AFAIK.
>         
>         
>         It is:
>         
>         2005-07-25  Jules Colding  <colding omesc com>
>         
>                * src/orb/orb-core/corba-orb.c: Added new ORB_init
>         option, ORBNetID.
>                Valid values for a hypothetical local host
>         (FQDN:thor.test.com, IP:10.0.3.2):
>                   "local": all attempts to resolve the local host will
>         be done using "localhost"
>                   "short": all attempts to resolve the local host will
>         be done using "thor".
>                   "fqdn" : all attempts to resolve the local host will
>         be done using "thor.test.com".
>                   "ipaddr: all attempts to resolve the local host will
>         be done using "10.0.3.2".
>                The new option will be evaluated after ORBLocalOnly but
>         ORBLocalOnly will always take
>                precedence.
>         
>         Best regards,
>          jules
>         
>         
>         
>         
>         > Regards
>         > KC
>         >
>         > On Feb 5, 2008 3:58 PM, Jules Colding <colding 42tools com>
>         wrote:
>         > > Hi Amir,
>         > >
>         > >
>         > > On Mon, 2008-02-04 at 18:39 -0800, Amir Afrah wrote:
>         > > > Hi all,
>         > > >
>         > > > I have been trying to get the simple example of
>         > > > echo-server/echo-client to work on 2 machines on the
>         network but Ive
>         > > > had no luck for almost 2 days, I can run both server and
>         client on a
>         > > > single machine but when i place the client on a
>         different machine I
>         > > > get the following error massage:
>         > > >
>         > > > ** ERROR **: service raised exception :
>         > > > IDL:omg.org/CORBA/COMM_FAILURE:1.0
>         > > >
>         > > > I have been searching on google and the only issue that
>         is ever
>         > > > brought up is that IIOP over IP server sockets in
>         default setting and
>         > > > there is 2 methods to change that setting 1) by adding
>         ORBIIOPIPv4=1
>         > > > in /etc/orbitrc or ~/.orbitrc 2) by adding
>         --ORBIIOPIPv4=1 to command
>         > > > line. I have tried both of these extensively and no
>         luck, any help
>         > > > regarding this would be greatly appriciated.
>         > >
>         > > I just need to give the client a reference to the server.
>         You can do
>         > > this by stringifying the server object, put the ior in a
>         text file and
>         > > feed this to the client.
>         > >
>         > > There are more elegant methods (corbaloc) but something
>         like the above
>         > > should be relatively easy to set up.
>         > >
>         > > HTH,
>         > >   jules
>         > >
>         > >
>         > > _______________________________________________
>         > > orbit-list mailing list
>         > > orbit-list gnome org
>         > > http://mail.gnome.org/mailman/listinfo/orbit-list
>         > >
>         
>         
> 
> 
> 
> -- 
> Amir Afrah



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]