Bug #1857

Icinga-Web: Fetch failed with message Couldn't locate driver named oci8

Added by nag_dkg over 2 years ago. Updated over 2 years ago.

Status:RejectedStart date:08/29/2011
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Icinga Version: DB Type:
Icinga Web Version: DB Version:
IDO Version: Browser Version:
OS Version:

Description

Hallo,

hier eine Kurze Beschreibung meines Icinga-Web-Problems:

Umgebung: OS RH 6 => 2.6.32-131.0.15.el6.x86_64
Icinga und Icinga-Web: 1.5.0
DB.: Oracle 11
PHP: 5.3.3

Beschreibung:
Mit Anmeldung an Icinga-Web werden keine Daten aus der Oracle-DB angezeigt. Die Daten werden aber von Icinga in die Oracle-DB geschrieben.
Wie kann ich Icinga-Web überzeugen, meine Daten auch anzuzeigen?

Vorab vielen Dank für die Unterstützung!

Fehlermeldung: icinga-web/log/debug...:
[Mon Aug 29 12:01:05 2011] [error] Fetch failed with message Couldn't locate driver named oci8
Query: SELECT a.* FROM ( SELECT DISTINCT i.object_id AS i__object_id, i.object_id AS i__object_id, i.name1 AS i__name1, i.object_id AS i__object_id, i.name1 A .....

PHP - Installations-/Konfigurationsauszug:
php -i | grep -i oci
/etc/php.d/oci8.ini,
oci8
OCI8 Support => enabled
oci8.connection_class => no value => no value
oci8.default_prefetch => 100 => 100
oci8.events => Off => Off
oci8.max_persistent => -1 => -1
oci8.old_oci_close_semantics => Off => Off
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20

OCI-PHP-Info:
http_proxy=http://proxy.wdr.de:8080/ pecl install oci8
pecl/oci8 is already installed and is the same as the released version 1.4.6

databases.xml Magnifier (4.78 KB) nag_dkg, 09/08/2011 08:40 am

History

#1 Updated by jmosshammer over 2 years ago

Hello,
please report bugs in english.

First -> upgrade to 1.5.1, we fixed lot's of minor and major bugs there.

What do your dsn look like?
For the icinga database, use icingaOracle://user:pass@host:port/SID

More information about the databases.xml can be found in our wiki under:
https://wiki.icinga.org/display/howtos/databases.xml

#2 Updated by nag_dkg over 2 years ago

Hello,

now the description of my problems in English.

Environment:
OS RH 6 => 2.6.32-131.0.15.el6.x86_64

Icinga and Icinga-Web: 1.5.01
DB.: Oracle 11

PHP: 5.3.3

Description:
The installation of icinga-web works without problems and the access to the icinga-web - mysql database works too. Icinga is able to connect to the Oracle Database and I see all current values in the tables. When I login in Icinga-Web- GUI, I can't see any content of the Oracle – DB. I get an empty page – without data, I see only the typical Icinga-Web-Gui.
What is wrong?
If I make an trace of this communication , I don't get any packages from the icinga-web...

Additional Information:
Error messages from icinga-web/log/debug...:

[Fri Sep 2 08:40:45 2011] [fatal] Uncaught AppKitPHPError: PHP Error oci_new_connect(): ORA-12545: Connect failed because target host or object does not exist (/icinga/icinga-web/lib/doctrine/Doctrine.compiled.php:1) (/icinga/icinga-web/app/modules/AppKit/lib/logging/AppKitExceptionHandler.class.php:37)

PHP – Configuration summary :

php -i | grep -i oci

/etc/php.d/oci8.ini,

oci8

OCI8 Support => enabled

oci8.connection_class => no value => no value

oci8.default_prefetch => 100 => 100

oci8.events => Off => Off

oci8.max_persistent => -1 => -1

oci8.old_oci_close_semantics => Off => Off

oci8.persistent_timeout => -1 => -1

oci8.ping_interval => 60 => 60

oci8.privileged_connect => Off => Off

oci8.statement_cache_size => 20 => 20

OCI-PHP-Info:

pecl install oci8

pecl/oci8 is already installed and is the same as the released version 1.4.6

We use the following syntax for dsn:
<ae:parameter name="dsn">icingaOracle://user::1521/sid</db-name:parameter>

Do you need additional Information?

Thanks for your help!

#3 Updated by lew over 2 years ago

Hi All,

I have same issue.
PHP 5.3.5 (from Oracle repo)
OCI8 (php53-oci8-11gR2-5.3.5-1.el5 from Oracle repo as well)
oracle-instantclient11.2-basic-11.2.0.1.0-1
oracle-instantclient11.2-sqlplus-11.2.0.1.0-1
oracle-instantclient11.2-devel-11.2.0.1.0-1
ocilib-3.9.2 installed with the following configuration:
./configure --with-oracle-home=/usr/lib/oracle/11.2/client64 --with-oracle-headers-path=/usr/include/oracle/11.2/client64 --with-oracle-lib-path=/usr/lib/oracle/11.2/client64/lib

icinga-web config:

./configure     --prefix=/usr/local/icinga-web \
                --with-web-user=apache \
                --with-web-group=apache \
                --with-db-type=mysql \
                --with-db-host=localhost \
                --with-db-port=3306 \
                --with-db-name=icinga_web \
                --with-db-user=icinga_web \
                --with-db-pass=gnicinga \
                --with-web-apache-path=/etc/httpd/conf.d \
                --with-api-type=CONNECTION_IDO \
                --with-api-subtype=oci8 \
                --with-api-host=192.168.0.100 \
                --with-api-port=1521 \
                --with-api-db-user=mwmon \
                --with-api-db-pass=******** \
                --with-api-db-name=MWMON \
                --with-api-db-prefix=

icinga-web 1.5.1 dsn parameter in database.xml:
<ae:parameter name="dsn">icingaOracle://mwmon:********@192.168.0.100:1521/MWMON</ae:parameter>

There is error message in icinga-web.log:
[Wed Sep  7 09:16:34 2011] [error] Fetch failed with message Couldn't locate driver named oci8

This configuration is working properly with icinga-web-1.4.1.

icinga-web 1.4.1 dsn parameter in icinga-io.xml:

                                <setting name="api.interfaces.data">
                                        <!-- IcingaApi connection interface -->
                                        <ae:parameter name="api_type">IcingaApi::CONNECTION_IDO</ae:parameter>

                                        <!-- Suits for all interfaes -->
                                        <ae:parameter name="config_type">oci8</ae:parameter>
                                        <ae:parameter name="config_host">192.168.0.100</ae:parameter>
                                        <ae:parameter name="config_port">1521</ae:parameter>

                                        <!-- ###BEGIN_CONNECTION_IDO### -->
                                        <!-- Database specific (IcingaApi::CONNECTION_IDO) -->
                                        <ae:parameter name="config_database">MWMON</ae:parameter>
                                        <ae:parameter name="config_user">mwmon</ae:parameter>
                                        <ae:parameter name="config_password">********</ae:parameter>
                                        <ae:parameter name="config_table_prefix"></ae:parameter>
                                        <ae:parameter name="config_config_type">1</ae:parameter>
                                        <!-- ###END_CONNECTION_IDO### -->
                                </setting>

Do you have any idea or suggestion? If you need additional info do not hasitate to contact me! Thanks for your help!

#4 Updated by jmosshammer over 2 years ago

  • Status changed from New to Rejected

Check your databases.xml (app/config/databases.xml and etc/conf.d/databases.xml), and replace every oci8 entry with oracle, except for the icinga database, here you have to use icingaOracle.

see: https://wiki.icinga.org/display/howtos/databases.xml

#5 Updated by nag_dkg over 2 years ago

Hello.

I'm little bit confused because of the status of this bug.
I removed icinga-web directories and files and start an new installation, but now with the proper attribute --with-api-subtype=icingaOracle .
But I have the following error message in /debug-2011-09-07.log :
[Wed Sep 7 14:17:05 2011] [fatal] Uncaught AppKitPHPError: PHP Error oci_new_connect(): ORA-12545: Connect failed because target host or object does not exist (/pathto/icinga-web/lib/doctrine/Doctrine.compiled.php:1) (/pathto/icinga-web/app/modules/AppKit/lib/logging/AppKitExceptionHandler.class.php:37)

The Icinga-Web shows no Data from the Oracle database...

What is wrong, what informations do you need?

#6 Updated by jmosshammer over 2 years ago

Your databases.xml(s) (without password) would help

#7 Updated by nag_dkg over 2 years ago

Hello.

In the attachment you will find my databases.xml from /pathto/icinga-web/app/conf. The second databases.xml in /pathto/icinga/etc/conf.d has only one valid line:

<databases xmlns:db="http://agavi.org/agavi/config/parts/databases/1.0" xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0">

Everything else is comment out.

Additional Information:
On the same server runs icinga and icinga is able to write the data to the oracle-db.

#8 Updated by nag_dkg over 2 years ago

Hello

I try to look at the content of the error message:
/pathto/icinga-web/lib/doctrine/Doctrine.compiled.php:1
The first line has about 180000 characters....
Because of this situation it is not possible for me to analyze this error. Maybe do you have an easy method to divide this line in a manageable way and enhanced this Doctrine.compiled.php file. I hope that we will get a more specific error message.
This is only an idea, maybe you have a better suggestion.

Thanks for your help!

#9 Updated by nag_dkg over 2 years ago

Hello.

We tried a further analysis to this problem.
The reason of this error message could identified for the function “public function __construct($config = array(), $username = null, $password = null)” .
The function use the string variable $config and this include the complete database string what is defined in database.xml . The values of this string are correct, but the oci_new_connect is not able to use this values in a proper way. oci_new_connect use the correct username, and password. All other values are empty – no value for dbname and chrset.
=> Therefor the error message is correct.

I hope this helps for you to analyze it in more details.

#10 Updated by jmosshammer over 2 years ago

you can set use_compressed to false on app/modules/AppKit/config/module.xml.

Oracle support works afaik (recently helped setting up a bigger enviroment)
Are you're enviromental vars set correctly? Is meinserver.woauchimmer.de really your SID?

Also available in: Atom PDF