[icinga-users] Icinga-web on CentOS 7 with repos

Michael Friedrich michael.friedrich at netways.de
Wed Aug 20 14:11:39 CEST 2014


Am 20.08.2014 12:41, schrieb Sven Duscha:
Hi Michael,

On 20/08/14 10:42, Michael Friedrich wrote:
Am 19.08.2014 23:14, schrieb Sven Duscha:
Unfortunately when trying to access the page: http://ip/icinga-web, I encounter an error about

Uncaught Doctrine_Connection_Exception thrown:
Couldn't locate driver named mysql

Are you sure that your php setup properly loads and find the php mysql driver? Verify that by calling a simple script with phpinfo().

I created a simple phpinfo()-script, and it turns out that php isn't configured with MySQL support.

Setting in /etc/php.ini
extension=/usr/lib64/php/modules/mysql.so
pdo_mysql.default_socket=/var/lib/mysql/mysql.sock

fixed that.

Although, I would expect the package php-mysql to do that in its configuration adjustments?

Report an upstream bug to CentOS/RHEL please if it turns out to be a real bug. I would expect the packages to put it somewhere in /etc/php.d/ being automatically read then.




the detailed traceback is:

Stacktrace:
#0 /usr/share/icinga-web/lib/doctrine/lib/Doctrine/Connection/Mysql.php(101): Doctrine_Connection->connect()
#1 /usr/share/icinga-web/lib/doctrine/lib/Doctrine/Connection.php(1009): Doctrine_Connection_Mysql->connect()
#2 /usr/share/icinga-web/lib/doctrine/lib/Doctrine/Query/Abstract.php(976): Doctrine_Connection->execute('SELECT n.sessio...', Array)
#3 /usr/share/icinga-web/lib/doctrine/lib/Doctrine/Query/Abstract.php(1026): Doctrine_Query_Abstract->_execute(Array)
#4 /usr/share/icinga-web/app/modules/AppKit/lib/storage/AppKitDoctrineSessionStorage.class.php(133): Doctrine_Query_Abstract->execute()
#5 [internal function]: AppKitDoctrineSessionStorage->sessionRead('7pd2sm5jobg2m6c...')
#6 /usr/share/icinga-web/lib/agavi/src/storage/AgaviSessionStorage.class.php(132): session_start()
#7 /var/cache/icinga-web/config/factories.xml_production_web_3b046d81eca933d9f16b3365d9ddd13114979325.php(76): AgaviSessionStorage->startup()
#8 /var/cache/icinga-web/config/compile.xml_production__d41bc4e7416d79a2859fb497054ab4f5308e2df1.php(384): include('/var/cache/icin...')
#9 /var/cache/icinga-web/config/compile.xml_production__d41bc4e7416d79a2859fb497054ab4f5308e2df1.php(3549): AgaviContext->initialize()
#10 /var/cache/icinga-web/config/compile.xml_production__d41bc4e7416d79a2859fb497054ab4f5308e2df1.php(370): AppKitAgaviContext->initialize()
#11 /usr/share/icinga-web/pub/index.php(49): AgaviContext::getInstance('web')
#12 {main}

I also installed for the sake of it the Zend-Adapter, since that popped up on my search for Mysql and Php:
ZendFramework-Db-Adapter-Pdo-Mysql php-ZendFramework-Db-Adapter-Mysqli

Nope. Icinga Web 1.x only requires php-mysql which is pulled by the icinga-web-mysql package.

Ok, that was a wild guess in many efforts to get a handle on the issue.

Remove unused packages then. They require disk space and maintenance, even if unused.



### MySQL
       # mysql -u root -p

              CREATE USER `icinga_webweb`@`localhost` IDENTIFIED BY 'icinga_webweb';
              CREATE DATABASE `icinga_web`;
              GRANT ALL PRIVILEGES ON `icinga_web`.* TO `icinga_web`@`localhost`;
              FLUSH PRIVILEGES;
              quit

       # mysql -u root -p icinga_web < etc/schema/mysql.sql

Using a custom db pass/username requires a config xml update for icinga web.

I found that (somewhere) in the icinga documentation, but wondered why the user must be created by hand. What is the default user, which hopefully gets created when installing the icinga-web package?

The mysql credentials and database must be created manually, plus importing the schema. That's a task every Redhat admin expects to do on his/her own, and rpms don't do anything about it.

The schema data already adds some additional data, for instance for the default user/pass. The README.RHEL will enlighten you that it's root/password.

kind regards,
Michael



My apache log shows the following error:

[Tue Aug 19 22:52:11.279566 2014] [:error] [pid 11245] [client 146.107.3.4:28812] PHP Warning:  Creating default object from empty value in /usr/share/icinga-web/app/modules/AppKit/lib/storage/AppKitDoctrineSessionStorage.class.php on line 174
[Tue Aug 19 22:52:11.279627 2014] [:error] [pid 11245] [client 146.107.3.4:28812] PHP Fatal error:  Call to undefined method stdClass::save() in /usr/share/icinga-web/app/modules/AppKit/lib/storage/AppKitDoctrineSessionStorage.class.php on line 177

That's a well known Doctrine application bug happening on certain distributions, but there is no simple fix for it. It shouldn't harm the normal operation as it happens after the database specific queries.

Ok.


Thanks for the help.

Regards,

Sven


--
Sven Duscha, M.Sc.
Systemadministrator
Institute of Bioinformatics and System Biology
Phone: +49-89-3187-1157
Fax: +49-89-3187-3585
mailto:sven.duscha at helmholtz-muenchen.de

________________________________
Helmholtz Zentrum München
Deutsches Forschungszentrum für Gesundheit und Umwelt (GmbH)
Ingolstädter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de<http://www.helmholtz-muenchen.de>
Aufsichtsratsvorsitzende: MinDir´in Bärbel Brumme-Bothe
Geschäftsführer: Prof. Dr. Günther Wess, Dr. Nikolaus Blum, Dr. Alfons Enhsen
Registergericht: Amtsgericht München HRB 6466
USt-IdNr: DE 129521671



_______________________________________________
icinga-users mailing list
icinga-users at lists.icinga.org<mailto:icinga-users at lists.icinga.org>
https://lists.icinga.org/mailman/listinfo/icinga-users



-- 
Michael Friedrich, DI (FH)
Application Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | Michael.Friedrich at netways.de

** Open Source Backup Conference 2014 - September - osbconf.org **
** Puppet Camp Duesseldorf 2014 - Oktober - netways.de/puppetcamp **
** OSMC 2014 - November - netways.de/osmc **
** OpenNebula Conf 2014 - Dezember - opennebulaconf.com **
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20140820/cc2fb106/attachment.html>


More information about the icinga-users mailing list