[omniORB] autostarting an omniORB server app

Duncan Grisby dgrisby@uk.research.att.com
Thu, 13 Sep 2001 10:06:54 +0100


On Wednesday 12 September, lou_liz@iafrica.com wrote:

> I want to make my CORBA server application start automatically when
> booting up on Linux without needing to log in.  (RH 7.0,
> gcc-2.96-85, omniORB 3.0.3),
> 
> I've tried 2 ways:
> (1) by adding an entry in the /etc/inittab file in the correct format, 
> OR 
> (2) by running the executable from the /etc/rc.d/rc.local script,
> which is the last script to be executed at boot time.

The second option is the most usual. You shouldn't edit /etc/inittab,
except to change the default runlevel. The third alternative is to
create a full init script in /etc/rc.d/init.d, and a symlink to it in
/etc/rc.d/rc5.d and other runlevels you need.

> Both methods make omniNames start up without error, then I pause for
> 5 seconds to make sure omniNames has started up, then I try to start
> up my CORBA server app (or any CORBA server app, for that matter,
> even eg3_imp) without success.
>
> The call to orb->resolve_initial_references("NameService") throws a
> CORBA::SystemException, and the handy little function
> exceptionName() submitted yesterday by Huw Rogers
> <count0@building2.co.jp> returns "NO_RESOURCES".

There are two possible problems. First, you haven't properly
configured omniORB, so it doesn't know where to find the name service.
You need an /etc/omniORB.cfg file, or the OMNIORB_CONFIG environment
variable set to a different location.

The second possibility, since you're using RedHat 7.0, is that you
haven't updated your compiler and C++ libraries to the fixed
versions. The ones that come with RedHat 7.0 are hopelessly broken.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --