[Zope] Zope/Linux/Oracle - Cannot establish DB connection
Nerlich, Andrew
ajn@sosos.com.au
Tue, 4 Jan 2000 09:34:15 +1100
I have successfully installed Zope-2.0.1 (from the RPM) and ZOracleDA-2.1.0
over RedHat 6.0 for Intel x86. I am using Oracle 8.0.5.0.0 for Linux which
runs SQLPlus, etc. just fine.
The ZOracleDA install passes the DCOracle_test.py script when run from root
and the dba account, so AFAIK everything s/b hunky dory and I have
established (to myself at least) that I am not a complete moron.
However, I am unable to set up a ZOracleDA connection and connect to Oracle.
I can set up a connection object without connecting immediately, but
subsequent connection attempts on this object fail. The browser (NC 4.6)
gives me a "The document returned no data. Try again later or contact the
server's administrator." message.
Inspection of the /var/zope directory shows a sqlnet.log file which contains
the following connection string:
(DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=oracle)(ARGV0=oracle)(ARGS='(DE
SCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')(DETACH=NO))(CONNECT_DATA=(C
ID=(PROGRAM=)(HOST=localhost.localdomain)(USER=nobody))))
This fails with a number of errors
TNS-12206
TNS-12545
TNS-00515
The Linux distro of Oracle does not include error message docs :-( But a
copy of the WinNT docs I have does not include TNS messages over c TNS-05000
but does mention TNS-00515. This is a "Target not found" message - meaning
either the Oracle executable cannot be found or the node cannot be found.The
documentation indicates the the ORACLE_SID must be included in the bequeath
protocal connection string, and it is notably absent from the above.
I have put all my Oracle environment variables (ORACLE_SID, ORACLE_HOME,
etc., and a PATH entry to the Oracle /bin directory) in /etc/profile.
However, I am using nobody as the Zope user ID, and I cannot remember
whether a non-login account such as nobody will execute /etc/profile or not.
If not, how is Zope going to find out where oracle is and what the SID is?
Should I use another account or is there some other way to pass the
environment variables to ZOracleDA?
Or is there some other problem? I have looked at various pieces of code, but
have done no work with Python before, and haven't done anything
professionally with Unix or Oracle for over 12 months, and that was a a
developer, not a DBA.
Any ideas as to how to attack this problem will be gratefully received
TIA
Andrew
Andrew Nerlich
Strategic Operating Solutions Pty Ltd
(02) 9966 8707 0418 407 833
ajn@sosos.com.au