Can't connect to Oracle 12c

Moderator: crythias

Post Reply
josotr
OTRS newbie
Posts: 6
Joined: 30 Jun 2015, 00:48
OTRS Version?: OTRS 6
Real Name: Jose Chinchilla
Company: GBSYS

Can't connect to Oracle 12c

Post by josotr » 21 Mar 2018, 19:40

Hi, I'm trying to use Otrs 6 with Oracle Database 12.2

I've already Installed DBD::Oracle (v1.74), Oracle client 12.2 is installed and configured with DBD:ORACLE. I can prove my database connection using bash.

I've also exported all Oracle variables on /etc/sysconfig/httpd file following this: https://access.redhat.com/solutions/2138981

But I'm still having this message on /var/log/messages when I try to setup OTRS via web installer:

[Error][Kernel::Modules::Installer::ConnectToDB][Line:1145]: Can't locate DBD/Oracle.pm in @INC

I don't know what else to do...


Complete Error Message:

[Error][Kernel::Modules::Installer::ConnectToDB][Line:1145]: Can't locate DBD/Oracle.pm in @INC (@INC contains: /usr/Custom /usr/Kernel/cpan-lib /usr /usr/sbin/../../Custom /usr/sbin/../../Kernel/cpan-lib /usr/sbin/../.. /opt/otrs/Custom /opt/otrs/Kernel/cpan-lib /opt/otrs/ /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /etc/httpd) at /opt/otrs//Kernel/System/Main.pm line 81.

I can see that if I try to edit /opt/otrs/scripts/apache2-perl-startup.pl and uncomment the line=

use DBD::Oracle ();

My httpd service fail to start...

Failed to start The Apache HTTP Server.
Unit httpd.service entered failed state.
httpd.service failed.

reneeb
OTRS guru
Posts: 4650
Joined: 13 Mar 2011, 09:54
OTRS Version?: 3.3.x
Company: Perl-Services.de
Contact:

Re: Can't connect to Oracle 12c

Post by reneeb » 21 Mar 2018, 21:20

You need to install the Module DBD::Oracle
Perl / OTRS development: http://perl-services.de
Free OTRS add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de

josotr
OTRS newbie
Posts: 6
Joined: 30 Jun 2015, 00:48
OTRS Version?: OTRS 6
Real Name: Jose Chinchilla
Company: GBSYS

Re: Can't connect to Oracle 12c

Post by josotr » 21 Mar 2018, 21:23

As I said, it is installed

o Apache::DBI......................ok (v1.12)
o Apache2::Reload..................ok (v0.13)
o Archive::Tar.....................ok (v1.92)
o Archive::Zip.....................ok (v1.30)
o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
o Crypt::SSLeay....................ok (v0.64)
o Date::Format.....................ok (v2.24)
o DateTime.........................ok (v1.04)
o DBI..............................ok (v1.627)
o DBD::mysql.......................ok (v4.023)
o DBD::ODBC........................Not installed! (optional - Required to connect to a MS-SQL database.)
o DBD::Oracle......................ok (v1.74)
o DBD::Pg..........................ok (v2.19.3)
o Digest::SHA......................ok (v5.85)
o Encode::HanExtra.................ok (v0.23)
o IO::Socket::SSL..................ok (v1.94)
o JSON::XS.........................ok (v3.01)
o List::Util::XS...................ok (v1.27)
o LWP::UserAgent...................ok (v6.26)
o Mail::IMAPClient.................ok (v3.37)
o IO::Socket::SSL................ok (v1.94)
o Authen::SASL...................ok (v2.15)
o Authen::NTLM...................ok (v1.09)
o ModPerl::Util....................ok (v2.000010)
o Net::DNS.........................ok (v0.72)
o Net::LDAP........................ok (v0.56)
o Template.........................ok (v2.24)
o Template::Stash::XS..............ok (undef)
o Text::CSV_XS.....................ok (v1.00)
o Time::HiRes......................ok (v1.9725)
o XML::LibXML......................ok (v2.0018)
o XML::LibXSLT.....................ok (v1.80)
o XML::Parser......................ok (v2.41)
o YAML::XS.........................ok (v0.54)

josotr
OTRS newbie
Posts: 6
Joined: 30 Jun 2015, 00:48
OTRS Version?: OTRS 6
Real Name: Jose Chinchilla
Company: GBSYS

Re: Can't connect to Oracle 12c

Post by josotr » 22 Mar 2018, 05:24

I did a fresh installation using RHEL6 and the connection to Oracle 12c is working...

I assume the problem is with httpd (apache) variables in RHEL7...

How do I set variables correctly for RHEL7? I've configured the variables in httpd in the following way

/etc/sysconfig/httpd:

ORACLE_HOME='/usr/lib/oracle/12.2/client64'
LD_LIBRARY_PATH='/usr/lib/oracle/12.2/client64/lib'
TNS_ADMIN='/usr/lib/oracle/12.2/client64/network/admin'

/etc/httpd/conf/httpd.conf:

SetEnv ORACLE_HOME /usr/lib/oracle/12.2/client64
SetEnv LD_LIBRARY_PATH /usr/lib/oracle/12.2/client64/lib
SetEnv TNS_ADMIN /usr/lib/oracle/12.2/client64/network/admin

Post Reply