voxpupuli / puppet-zabbix

Puppet module for creating and maintaining zabbix components with puppet.
https://forge.puppet.com/puppet/zabbix
Apache License 2.0
80 stars 227 forks source link

zabbix-web: no dependency for mbstring #373

Open olevole opened 7 years ago

olevole commented 7 years ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

        class { 'zabbix::web':
                zabbix_version => '3.2',
                manage_vhost => true,
                zabbix_url    => "$ipaddress_enp0s5",
                zabbix_server => "$ipaddress_enp0s5",
                database_host => '127.0.0.1',
                database_type => 'postgresql',
                database_name => 'zabbix',
                database_user => 'zabbix',
                database_password => 'zabbix',
                web_config_owner => 'zabbix',
                web_config_group => 'zabbix',
        }

What are you seeing

Blank screen on http://, see Output log

What behaviour did you expect instead

Default Zabbix UI login form

Output log

[Sun Apr 02 15:38:26.876507 2017] [:error] [pid 22414] [client 192.168.0.2:54532] PHP Fatal error:  Uncaught Error: Call to undefined function mb_strlen() in /usr/share/zabbix/include/classes/user/CProfile.php:330\nStack trace:\n#0 /usr/share/zabbix/include/classes/user/CProfile.php(214): CProfile::checkValueType('index.php', 3)\n#1 /usr/share/zabbix/include/menu.inc.php(393): CProfile::update('web.menu.login....', 'index.php', 3)\n#2 /usr/share/zabbix/include/page_header.php(127): zbx_construct_menu(Array, Array, Array)\n#3 /usr/share/zabbix/include/views/general.login.php(30): require_once('/usr/share/zabb...')\n#4 /usr/share/zabbix/include/classes/mvc/CView.php(139): include('/usr/share/zabb...')\n#5 /usr/share/zabbix/index.php(120): CView->render()\n#6 {main}\n  thrown in /usr/share/zabbix/include/classes/user/CProfile.php on line 330

Any additional information you'd like to impart

Not the best solution, but I add additional " package { $php_extra_package: } " https://github.com/olevole/puppet-zabbix/commit/3b2fc077f10f97c461c1017c97c741052cde559f

olevole commented 7 years ago

Hmm, some with bcmath and xmlwriter/xmlreader

[Sun Apr 02 15:50:51.875938 2017] [:error] [pid 25904] [client 192.168.0.2:27895] PHP Fatal error:  Uncaught Error: Call to undefined function bcadd() in /usr/share/zabbix/include/classes/db/DB.php:170\nStack trace:\n#0 /usr/share/zabbix/include/classes/db/DB.php(136): DB::refreshIds('auditlog', 1)\n#1 /usr/share/zabbix/include/classes/db/DB.php(421): DB::reserveIds('auditlog', 1)\n#2 /usr/share/zabbix/include/audit.inc.php(166): DB::insert('auditlog', Array)\n#3 /usr/share/zabbix/include/classes/api/services/CUser.php(1148): add_audit_details(3, 0, '1', '', 'Login failed "A...', '1')\n#4 /usr/share/zabbix/include/classes/api/clients/CLocalApiClient.php(123): CUser->login(Array)\n#5 /usr/share/zabbix/include/classes/api/wrappers/CFrontendApiWrapper.php(97): CLocalApiClient->callMethod('user', 'login', Array, NULL)\n#6 /usr/share/zabbix/include/classes/api/wrappers/CApiWrapper.php(94): CFrontendApiWrapper->callClientMethod('login', Array)\n#7 /usr/share/zabbix/include/classes/api/wrappers/CFrontendApiWrapper.php(63): CApiWrapper->callMethod('login', Array)\n#8 /usr/share/zabbix/include/classes/api/wrappers/CApiWrapper in /usr/share/zabbix/include/classes/db/DB.php on line 170, referer: http://192.168.0.193/index.php

Also need php*-bcmath and php*-xml{writer,reader} module. I believe these dependencies should be in zabbix-web class