Hi all,
I'm receiving the following error when executing scripts on maps:
socket_connect() [<a href='function.socket-connect'>function.socket-connect</a>]: Host lookup failed [-10001]: Unknown host[/usr/share/zabbix/include/scripts.inc.php:76]
Cannot connect to ZABBIX server [:] [Unknown host]
I found out main problem comes because ZBX_SERVER and ZBX_SERVER_PORT is not defined when script.inc.php is executed. I'm using zabbix 1.6.2 installed from Debian official repositories. There is another post in the forums that seems to be a workaround:
*but* Alexei does not specify if this is a bug or not. My installation of zabbix 1.6 does not contain ZBX_SERVER and ZBX_SERVER_PORT in conf/zabbix.conf.php. It contains some DB_* vars.
Therefore, the questions are:
Here is my conf/zabbix.conf.php, just for your reference. As you can see, there are $DB_ vars created, but none of them is ZBX_*:
=====================================
<?php
$DB_TYPE='mysql';
$DB_SERVER='localhost';
$DB_DATABASE='zabbix_database';
$DB_USER='zabbix_user';
$DB_PASSWORD='XXXXXXX';
## dont remove this!
## This is a work-around for dbconfig-common
if($DB_TYPE == "mysql")
$DB_TYPE = "MYSQL";
if($DB_TYPE == "pgsql")
$DB_TYPE = "POSTGRESQL";
##
?>
=====================================
I would really appreciate your help!! I would open a bug if other users confirm this behaviour.
Thanks in advance
I'm receiving the following error when executing scripts on maps:
socket_connect() [<a href='function.socket-connect'>function.socket-connect</a>]: Host lookup failed [-10001]: Unknown host[/usr/share/zabbix/include/scripts.inc.php:76]
Cannot connect to ZABBIX server [:] [Unknown host]
I found out main problem comes because ZBX_SERVER and ZBX_SERVER_PORT is not defined when script.inc.php is executed. I'm using zabbix 1.6.2 installed from Debian official repositories. There is another post in the forums that seems to be a workaround:
*but* Alexei does not specify if this is a bug or not. My installation of zabbix 1.6 does not contain ZBX_SERVER and ZBX_SERVER_PORT in conf/zabbix.conf.php. It contains some DB_* vars.
Therefore, the questions are:
- Is this file generated in a wrong way?
- Why ZBX_* vars are not included in this file? bug?
Here is my conf/zabbix.conf.php, just for your reference. As you can see, there are $DB_ vars created, but none of them is ZBX_*:
=====================================
<?php
$DB_TYPE='mysql';
$DB_SERVER='localhost';
$DB_DATABASE='zabbix_database';
$DB_USER='zabbix_user';
$DB_PASSWORD='XXXXXXX';
## dont remove this!
## This is a work-around for dbconfig-common
if($DB_TYPE == "mysql")
$DB_TYPE = "MYSQL";
if($DB_TYPE == "pgsql")
$DB_TYPE = "POSTGRESQL";
##
?>
=====================================
I would really appreciate your help!! I would open a bug if other users confirm this behaviour.
Thanks in advance
)
Comment