Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #1857] Icinga-Web: Fetch failed with message Couldn't locate driver named oci8 #478

Closed
icinga-migration opened this issue Aug 29, 2011 · 10 comments
Labels

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/1857

Created by nag_dkg on 2011-08-29 11:01:17 +00:00

Assignee: (none)
Status: Rejected (closed on 2011-09-07 11:07:24 +00:00)
Target Version: (none)
Last Update: 2011-09-09 12:18:06 +00:00 (in Redmine)


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 iobject_id, i.name1 AS iname1, 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

Attachments

@icinga-migration
Copy link
Author

Updated by jmosshammer on 2011-08-31 12:21:55 +00:00

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

@icinga-migration
Copy link
Author

Updated by nag_dkg on 2011-09-02 06:54:19 +00:00

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:pwd@fqd.server.name:1521/sid</db-name:parameter>

Do you need additional Information?

Thanks for your help!

@icinga-migration
Copy link
Author

Updated by lew on 2011-09-07 10:22:59 +00:00

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:

icingaOracle://mwmon:********@192.168.0.100:1521/MWMON

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:

                                        IcingaApi::CONNECTION_IDO

                                        
                                        oci8
                                        192.168.0.100
                                        1521

                                        
                                        
                                        MWMON
                                        mwmon
                                        ********
                                        
                                        1

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

@icinga-migration
Copy link
Author

Updated by jmosshammer on 2011-09-07 11:07:24 +00:00

  • 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

@icinga-migration
Copy link
Author

Updated by nag_dkg on 2011-09-07 12:36:52 +00:00

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?

@icinga-migration
Copy link
Author

Updated by jmosshammer on 2011-09-07 13:24:46 +00:00

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

@icinga-migration
Copy link
Author

Updated by nag_dkg on 2011-09-08 06:40:41 +00:00

  • File added databases.xml

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:

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.

@icinga-migration
Copy link
Author

Updated by nag_dkg on 2011-09-09 07:40:56 +00:00

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!

@icinga-migration
Copy link
Author

Updated by nag_dkg on 2011-09-09 10:49:28 +00:00

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.

@icinga-migration
Copy link
Author

Updated by jmosshammer on 2011-09-09 12:18:06 +00:00

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant