Discussion:
[omniORB] environment variables vs. config file
AaronCloyd
2009-03-20 01:04:22 UTC
Permalink
I have my omniORB.cfg file setup properly with several parameters. I would
like to be able to set environment variables for all of the options instead.
I have been successful with all of these except one.

This is my current config file:
InitRef = NameService=corbaname::myHostName:myPort/NameService
id = omniORB4
giopMaxMsgSize = 160000000

I was able to set the ORBid and ORBgiopMaxMsgSize envars just fine. I was
not able to get an envar for ORBInitRef to work. Is this environment
variable supported? Is there a list of available envars or config file
options available somewhere?

The reason I want to do this, is because multiple users are running
omniNames on the same machine with different ports. It would be easy to set
this envar separately for each user. I would prefer not to have to pass this
through the command line.

Thanks for your time.
--
View this message in context: http://www.nabble.com/environment-variables-vs.-config-file-tp22606990p22606990.html
Sent from the OmniORB - User mailing list archive at Nabble.com.
Duncan Grisby
2009-03-26 21:15:11 UTC
Permalink
Post by AaronCloyd
I have my omniORB.cfg file setup properly with several parameters. I would
like to be able to set environment variables for all of the options instead.
I have been successful with all of these except one.
InitRef = NameService=corbaname::myHostName:myPort/NameService
id = omniORB4
giopMaxMsgSize = 160000000
I was able to set the ORBid and ORBgiopMaxMsgSize envars just fine. I was
not able to get an envar for ORBInitRef to work. Is this environment
variable supported? Is there a list of available envars or config file
options available somewhere?
It works fine for me. What exactly did you do, and what went wrong?

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Aaron Cloyd
2009-03-26 21:43:57 UTC
Permalink
Thanks for the reply.

I've tried sourcing this:
setenv ORBid omniORB4
setenv ORBInitRef NameService=corbaname::host:port/NameService
setenv ORBgiopMaxMsgSize 160000000

And I get this error:
CORBA::Exception Thrown: NO_RESOURCES
Unable to get Naming Service

The ORBid and ORBgipMaxMsgSize get through fine. As soon as I add the
InitRef line back into the config file or the command line, it starts up
fine.

Bash is what's shown in the documentation that I saw, so I tried that too.
Did the same thing.

I also tried different different formats like these:
setenv ORBInitRef NameService=corbaname::"host":"port"
setenv ORBInitRef corbaname::"host":"port"
setenv InitRef NameService=corbaname::"host":"port"/NameService

Thanks for any advice.
Post by AaronCloyd
Post by AaronCloyd
I have my omniORB.cfg file setup properly with several parameters. I
would
Post by AaronCloyd
like to be able to set environment variables for all of the options
instead.
Post by AaronCloyd
I have been successful with all of these except one.
InitRef = NameService=corbaname::myHostName:myPort/NameService
id = omniORB4
giopMaxMsgSize = 160000000
I was able to set the ORBid and ORBgiopMaxMsgSize envars just fine. I was
not able to get an envar for ORBInitRef to work. Is this environment
variable supported? Is there a list of available envars or config file
options available somewhere?
It works fine for me. What exactly did you do, and what went wrong?
Cheers,
Duncan.
--
-- Duncan Grisby --
-- http://www.grisby.org --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090326/88caa34b/attachment.htm
Duncan Grisby
2009-03-26 21:53:58 UTC
Permalink
? setenv ORBid omniORB4
? setenv ORBInitRef NameService=corbaname::host:port/NameService
? setenv ORBgiopMaxMsgSize 160000000
? CORBA::Exception Thrown: NO_RESOURCES
? Unable to get Naming Service
That looks like csh. It works for me:

[***@home ~]$ nameclt list
Cannot resolve the root context.
Have you set up the configuration file properly?
[***@home ~]$ setenv ORBInitRef NameService=corbaname::localhost
[***@home ~]$ nameclt list
test.my_context/

What version of omniORB are you using?

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Aaron Cloyd
2009-03-26 22:04:21 UTC
Permalink
Ya, that works for me too.

So it looks like that env is getting lost somewhere between setting it, and
starting omniOrb. I'm using omniORB 4.1.0 btw.

Thanks for pointing me in the right direction.
Post by Duncan Grisby
Post by Aaron Cloyd
setenv ORBid omniORB4
setenv ORBInitRef NameService=corbaname::host:port/NameService
setenv ORBgiopMaxMsgSize 160000000
CORBA::Exception Thrown: NO_RESOURCES
Unable to get Naming Service
Cannot resolve the root context.
Have you set up the configuration file properly?
test.my_context/
What version of omniORB are you using?
Duncan.
--
-- Duncan Grisby --
-- http://www.grisby.org --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090326/8d1642de/attachment.htm
Loading...