Re: [cx-oracle-users] InterfaceError: Unable to acquire Oracle environment handle
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2010-03-19 14:56:15
|
>From your list of environment variables, these are the ones that are relevant and should be the same when running within the web server. Check to see if they are there and what values they have carefully! - This one sets the encoding used by Oracle; without it it will guess one on its own NLS_LANG=AMERICAN_AMERICA.AL32UTF8 - This one defines where to search for libraries; as stated elsewhere you can also set this in /etc/ld.so.conf which will make it unnecessary to set this variable and is probably preferable LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib: - This one sets the location where Oracle searches for configuration files like sqlnet.ora and tnsnames.ora; if you don't set this it looks in its own location defined differently for each platform but often it is $ORACLE_HOME/network/admin TNS_ADMIN=/var/lib/hudson - This one is required and tells Oracle where to find message files and everything else ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client Hopefully this helps. Anthony On Fri, Mar 19, 2010 at 8:23 AM, Jason Baker <jb...@ze...> wrote: > On Thu, Mar 18, 2010 at 11:52 PM, juhui <ph...@gm...> wrote: >> >> sorry, I said in django prjects. >> I have encounter this Traceback several dasys before . >> may be the Python script can't get the environment var ORACLE_HOME >> add the two lines to your scripts ,the value depends on you environment . > > I believe the ORACLE_HOME variable is set properly. I'm unable to reproduce > the issue when I log in to the server under the same user. So I think it's > some kind of environment variable issue. However, I don't seem to be able > to figure out what it is. For reference, here are the environment variables > when I log in to the server myself: > > HOSTNAME=inftest01 > TERM=xterm > SHELL=/bin/bash > HISTSIZE=1000 > KDE_NO_IPV6=1 > NLS_LANG=AMERICAN_AMERICA.AL32UTF8 > USER=hudson > LS_COLORS=no=00:fi=00:di=00 > LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/../lib/i386:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib: > KDEDIR=/usr > PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin:/var/lib/hudson/usr/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin > MAIL=/var/spool/mail/hudson > TNS_ADMIN=/var/lib/hudson > PWD=/var/lib/hudson > INPUTRC=/etc/inputrc > KDE_IS_PRELINKED=1 > LANG=en_US.UTF-8 > PS1=\W > SQLPATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/sqlplus > SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass > HOME=/var/lib/hudson > SHLVL=3 > LOGNAME=hudson > LESSOPEN=|/usr/bin/lesspipe.sh %s > ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client > G_BROKEN_FILENAMES=1 > _=/bin/env > > ...I don't see anything there that should cause a problem. > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |