[Spacewalk-list] Spacewalk with oracle standard edition errors
Matt Carey
cvstealth2000 at yahoo.com
Mon Oct 19 12:59:14 UTC 2009
Michael,
Thanks for the reply.
[root at spacewalk ~]# ldd `rpm -ql cx_Oracle | grep cx_Oracle.so`
linux-gate.so.1 => (0x009dd000)
libclntsh.so.10.1 => /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so.10.1 (0x00c11000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00110000)
libc.so.6 => /lib/libc.so.6 (0x00127000)
libnnz10.so => /usr/lib/oracle/10.2.0.4/client/lib/libnnz10.so (0x00360000)
libdl.so.2 => /lib/libdl.so.2 (0x0026b000)
libm.so.6 => /lib/libm.so.6 (0x00856000)
libnsl.so.1 => /lib/libnsl.so.1 (0x0026f000)
/lib/ld-linux.so.2 (0x00720000)
[root at spacewalk ~]# lsof -p `ps ax | awk '/[o]sa-dispatcher/ {print $1}' ` | grep oracle
osa-dispa 3183 root mem REG 253,7 17764670 1942698 /u01/app/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1
osa-dispa 3183 root mem REG 253,7 5480533 1943219 /u01/app/oracle/product/10.2.0/db_1/lib/libnnz10.so
[root at spacewalk ~]#
I did install the oracle-xe client libraries to satisfy the RPM deps when doing the yum install spacewalk:
[root at spacewalk ~]# rpm -qa oracle-instant\*
oracle-instantclient-sqlplus-10.2.0.4-1
oracle-instantclient-basic-10.2.0.4-1
oracle-instantclient-sqlplus-selinux-10.2-15.el5
oracle-instantclient-selinux-10.2-15.el5
So my client libraries are in /usr/lib/oracle and the database is running out of /u01/app/oracle. I did try to add the environment variables to the entire system by doing the following:
[root at spacewalk ~]# cat /etc/profile.d/oracle.sh
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TSH1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
What system calls or environment variables does the python stack use in order to get the Oracle instance information for the client libraries to connect with?
--Matt
________________________________
From: Michael Mraka <michael.mraka at redhat.com>
To: spacewalk-list at redhat.com
Sent: Mon, October 19, 2009 4:38:15 AM
Subject: Re: [Spacewalk-list] Spacewalk with oracle standard edition errors
Matt Carey wrote:
% I'm trying to get my Spacewalk instance to work with Oracle standard edition. The install went off without a hitch and populating the channels with spacewalk-repo-sync worked properly. I created the kickstart distributions and the profiles for the CentOS channels. Cobbler looks like it picked up the configurations properly:
...
% I'm starting to think this is a wider issue with python scripts not being able to connect because of the following entries:
% [root at spacewalk ~]# tail -2 /var/log/rhn/osa-dispatcher.log
% 2009/10/18 22:38:44 -04:00 3172 0.0.0.0: osad/jabber_lib.main('ERROR', 'Error caught:')
% 2009/10/18 22:38:44 -04:00 3172 0.0.0.0: osad/jabber_lib.main('ERROR', 'Traceback (most recent call last):\n File "/usr/share/rhn/osad/jabber_lib.py", line 119, in main\n self.setup_config(config)\n File "/usr/share/rhn/osad/osa_dispatcher.py", line 81, in setup_config\n rhnSQL.initDB()\n File "/usr/share/rhn/server/rhnSQL/__init__.py", line 98, in initDB\n __init__DB(backend, host, port, username, password, database)\n File "/usr/share/rhn/server/rhnSQL/__init__.py", line 59, in __init__DB\n __DB.check_connection()\n File "/usr/share/rhn/server/rhnSQL/driver_cx_Oracle.py", line 490, in check_connection\n self.connect() # only allow one try\n File "/usr/share/rhn/server/rhnSQL/driver_cx_Oracle.py", line 370, in connect\n self.dbh = self._connect()\n File "/usr/share/rhn/server/rhnSQL/driver_cx_Oracle.py", line 396, in _connect\n dbh = cx_Oracle.Connection(self.dsn)\nInterfaceError: Unable to acquire Oracle environment
% handle\n')
%
% Does anyone have any ideas as to what the potential issue could be? Any help would be greatly appreciated.
Typically it means osa-dispatcher (maybe whole python stack) is unable to find
oracle libraries.
Check
# ldd `rpm -ql cx_Oracle | grep cx_Oracle.so`
and
# lsof -p `ps ax | awk '/[o]sa-dispatcher/ {print $1}' ` | grep oracle
% Regards,
% Matt
Regards,
--
Michael Mráka
Satellite Engineering, Red Hat
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20091019/8ff5af99/attachment.htm>
More information about the Spacewalk-list
mailing list