[omniORB] Running omniNames as a service on NT.

Steven W. Brenneis brennes1@rjrt.com
Fri, 19 Nov 1999 10:02:05 -0500


The original massage was sent way back in June and I don't know whether
anyone answered it or not.  If so, I must have lost it from my list
archive.

I have just recently started running omninames as an NT service under
srvany.  I started it with omniORB 2.7.1 and then upgraded to omniORB
2.8.0 yesterday.  The only problem I had was that the service would not
start until I rebooted the server after upgrading.  I am assuming that
NT had some problems resolving the changes I made in the environment
variables.  I was concerned about service dependencies (e.g. the server
might try to start omniNames before it had started the IP stack), but I
discovered that the srvany services are started with the Server service
which is is dependent on, among other things, the network service.

I did not register any parameters for it.  The registry entries I used
were:

Application: "c:\omniORB_280\omninames.exe"
AppDirectory: "c:\omniORB_280\log"

Instead, I defined the environment variable OMNINAMES_LOGDIR as
"c:\omniORB_280\log" in the system environment space.

I did put copies of the omniORB DLL's in the same directory as the
omniNames executable, this may be necessary due to the order in which
environment variables are defined.  Unfortunatele, srvany does not
appear to report to the event log, which explains the lack of
information there.

I hope this is helpful if Mike is still having problems.

Steve Brenneis

Mike Bendickson wrote:
> 
> I'm having a tough time with the srvany utility.  I can't get any
> windows app to run as a service using it.  I must be screwing
> something up with my registry settings as it does work in manual mode
> specifying the
> 
> Here are my registry settings under
> HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->Services->omniNames:
> 
> Application: "c:\omninames\omninames.exe"
> AppDirectory: "c:\omninames"
> Parameters: "-logdir c:\omninames\logdir -errlog
> c:\omninames\omninames.log"
> 
> Here's the error I'm getting:
> 
> Could not start the omniNames service on \\MYMACHINE
> Error 2140: An internal windows NT error occurred.
> 
> No hints show up in the Application Log.
> 
> To simplify things, I copied notepad.exe to c:\ and tried running that
> as a service:
> 
> Application: "c:\notepad.exe"
> AppDirectory: deleted
> Parameters: deleted
> 
> No good.  Same error.
> 
> But, if I delete the registry entries and specify the following in the
> Startup Parameters field in the services control panel window:
> 
> c:\\omninames\\omninames.exe -logdir c:\\omninames\\logdir -errlog
> c:\\omninames\\logdir\\omninames.errlog
> 
> and start it manually, it works fine.
> 
> Any ideas?
> 
> Thanks,
> -Mike