Thread: [cx-oracle-users] Unable to acquire Oracle environment handle
Brought to you by:
atuining
From: Marco De P. <dep...@gm...> - 2011-02-15 16:24:14
|
Hi, the problem is not systematic and I wasn't able to infere a "pattern" for it CentoOS 5.4 oracle-instantclient-basic-10.2.0.4-1.i386.zip oracle-instantclient-devel-10.2.0.4-1.i386.zip cx_Oracle 5.4 Django 1.2.5 any idea? I wolud be gratefull for any hint Marco |
From: Anthony T. <ant...@gm...> - 2011-02-15 17:33:34
|
Hi, This has always been some problem with a missing value for ORACLE_HOME and/or LD_LIBRARY_PATH. Check your environment variables. Since this is running in Django, a web server, sometimes these environment variables are not set globally. You can always "force" this issue by issuing calls like this prior to creating a connection with cx_Oracle. os.environ["ORACLE_HOME"] = /the/path/to/your/oracle/home LD_LIBRARY_PATH (or equivalent method of setting the shared library search path) __must__ be set prior to starting a process so you'll need to make sure that is done globally or in your web server configuration files somewhere. Hope that helps. Anthony On Tue, Feb 15, 2011 at 9:20 AM, Marco De Paoli <dep...@gm...> wrote: > Hi, > the problem is not systematic and I wasn't able to infere a "pattern" for it > > CentoOS 5.4 > oracle-instantclient-basic-10.2.0.4-1.i386.zip > oracle-instantclient-devel-10.2.0.4-1.i386.zip > cx_Oracle 5.4 > Django 1.2.5 > > any idea? > I wolud be gratefull for any hint > > Marco > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Mark H. <mh...@pi...> - 2011-02-15 19:02:24
|
On 2/15/11 9:33 AM, Anthony Tuininga wrote: > Hi, > > This has always been some problem with a missing value for ORACLE_HOME > and/or LD_LIBRARY_PATH. Check your environment variables. Since this idea? >> I wolud be gratefull for any hint Ugh, environment variables, what a pain. Here's how I installed so that no environment variables are required: http://stackoverflow.com/questions/764871/installing-oracle-instantclient-on-linux-without-setting-environment-variables |
From: Anthony T. <ant...@gm...> - 2011-02-15 21:47:20
|
On Tue, Feb 15, 2011 at 12:02 PM, Mark Harrison <mh...@pi...> wrote: > On 2/15/11 9:33 AM, Anthony Tuininga wrote: >> Hi, >> >> This has always been some problem with a missing value for ORACLE_HOME >> and/or LD_LIBRARY_PATH. Check your environment variables. Since this > idea? > >>> I wolud be gratefull for any hint > > Ugh, environment variables, what a pain. > Here's how I installed so that no environment variables are required: > > http://stackoverflow.com/questions/764871/installing-oracle-instantclient-on-linux-without-setting-environment-variables Thanks for that. Using the default values across the board and not having to set custom values for environment variables can be highly convenient, especially for the web server case where its more work to set its environment. :-) Anthony |
From: Marco De P. <dep...@gm...> - 2011-02-16 08:18:16
|
First of all, thanks very much for your hints Sorry, maybe I have not been clear: the problem is not systematic same xterm, same user, same shell, same environment... sometimes it works, sometimes it doesn't Then I have rebuilt and installed from 5.0.4 sources but the problem is the same Eventually I've tried tu use cx_Oracle from svn trunk: check-out and build are ok but I can't execute the install, this is the message [root@bagvapp trunk]# python setup.py install running install running bdist_egg running egg_info writing cx_Oracle.egg-info/PKG-INFO writing top-level names to cx_Oracle.egg-info/top_level.txt writing dependency_links to cx_Oracle.egg-info/dependency_links.txt Traceback (most recent call last): File "setup.py", line 368, in ? classifiers = classifiers) File "/usr/lib/python2.4/distutils/core.py", line 149, in setup dist.run_commands() File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands self.run_command(cmd) File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/usr/lib/python2.4/site-packages/setuptools/command/install.py", line 76, in run self.do_egg_install() File "/usr/lib/python2.4/site-packages/setuptools/command/install.py", line 92, in do_egg_install self.run_command('bdist_egg') File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/usr/lib/python2.4/site-packages/setuptools/command/bdist_egg.py", line 167, in run self.run_command("egg_info") File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 171, in run self.find_sources() File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 252, in find_sources mm.run() File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 306, in run self.add_defaults() File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 333, in add_defaults rcfiles = list(walk_revctrl()) File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", line 45, in walk_revctrl for item in ep.load()(dirname): File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", line 52, in _default_revctrl for path in finder(dirname,path): File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", line 98, in entries_finder log.warn("unrecognized .svn/entries format in %s", dirname) NameError: global name 'log' is not defined Marco On Tue, Feb 15, 2011 at 10:47 PM, Anthony Tuininga < ant...@gm...> wrote: > On Tue, Feb 15, 2011 at 12:02 PM, Mark Harrison <mh...@pi...> wrote: > > On 2/15/11 9:33 AM, Anthony Tuininga wrote: > >> Hi, > >> > >> This has always been some problem with a missing value for ORACLE_HOME > >> and/or LD_LIBRARY_PATH. Check your environment variables. Since this > > idea? > > > >>> I wolud be gratefull for any hint > > > > Ugh, environment variables, what a pain. > > Here's how I installed so that no environment variables are required: > > > > > http://stackoverflow.com/questions/764871/installing-oracle-instantclient-on-linux-without-setting-environment-variables > > Thanks for that. Using the default values across the board and not > having to set custom values for environment variables can be highly > convenient, especially for the web server case where its more work to > set its environment. :-) > > Anthony > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Mark H. <mh...@pi...> - 2011-02-16 16:45:31
|
On 2/16/11 12:18 AM, Marco De Paoli wrote: > First of all, thanks very much for your hints > > Sorry, maybe I have not been clear: the problem is not systematic > > same xterm, same user, same shell, same environment... > sometimes it works, sometimes it doesn't > > Then I have rebuilt and installed from 5.0.4 sources but the problem is the same > > Eventually I've tried tu use cx_Oracle from svn trunk: check-out and build are ok but I can't execute the install, this is the message maybe there's some versionitis with the latest svn trunk and py 2.4? Here's a couple of things to try: - try installing from a released tar file - try installing from one of the older released tar files (in case there's some 2.4 breakage) - install or build a newer python, and one of the tar files above > > [root@bagvapp trunk]# python setup.py install > running install > running bdist_egg > running egg_info > writing cx_Oracle.egg-info/PKG-INFO > writing top-level names to cx_Oracle.egg-info/top_level.txt > writing dependency_links to cx_Oracle.egg-info/dependency_links.txt > Traceback (most recent call last): > File "setup.py", line 368, in ? > classifiers = classifiers) > File "/usr/lib/python2.4/distutils/core.py", line 149, in setup > dist.run_commands() > File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands > self.run_command(cmd) > File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > cmd_obj.run() > File "/usr/lib/python2.4/site-packages/setuptools/command/install.py", line 76, in run > self.do_egg_install() > File "/usr/lib/python2.4/site-packages/setuptools/command/install.py", line 92, in do_egg_install > self.run_command('bdist_egg') > File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command > self.distribution.run_command(command) > File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > cmd_obj.run() > File "/usr/lib/python2.4/site-packages/setuptools/command/bdist_egg.py", line 167, in run > self.run_command("egg_info") > File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command > self.distribution.run_command(command) > File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > cmd_obj.run() > File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 171, in run > self.find_sources() > File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 252, in find_sources > mm.run() > File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 306, in run > self.add_defaults() > File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 333, in add_defaults > rcfiles = list(walk_revctrl()) > File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", line 45, in walk_revctrl > for item in ep.load()(dirname): > File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", line 52, in _default_revctrl > for path in finder(dirname,path): > File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", line 98, in entries_finder > log.warn("unrecognized .svn/entries format in %s", dirname) > NameError: global name 'log' is not defined > > Marco > > On Tue, Feb 15, 2011 at 10:47 PM, Anthony Tuininga <ant...@gm... <mailto:ant...@gm...>> wrote: > > On Tue, Feb 15, 2011 at 12:02 PM, Mark Harrison <mh...@pi... <mailto:mh...@pi...>> wrote: > > On 2/15/11 9:33 AM, Anthony Tuininga wrote: > >> Hi, > >> > >> This has always been some problem with a missing value for ORACLE_HOME > >> and/or LD_LIBRARY_PATH. Check your environment variables. Since this > > idea? > > > >>> I wolud be gratefull for any hint > > > > Ugh, environment variables, what a pain. > > Here's how I installed so that no environment variables are required: > > > > http://stackoverflow.com/questions/764871/installing-oracle-instantclient-on-linux-without-setting-environment-variables > > Thanks for that. Using the default values across the board and not > having to set custom values for environment variables can be highly > convenient, especially for the web server case where its more work to > set its environment. :-) > > Anthony > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... <mailto:cx-...@li...> > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Marco De P. <dep...@gm...> - 2011-02-16 17:00:45
|
On Wed, Feb 16, 2011 at 5:45 PM, Mark Harrison <mh...@pi...> wrote: > > Eventually I've tried tu use cx_Oracle from svn trunk: check-out and > build are ok but I can't execute the install, this is the message > > maybe there's some versionitis with the latest svn trunk and py 2.4? > > Here's a couple of things to try: > > > - try installing from a released tar file > cx_Oracle 5.0.4 source package build and install are ok maybe something introduced recently? > - try installing from one of the older released tar files > (in case there's some 2.4 breakage) > - install or build a newer python, and one of the tar files above > > > > > [root@bagvapp trunk]# python setup.py install > > running install > > running bdist_egg > > running egg_info > > writing cx_Oracle.egg-info/PKG-INFO > > writing top-level names to cx_Oracle.egg-info/top_level.txt > > writing dependency_links to cx_Oracle.egg-info/dependency_links.txt > > Traceback (most recent call last): > > File "setup.py", line 368, in ? > > classifiers = classifiers) > > File "/usr/lib/python2.4/distutils/core.py", line 149, in setup > > dist.run_commands() > > File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands > > self.run_command(cmd) > > File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > > cmd_obj.run() > > File "/usr/lib/python2.4/site-packages/setuptools/command/install.py", > line 76, in run > > self.do_egg_install() > > File "/usr/lib/python2.4/site-packages/setuptools/command/install.py", > line 92, in do_egg_install > > self.run_command('bdist_egg') > > File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command > > self.distribution.run_command(command) > > File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > > cmd_obj.run() > > File > "/usr/lib/python2.4/site-packages/setuptools/command/bdist_egg.py", line > 167, in run > > self.run_command("egg_info") > > File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command > > self.distribution.run_command(command) > > File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > > cmd_obj.run() > > File > "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 171, > in run > > self.find_sources() > > File > "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 252, > in find_sources > > mm.run() > > File > "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 306, > in run > > self.add_defaults() > > File > "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 333, > in add_defaults > > rcfiles = list(walk_revctrl()) > > File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", > line 45, in walk_revctrl > > for item in ep.load()(dirname): > > File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", > line 52, in _default_revctrl > > for path in finder(dirname,path): > > File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", > line 98, in entries_finder > > log.warn("unrecognized .svn/entries format in %s", dirname) > > NameError: global name 'log' is not defined > > > |
From: Marco De P. <dep...@gm...> - 2011-02-16 16:54:52
|
everything works if I force the rebuild of a file named tests.pyc in a django folder (via rm tests.pyc or via touch tests.pyc) if the file is already there I obtain "Unable to acquire Oracle environment handle" Maybe it's an issue on the django side, but I can't undestand what could be wrong... django is a pure python package and the question is: how can django influence the OCIEnvNlsCreate call in Environment.c that, as far as I know, doesn't get any login but just initialize a client data structure?!? Marco On Wed, Feb 16, 2011 at 9:18 AM, Marco De Paoli <dep...@gm...> wrote: > First of all, thanks very much for your hints > > Sorry, maybe I have not been clear: the problem is not systematic > > same xterm, same user, same shell, same environment... > sometimes it works, sometimes it doesn't > > Then I have rebuilt and installed from 5.0.4 sources but the problem is the > same > > Eventually I've tried tu use cx_Oracle from svn trunk: check-out and build > are ok but I can't execute the install, this is the message > > [root@bagvapp trunk]# python setup.py install > running install > running bdist_egg > running egg_info > writing cx_Oracle.egg-info/PKG-INFO > writing top-level names to cx_Oracle.egg-info/top_level.txt > writing dependency_links to cx_Oracle.egg-info/dependency_links.txt > Traceback (most recent call last): > File "setup.py", line 368, in ? > classifiers = classifiers) > File "/usr/lib/python2.4/distutils/core.py", line 149, in setup > dist.run_commands() > File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands > self.run_command(cmd) > File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > cmd_obj.run() > File "/usr/lib/python2.4/site-packages/setuptools/command/install.py", > line 76, in run > self.do_egg_install() > File "/usr/lib/python2.4/site-packages/setuptools/command/install.py", > line 92, in do_egg_install > self.run_command('bdist_egg') > File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command > self.distribution.run_command(command) > File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > cmd_obj.run() > File "/usr/lib/python2.4/site-packages/setuptools/command/bdist_egg.py", > line 167, in run > self.run_command("egg_info") > File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command > self.distribution.run_command(command) > File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command > cmd_obj.run() > File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", > line 171, in run > self.find_sources() > File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", > line 252, in find_sources > mm.run() > File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", > line 306, in run > self.add_defaults() > File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", > line 333, in add_defaults > rcfiles = list(walk_revctrl()) > File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", line > 45, in walk_revctrl > for item in ep.load()(dirname): > File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", line > 52, in _default_revctrl > for path in finder(dirname,path): > File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", line > 98, in entries_finder > log.warn("unrecognized .svn/entries format in %s", dirname) > NameError: global name 'log' is not defined > > Marco > > > On Tue, Feb 15, 2011 at 10:47 PM, Anthony Tuininga < > ant...@gm...> wrote: > >> On Tue, Feb 15, 2011 at 12:02 PM, Mark Harrison <mh...@pi...> wrote: >> > On 2/15/11 9:33 AM, Anthony Tuininga wrote: >> >> Hi, >> >> >> >> This has always been some problem with a missing value for ORACLE_HOME >> >> and/or LD_LIBRARY_PATH. Check your environment variables. Since this >> > idea? >> > >> >>> I wolud be gratefull for any hint >> > >> > Ugh, environment variables, what a pain. >> > Here's how I installed so that no environment variables are required: >> > >> > >> http://stackoverflow.com/questions/764871/installing-oracle-instantclient-on-linux-without-setting-environment-variables >> >> Thanks for that. Using the default values across the board and not >> having to set custom values for environment variables can be highly >> convenient, especially for the web server case where its more work to >> set its environment. :-) >> >> Anthony >> >> >> ------------------------------------------------------------------------------ >> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: >> Pinpoint memory and threading errors before they happen. >> Find and fix more than 250 security defects in the development cycle. >> Locate bottlenecks in serial and parallel code that limit performance. >> http://p.sf.net/sfu/intel-dev2devfeb >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > |
From: Mark H. <mh...@pi...> - 2011-02-16 18:57:33
|
On 2/16/11 8:54 AM, Marco De Paoli wrote: > everything works if I force the rebuild of a file named tests.pyc in a django folder > (via rm tests.pyc or via touch tests.pyc) > > if the file is already there I obtain "Unable to acquire Oracle environment handle" > > Maybe it's an issue on the django side, but I can't undestand what could be wrong... > > django is a pure python package and the question is: how can django influence the OCIEnvNlsCreate call in Environment.c that, as far as I know, doesn't get any login but just initialize a client data structure?!? that one is weird. maybe you can do something like this: edit one or more of the django files, and put in conn=cx_Oracle.connect(...) calls. hopefully, the one at the very top of the first django file will be successful. eventually you will hit one that fails. then you can move the connect lines around to narrow down where the bad thing is happening. |
From: Marco De P. <dep...@gm...> - 2011-02-17 08:37:45
|
Thanks, I will try to follow your advice I'll let you know Marco On Wed, Feb 16, 2011 at 7:57 PM, Mark Harrison <mh...@pi...> wrote: > On 2/16/11 8:54 AM, Marco De Paoli wrote: > > everything works if I force the rebuild of a file named tests.pyc in a > django folder > > (via rm tests.pyc or via touch tests.pyc) > > > > if the file is already there I obtain "Unable to acquire Oracle > environment handle" > > > > Maybe it's an issue on the django side, but I can't undestand what could > be wrong... > > > > django is a pure python package and the question is: how can django > influence the OCIEnvNlsCreate call in Environment.c that, as far as I know, > doesn't get any login but just initialize a client data structure?!? > > > that one is weird. maybe you can do something like this: > > edit one or more of the django files, and put in > > conn=cx_Oracle.connect(...) > > calls. > > hopefully, the one at the very top of the first django file will be > successful. > eventually you will hit one that fails. then you can move the connect > lines > around to narrow down where the bad thing is happening. > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Marco De P. <dep...@gm...> - 2011-02-17 16:49:55
|
> > On Wed, Feb 16, 2011 at 7:57 PM, Mark Harrison <mh...@pi...> wrote: > >> On 2/16/11 8:54 AM, Marco De Paoli wrote: >> > everything works if I force the rebuild of a file named tests.pyc in a >> django folder >> > (via rm tests.pyc or via touch tests.pyc) >> > >> > if the file is already there I obtain "Unable to acquire Oracle >> environment handle" >> > >> > Maybe it's an issue on the django side, but I can't undestand what could >> be wrong... >> > >> > django is a pure python package and the question is: how can django >> influence the OCIEnvNlsCreate call in Environment.c that, as far as I know, >> doesn't get any login but just initialize a client data structure?!? >> >> >> that one is weird. maybe you can do something like this: >> >> edit one or more of the django files, and put in >> >> conn=cx_Oracle.connect(...) >> >> calls. >> >> hopefully, the one at the very top of the first django file will be >> successful. >> eventually you will hit one that fails. then you can move the connect >> lines >> around to narrow down where the bad thing is happening. >> > I injected conn=cx_Oracle.connect(...) all around django sources sometimes it works, other times it doesn't: I save a django file and everything works fine, I try to lunch again and it doesn't work anymore then I remove a pyc file and it works again, I lunch again and it works, the third time it doesn't work anymore I'm sorry I cant' give you more precise infos... but I feel like I'm chasing ghosts :( Marco |
From: Marco De P. <dep...@gm...> - 2011-02-21 13:52:52
|
I am sorry to be so stressfull but things are becoming really really strange On the base of the last mails, I was thinking it was an environment variables problem, so I started to print all the environment just before cx_Oracle.connect. The values were always good but the connection sometimes worked and sometimes not (as I already said) So i decided to modify Environment.c to inject an explicit setenv statement just before OCIEnvNlsCreate call. The result was the same: the connection sometimes worked and sometimes not. At a certain point I inserted an explicit printf statement in file Connection.c. The printf statement is located just before the Environment_NewFromScratch call The result is that everything works ... the problem is that OCIEnvNlsCreate is completelly black-box for me, I can't debug it in any way: is there any other check I can do? thanks for your patience, Marco On Thu, Feb 17, 2011 at 5:49 PM, Marco De Paoli <dep...@gm...> wrote: > On Wed, Feb 16, 2011 at 7:57 PM, Mark Harrison <mh...@pi...> wrote: >> >>> On 2/16/11 8:54 AM, Marco De Paoli wrote: >>> > everything works if I force the rebuild of a file named tests.pyc in a >>> django folder >>> > (via rm tests.pyc or via touch tests.pyc) >>> > >>> > if the file is already there I obtain "Unable to acquire Oracle >>> environment handle" >>> > >>> > Maybe it's an issue on the django side, but I can't undestand what >>> could be wrong... >>> > >>> > django is a pure python package and the question is: how can django >>> influence the OCIEnvNlsCreate call in Environment.c that, as far as I know, >>> doesn't get any login but just initialize a client data structure?!? >>> >>> >>> that one is weird. maybe you can do something like this: >>> >>> edit one or more of the django files, and put in >>> >>> conn=cx_Oracle.connect(...) >>> >>> calls. >>> >>> hopefully, the one at the very top of the first django file will be >>> successful. >>> eventually you will hit one that fails. then you can move the connect >>> lines >>> around to narrow down where the bad thing is happening. >>> >> > I injected conn=cx_Oracle.connect(...) all around django sources > > sometimes it works, other times it doesn't: I save a django file and > everything works fine, I try to lunch again and it doesn't work anymore > then I remove a pyc file and it works again, I lunch again and it works, > the third time it doesn't work anymore > > I'm sorry I cant' give you more precise infos... but I feel like I'm > chasing ghosts :( > > Marco > |
From: Anthony T. <ant...@gm...> - 2011-02-21 18:21:21
|
That does indeed sound rather strange. OCIEnvNlsCreate() is an Oracle function so there is no way to debug this short of calling up Oracle and asking them for support. Is this a single threaded program? If it is multi-threaded you will need to set threaded mode to avoid strange problems -- perhaps ones like these. Are you opening/closing the connection multiple times in your program or just running a program over and over again and noting errors one time and not the next? I've never run into these problems myself so not sure how to help you further besides giving suggestions for debugging on your own! Anthony On Mon, Feb 21, 2011 at 6:52 AM, Marco De Paoli <dep...@gm...> wrote: > I am sorry to be so stressfull > but things are becoming really really strange > > On the base of the last mails, I was thinking it was an environment > variables problem, so I started to print all the environment just before > cx_Oracle.connect. The values were always good but the connection sometimes > worked and sometimes not (as I already said) > > So i decided to modify Environment.c to inject an explicit setenv statement > just before OCIEnvNlsCreate call. The result was the same: the connection > sometimes worked and sometimes not. > > At a certain point I inserted an explicit printf statement in file > Connection.c. The printf statement is located just before the > Environment_NewFromScratch call > > The result is that everything works > > ... the problem is that OCIEnvNlsCreate is completelly black-box for me, I > can't debug it in any way: is there any other check I can do? > > thanks for your patience, > Marco > > On Thu, Feb 17, 2011 at 5:49 PM, Marco De Paoli <dep...@gm...> wrote: >>> >>> On Wed, Feb 16, 2011 at 7:57 PM, Mark Harrison <mh...@pi...> wrote: >>>> >>>> On 2/16/11 8:54 AM, Marco De Paoli wrote: >>>> > everything works if I force the rebuild of a file named tests.pyc in a >>>> > django folder >>>> > (via rm tests.pyc or via touch tests.pyc) >>>> > >>>> > if the file is already there I obtain "Unable to acquire Oracle >>>> > environment handle" >>>> > >>>> > Maybe it's an issue on the django side, but I can't undestand what >>>> > could be wrong... >>>> > >>>> > django is a pure python package and the question is: how can django >>>> > influence the OCIEnvNlsCreate call in Environment.c that, as far as I know, >>>> > doesn't get any login but just initialize a client data structure?!? >>>> >>>> >>>> that one is weird. maybe you can do something like this: >>>> >>>> edit one or more of the django files, and put in >>>> >>>> conn=cx_Oracle.connect(...) >>>> >>>> calls. >>>> >>>> hopefully, the one at the very top of the first django file will be >>>> successful. >>>> eventually you will hit one that fails. then you can move the connect >>>> lines >>>> around to narrow down where the bad thing is happening. >> >> I injected conn=cx_Oracle.connect(...) all around django sources >> >> sometimes it works, other times it doesn't: I save a django file and >> everything works fine, I try to lunch again and it doesn't work anymore >> then I remove a pyc file and it works again, I lunch again and it works, >> the third time it doesn't work anymore >> >> I'm sorry I cant' give you more precise infos... but I feel like I'm >> chasing ghosts :( >> >> Marco > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Mark H. <mh...@pi...> - 2011-02-21 22:49:46
|
On 2/21/11 10:21 AM, Anthony Tuininga wrote: > That does indeed sound rather strange. OCIEnvNlsCreate() is an Oracle > function so there is no way to debug this short of calling up Oracle > and asking them for support. Is this a single threaded program? If it > is multi-threaded you will need to set threaded mode to avoid strange > problems -- perhaps ones like these. Are you opening/closing the > connection multiple times in your program or just running a program > over and over again and noting errors one time and not the next? I've > never run into these problems myself so not sure how to help you > further besides giving suggestions for debugging on your own! Possibly there's something conflicting in your system python build? Perhaps try building your own python executable may show something interesting. |
From: Marco De P. <dep...@gm...> - 2011-02-22 08:09:07
|
thanks for your advices Yes, it is a single thread program Yes, I'm running the program multiple times over and over again and noting errors one time and not the next, each run open/close the connection multiple times Ok, I'll try to build my python executable (maybe I could try to check specifically libc static/dynamic...) I'll let you know, Marco On Mon, Feb 21, 2011 at 11:49 PM, Mark Harrison <mh...@pi...> wrote: > On 2/21/11 10:21 AM, Anthony Tuininga wrote: > > That does indeed sound rather strange. OCIEnvNlsCreate() is an Oracle > > function so there is no way to debug this short of calling up Oracle > > and asking them for support. Is this a single threaded program? If it > > is multi-threaded you will need to set threaded mode to avoid strange > > problems -- perhaps ones like these. Are you opening/closing the > > connection multiple times in your program or just running a program > > over and over again and noting errors one time and not the next? I've > > never run into these problems myself so not sure how to help you > > further besides giving suggestions for debugging on your own! > > Possibly there's something conflicting in your system python build? > > Perhaps try building your own python executable may show something > interesting. > > > > ------------------------------------------------------------------------------ > Index, Search & Analyze Logs and other IT data in Real-Time with Splunk > Collect, index and harness all the fast moving IT data generated by your > applications, servers and devices whether physical, virtual or in the > cloud. > Deliver compliance at lower cost and gain new business insights. > Free Software Download: http://p.sf.net/sfu/splunk-dev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Marco De P. <dep...@gm...> - 2011-02-25 09:27:05
|
I built my own python executable but it doesn't show anything interesting So I rebuilt a complete environment from scratch using virtualenv and referring the python executable I built. Then I setup cx_Oracle, django and so on The result is that everything works fine I was unable to reproduce the crash any more I don't know exactly where the problem was, but maybe it was a problem with miss-alignment among shared libraries thank you very much for your advices I really apprecciated them :-) Marco On Tue, Feb 22, 2011 at 9:08 AM, Marco De Paoli <dep...@gm...> wrote: > thanks for your advices > > Yes, it is a single thread program > > Yes, I'm running the program multiple times over and over again and noting > errors one time and not the next, each run open/close the connection > multiple times > > Ok, I'll try to build my python executable (maybe I could try to check > specifically libc static/dynamic...) > > > I'll let you know, > Marco > > On Mon, Feb 21, 2011 at 11:49 PM, Mark Harrison <mh...@pi...> wrote: > >> On 2/21/11 10:21 AM, Anthony Tuininga wrote: >> > That does indeed sound rather strange. OCIEnvNlsCreate() is an Oracle >> > function so there is no way to debug this short of calling up Oracle >> > and asking them for support. Is this a single threaded program? If it >> > is multi-threaded you will need to set threaded mode to avoid strange >> > problems -- perhaps ones like these. Are you opening/closing the >> > connection multiple times in your program or just running a program >> > over and over again and noting errors one time and not the next? I've >> > never run into these problems myself so not sure how to help you >> > further besides giving suggestions for debugging on your own! >> >> Possibly there's something conflicting in your system python build? >> >> Perhaps try building your own python executable may show something >> interesting. >> >> >> >> ------------------------------------------------------------------------------ >> Index, Search & Analyze Logs and other IT data in Real-Time with Splunk >> Collect, index and harness all the fast moving IT data generated by your >> applications, servers and devices whether physical, virtual or in the >> cloud. >> Deliver compliance at lower cost and gain new business insights. >> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > |
From: Mark H. <mh...@pi...> - 2011-02-25 18:51:52
|
On 2/25/11 1:26 AM, Marco De Paoli wrote: > I built my own python executable but it doesn't show anything interesting > > So I rebuilt a complete environment from scratch using virtualenv and referring the python executable I built. Then I setup cx_Oracle, django and so on > > The result is that everything works fine I was unable to reproduce the crash any more > > I don't know exactly where the problem was, but maybe it was a problem with miss-alignment among shared libraries > > thank you very much for your advices > I really apprecciated them :-) You're welcome, glad everything is working! Nobody told me in school that so much of "computer science" would be "debugging shared library problems"! :-) |