[Zope-DB] ZcxOracleDA configuration assistance

2009-08-17 Thread DMurphy
Greetings. I'm trying to set up cx_Oracle
and ZcxOracleDA on a Plone/Zope server to allow access from our Plone site
to our Oracle database. I'm working with one of our developers who was
able to successfully get this working on the test environment on his Windows
workstation, but getting it set up on our Linux (SLES10, 64-bit) server
is proving a little more interesting. Here's what we've done so far:1. Installed Oracle Instant Client 10.2.0.4
(which matches our server) Basic and SDK packages as noted in cx_Oracle
documentation. Copied over a tnsnames.ora file from another server.2. Installed cx_Oracle 5.0.2 (built
from source using Plone's Python). We successfully ran a simple Python
script at this point to verify connectivity with the Oracle database.3. Untarred ZcxOracleDA 0.6 into the
Zope server's products directory and restarted the Zope cluster. (Note:
There are a few other things I'm leaving out at this point unless they
become relevant... we had a couple of other issues that we managed to work
through ourselves.)At this point, we check the Zope client
log:--2009-08-13T14:17:30 ERROR Application
Couldn't install ZcxOracleDATraceback (most recent call last): File /opt/Plone-3.1/zeocluster/parts/zope2/lib/python/OFS/Application.py,
line 758, in install_product  global_dict, global_dict,
silly) File /opt/Plone-3.1/zeocluster/products/ZcxOracleDA/__init__.py,
line 20, in ?  import DA File /opt/Plone-3.1/zeocluster/products/ZcxOracleDA/DA.py,
line 15, in ?  from db import DB File /opt/Plone-3.1/zeocluster/products/ZcxOracleDA/db.py,
line 14, in ?  import cx_Oracle, datetime File build/bdist.linux-x86_64/egg/cx_Oracle.py,
line 7, in ? File build/bdist.linux-x86_64/egg/cx_Oracle.py,
line 6, in __bootstrap__ImportError: libclntsh.so.10.1: cannot
open shared object file: No such file or directory--$ORACLE_HOME and $LD_LIBRARY_PATH are
being exported from ~/.profile as recommended in the cx_Oracle build document.
They are:--kmiweb01:~ # echo $ORACLE_HOME/usr/lib/oracle/10.2.0.4/client64/libkmiweb01:~ # echo $LD_LIBRARY_PATH:/usr/lib/oracle/10.2.0.4/client64/libkmiweb01:~ # ls -la $ORACLE_HOMEtotal 98648drwxr-xr-x 4 root root  
4096 Aug 13 09:24 .drwxr-xr-x 4 root root  
4096 Jul 31 11:17 ..lrwxrwxrwx 1 root root  
 17 Jul 31 14:11 libclntsh.so - libclntsh.so.10.1-rw-r--r-- 1 root root 21038613 Mar
12 2008 libclntsh.so.10.1-rw-r--r-- 1 root root 3796601
Mar 12 2008 libnnz10.solrwxrwxrwx 1 root root  
 15 Jul 31 14:11 libocci.so - libocci.so.10.1-rw-r--r-- 1 root root 1664116
Mar 12 2008 libocci.so.10.1-rw-r--r-- 1 root root 72674185 Mar
12 2008 libociei.so-rw-r--r-- 1 root root  138033
Mar 12 2008 libocijdbc10.sodrwxr-xr-x 3 root root  
4096 Aug 13 09:24 network-rw-r--r-- 1 root root 1555682
Mar 12 2008 ojdbc14.jardrwxrwxr-x 4 root root  
4096 Mar 12 2008 sdkkmiweb01:~ #--At this point, we're fairly mystified.
The file that ZcxOracleDA's install ultimately complains about is indeed
in $ORACLE_HOME, where I would expect it to be looking. We're still able
to manually start Plone's Python and import cx_Oracle just fine. Does anyone
have any suggestions?Thank you,David Murphy
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] ZcxOracleDA configuration assistance

2009-08-17 Thread Dan Fairs
   At this point, we're fairly mystified. The file that ZcxOracleDA's
   install ultimately complains about is indeed in $ORACLE_HOME,  
 where I
   would expect it to be looking. We're still able to manually start
   Plone's Python and import cx_Oracle just fine. Does anyone have  
 any
   suggestions?
 
  Given that it works when you run Python manually but not when you  
 start
  the cluster the problem is likely to be that your Zope user  
 doesn't have
  the right permissions to access the library.

 Thanks for the response. Plone's documentation says that for the  
 type of install we did, Zope should run as the user plone (I  
 verified this with ps). Unfortunately, even if I chown everything in  
 $ORACLE_HOME to user plone and restart the cluster again, the error  
 remains the same.



Are the $ORACLE_HOME and $LD_LIBRARY_PATH variables exported for the  
user that Zope is running as? You didn't say whether your test script  
was run as that user or some other user (and hence for whom those  
variables were exported).

Cheers,
Dan

--
Dan Fairs d...@fezconsulting.com | http://www.fezconsulting.com/

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] ZcxOracleDA configuration assistance

2009-08-17 Thread DMurphy
Dan Fairs d...@fezconsulting.com wrote on 08/17/2009
02:31:51 PM: Re: [Zope-DB] ZcxOracleDA configuration assistance At this point, we're fairly mystified. The file that
ZcxOracleDA'sinstall ultimately complains about is indeed in $ORACLE_HOME,
  where Iwould expect it to be looking. We're still able to
manually startPlone's Python and import cx_Oracle just fine. Does
anyone have   anysuggestions? Given that it works when you run Python manually but not
when you   start   the cluster the problem is likely to be that your Zope user
  doesn't have   the right permissions to access the library.   Thanks for the response. Plone's documentation says that for
the   type of install we did, Zope should run as the user plone
(I   verified this with ps). Unfortunately, even if I chown everything
in   $ORACLE_HOME to user plone and restart the cluster again, the
error   remains the same.Are the $ORACLE_HOME and $LD_LIBRARY_PATH variables exported for the
 user that Zope is running as? You didn't say whether your test script
 was run as that user or some other user (and hence for whom those
 variables were exported).Ok, I think that was the prod I needed. I have the
variables exported from the profiles of both root and plone (under which
Zope should be running), but I apparently haven't set it in the right spot
yet. If I log in as plone, a manual import of cx_Oracle works fine. However,
if as root I sudo -u plone /.../python and try to import, I
get the same error returned by ZcxOracleDA. Haven't figured out how to
get around it yet, but it looks like this takes it out of the realm of
Zope and into basic system administration.Thanks,David Murphy
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db