A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPhpMemoryLimit() → str2mem() in include/func.inc.php:410]
A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPhpPostMaxSize() → str2mem() in include/func.inc.php:410]
A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPhpUploadMaxFilesize() → str2mem() in include/func.inc.php:410]
A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPhpPostMaxSize() → str2mem() in include/func.inc.php:410]
A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPhpUploadMaxFilesize() → str2mem() in include/func.inc.php:410]
安装完成之后启动后打开Web界面就出现这个问题,这个是因为PHP 7.1类型强化,处理方法也很简单找到Zabbix WEB目录下include/func.inc.php文件
1 |
sed -i '/$last = strtolower(substr($val, -1));/a$val = substr($val,0,-1);' /data/wwwroot/zabbix/include/func.inc.php |
注意一下文件路径即可。
然后发现zabbix server没有启动
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@j wwwroot]# /etc/init.d/zabbix_server start [02:09:33]Starting zabbix_server (via systemctl): Warning: zabbix_server.service changed on disk. Run 'systemctl daemon-reload' to reload units. [root@j wwwroot]# systemctl daemon-reload [root@j wwwroot]# /etc/init.d/zabbix_server start Starting zabbix_server (via systemctl): [ OK ] [root@j wwwroot]# ps -ef |grep zabbix root 9648 28703 0 02:12 pts/1 00:00:00 grep --color zabbix [root@j wwwroot]# /etc/init.d/zabbix_agentd start Starting zabbix_agentd (via systemctl): [ OK ] [root@j wwwroot]# ps -ef |grep zabbix zabbix 9684 1 0 02:12 ? 00:00:00 /usr/local/sbin/zabbix_agentd zabbix 9687 9684 0 02:12 ? 00:00:00 /usr/local/sbin/zabbix_agentd: collector [idle 1 sec] zabbix 9688 9684 0 02:12 ? 00:00:00 /usr/local/sbin/zabbix_agentd: listener #1 [waiting for connection] zabbix 9689 9684 0 02:12 ? 00:00:00 /usr/local/sbin/zabbix_agentd: listener #2 [waiting for connection] zabbix 9690 9684 0 02:12 ? 00:00:00 /usr/local/sbin/zabbix_agentd: listener #3 [waiting for connection] zabbix 9691 9684 0 02:12 ? 00:00:00 /usr/local/sbin/zabbix_agentd: active checks #1 [idle 1 sec] root 9699 28703 0 02:13 pts/1 00:00:00 grep --color zabbix |
到服务器上查看发现zabbix server和agentd启动显示成功了,但是server并没有实际进程,由于没有进程也就没有日志可查,试着进入zabbix server原始启动服务启动
1 2 3 |
[root@j lib]# cd /usr/local/src/zabbix-3.2.6/misc/init.d/fedora/core [root@j core]# ./zabbix_server start Starting zabbix_server: /usr/local/sbin/zabbix_server: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory |
提示libmysqlclient.so.18的问题,开始查找 此文件
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@j core]# find / -name libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18 /usr/lib64/mysql/libmysqlclient.so.18 [root@j core]# cd /usr/lib64/mysql/ [root@j mysql]# ll total 3072 lrwxrwxrwx. 1 root root 24 May 2 03:01 libmysqlclient.so.18 -> libmysqlclient.so.18.0.0 -rwxr-xr-x. 1 root root 3135736 Nov 15 2016 libmysqlclient.so.18.0.0 -rwxr-xr-x 1 root root 6758 Nov 15 2016 mysql_config drwxr-xr-x. 2 root root 54 May 2 03:01 plugin [root@j mysql]# cd /usr/lib [root@j lib]# ll lrwxrwxrwx 1 root root 41 Jul 4 04:23 libmysqlclient.so.18 -> /usr/local/mysql/lib/libmysqlclient.so.18 |
发现此处libmysqlclient.so.18链接文件出了问题,删除后重新创建链接
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
[root@j lib]# rm -f libmysqlclient.so.18 [root@j lib]# ln -s /usr/lib64/mysql/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18 [root@j lib]# ldconfig [root@j lib]# cd /usr/local/src/zabbix-3.2.6/misc/init.d/fedora/core [root@j core]# ./zabbix_server start Starting zabbix_server: [ OK ] [root@j core]# ps -ef |grep zabbix zabbix 14124 1 0 03:53 ? 00:00:00 /usr/local/sbin/zabbix_agentd zabbix 14126 14124 0 03:53 ? 00:00:00 /usr/local/sbin/zabbix_agentd: collector [idle 1 sec] zabbix 14127 14124 0 03:53 ? 00:00:00 /usr/local/sbin/zabbix_agentd: listener #1 [waiting for connection] zabbix 14128 14124 0 03:53 ? 00:00:00 /usr/local/sbin/zabbix_agentd: listener #2 [waiting for connection] zabbix 14129 14124 0 03:53 ? 00:00:00 /usr/local/sbin/zabbix_agentd: listener #3 [waiting for connection] zabbix 14130 14124 0 03:53 ? 00:00:00 /usr/local/sbin/zabbix_agentd: active checks #1 [idle 1 sec] zabbix 15299 1 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server zabbix 15310 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: configuration syncer [waiting 60 sec for processes] zabbix 15311 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: db watchdog [synced alerts config in 0.021512 sec, idle 60 sec] zabbix 15312 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: poller #1 [got 0 values in 0.000002 sec, idle 5 sec] zabbix 15313 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: poller #2 [got 0 values in 0.000004 sec, idle 5 sec] zabbix 15314 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: poller #3 [got 0 values in 0.000002 sec, idle 5 sec] zabbix 15315 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: poller #4 [got 0 values in 0.000003 sec, idle 5 sec] zabbix 15316 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: poller #5 [got 0 values in 0.000002 sec, idle 5 sec] zabbix 15317 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: unreachable poller #1 [got 0 values in 0.000002 sec, idle 5 sec] zabbix 15318 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: trapper #1 [processed data in 0.000000 sec, waiting for connection] zabbix 15319 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: trapper #2 [processed data in 0.000000 sec, waiting for connection] zabbix 15320 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: trapper #3 [processed data in 0.000000 sec, waiting for connection] zabbix 15321 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: trapper #4 [processed data in 0.000000 sec, waiting for connection] zabbix 15322 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: trapper #5 [processed data in 0.000000 sec, waiting for connection] zabbix 15323 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: icmp pinger #1 [got 0 values in 0.000003 sec, idle 5 sec] zabbix 15324 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: alerter [sent alerts: 0 success, 0 fail in 0.001263 sec, idle 30 sec] zabbix 15325 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: housekeeper [startup idle for 30 minutes] zabbix 15326 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: timer #1 [processed 0 triggers, 0 events in 0.000058 sec, 0 maintenances in 0.003196 sec, idle 29 sec] zabbix 15327 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: http poller #1 [got 0 values in 0.000439 sec, idle 5 sec] zabbix 15328 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: discoverer #1 [processed 0 rules in 0.000664 sec, idle 60 sec] zabbix 15329 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: history syncer #1 [synced 0 items in 0.000001 sec, idle 1 sec] zabbix 15330 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: history syncer #2 [synced 0 items in 0.000001 sec, idle 1 sec] zabbix 15331 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: history syncer #3 [synced 0 items in 0.000000 sec, idle 1 sec] zabbix 15332 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: history syncer #4 [synced 0 items in 0.000001 sec, idle 1 sec] zabbix 15333 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000136 sec, idle 3 sec] zabbix 15334 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: proxy poller #1 [exchanged data with 0 proxies in 0.000002 sec, idle 5 sec] zabbix 15335 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: self-monitoring [processed data in 0.000004 sec, idle 1 sec] zabbix 15336 15299 0 04:28 ? 00:00:00 /usr/local/sbin/zabbix_server: task manager [processed 0 task(s) in 0.000040 sec, idle 5 sec] root 15355 3313 0 04:29 pts/1 00:00:00 grep --color zabbix |
重启zabbix server后,查看已经有了进程,打开zabbix web界面也显示zabbix server正常启动了。