Environment variables being ignored
Posted in 2010
After installing IDS 11.50.FC5 on AIX, the poster found oninit, onstat and ISM behaved as if INFORMIXDIR and INFORMIXSERVER weren't set (defaulting to /usr/informix and a NULL server), even though echo showed correct values. Art Kagel pointed out the variables were set but not exported, so child processes never saw them; adding export fixed it. Follow-ups noted ksh/bash only need re-export for new variables while Bourne shell always does, and one poster suggested putting $INFORMIXDIR/bin first in PATH.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Platform-Specific Issues
Hello all:
I just finished installing 11.50.FC5 AIX 64 bit and found that ISM couldn't be
initialized (as root) because INFORMIXDIR was not set, but running "echo
$INFORMIXDIR" will show that the variable is set to the actual install
directory (/opt/IBM/informix).
The same goes when I tried to run oninit -i. The response was "Error: could
not access INFORMIXDIR /usr/informix." once again checking for INFORMIXDIR
shows /opt/IBM/informix as set.
I've set up a symbolic link on /usr/informix to point to /opt/IBM/informix and
this time a test with onstat shows "shared memory not initialized for
INFORMIXSERVER '<NULL>'". The INFORMIXSERVER variable is set to 'vr'
It seems that somehow the environment variables are being ignored by ISM and
IDS. I have other applications in the same server the have their own set of
environments variables and they don't seem to be affected.
These are my environment settings:
INFORMIXDIR=/opt/IBM/informix
PATH=$PATH:$INFORMIXDIR/bin
INFORMIXSERVER=vr
Has anyone seen this before?
Any help would be greatly appreciated
Maybe it's set but not exported. Does "export" show INFORMIXDIR and the
other required variables?
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Tue, Sep 7, 2010 at 12:28 PM, RAFAEL DAVILA <rdavila@voicerite.com>wrote:
> Hello all:
>
> I just finished installing 11.50.FC5 AIX 64 bit and found that ISM couldn't
> be
> initialized (as root) because INFORMIXDIR was not set, but running "echo
> $INFORMIXDIR" will show that the variable is set to the actual install
> directory (/opt/IBM/informix).
>
> The same goes when I tried to run oninit -i. The response was "Error: could
> not access INFORMIXDIR /usr/informix." once again checking for INFORMIXDIR
> shows /opt/IBM/informix as set.
>
> I've set up a symbolic link on /usr/informix to point to /opt/IBM/informix
> and
> this time a test with onstat shows "shared memory not initialized for
> INFORMIXSERVER '<NULL>'". The INFORMIXSERVER variable is set to 'vr'
>
> It seems that somehow the environment variables are being ignored by ISM
> and
> IDS. I have other applications in the same server the have their own set of
> environments variables and they don't seem to be affected.
>
> These are my environment settings:
> INFORMIXDIR=/opt/IBM/informix
> PATH=$PATH:$INFORMIXDIR/bin
> INFORMIXSERVER=vr>
> Has anyone seen this before?
>
> Any help would be greatly appreciated
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0016e644c374e6381e048fae286b
Well, I'll be ...(put expletitive of your choice here)... In all my installations since IDS10 to today, I have never used "export" when setting the variables, I know because I just reviewed those installations. Thank you very much.
Could be you were in a different shell type? (bash vs csh for example) Jonathon Wyza CX & CBORD System Administrator CX Programmer/Analyst Administrative Computing Bethel College (574)-257-3381 AIM: Iamwyza jonathon.wyza@bethelcollege.edu ============================== SLES 11x64 & IDS 11.50.FC6 "Don't document the problem, fix it." - Atli Björgvin Oddsson -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of RAFAEL DAVILA Sent: Tuesday, September 07, 2010 1:13 PM To: ids@iiug.org Subject: Re: Environment variables being ignored [21198] Well, I'll be ...(put expletitive of your choice here)... In all my installations since IDS10 to today, I have never used "export" when setting the variables, I know because I just reviewed those installations. Thank you very much. ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
Bash requires exporting as well. Csh,. no. However, more likely, the vars had previously been exported perhaps by the profile and the OP was just changing the values. Ksh and bash do not require you to re-export just to modify the variables exported value. However, in Bourne shell (sh) you always have to export every change. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Tue, Sep 7, 2010 at 1:18 PM, Wyza, Jonathon <wyzaj@bethelcollege.edu>wrote: > Could be you were in a different shell type? (bash vs csh for example) > > Jonathon Wyza > CX & CBORD System Administrator > CX Programmer/Analyst > Administrative Computing > Bethel College > (574)-257-3381 > AIM: Iamwyza > jonathon.wyza@bethelcollege.edu > ============================== > SLES 11x64 & IDS 11.50.FC6 > > "Don't document the problem, fix it." > - Atli Björgvin Oddsson > > -----Original Message----- > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of > RAFAEL > DAVILA > Sent: Tuesday, September 07, 2010 1:13 PM > To: ids@iiug.org > Subject: Re: Environment variables being ignored [21198] > > Well, I'll be ...(put expletitive of your choice here)... > > In all my installations since IDS10 to today, I have never used "export" > when > setting the variables, I know because I just reviewed those installations. > > Thank you very much. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --0016e68bd3fefa7f13048faf5138
In your PATH, try putting $INFORMIXDIR/bin 1st. I had a similar problem a while back that was really hard to diagnose but that was it.