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?


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.


### 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?

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.dus...@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
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@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to