Ad Widget

Collapse

zabbix 2.0.6 php time zone unknow

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marwansiala
    Junior Member
    • Jun 2013
    • 19

    #1

    zabbix 2.0.6 php time zone unknow

    i have installed zabbix 2.0.6 on Centso 6.4.
    first i installed centos 6.4 then installed mysql using yum command.
    then followed this link to install zabbix:

    Join the friendly and open Zabbix community on our forums and social media platforms.


    then after restarting the server and running zabbix, the zabbix will run a check of pre-requisites, and this the problem i have it fails on php time zone check.

    please let me know how to fix it, thanks.
  • Zaniwoop
    Senior Member
    • Jan 2010
    • 232

    #2
    You need to put your timezone in the pip.ini file.
    Edit /etc/php.ini and change

    Code:
    ;date.timezone =
    to
    Code:
    date.timezone = Country/City
    and then restart apache.

    Comment

    • marwansiala
      Junior Member
      • Jun 2013
      • 19

      #3
      thank you for your reply.
      now i am getting this error:

      mysql_free_esult0 expects parameter 1 to be resource, boolean given [include/inc.php:573]



      kindly please let me know how to fix it.

      thanks a lot

      Comment

      • jaba
        Junior Member
        • Apr 2013
        • 11

        #4
        Originally posted by marwansiala
        thank you for your reply.
        now i am getting this error:

        mysql_free_esult0 expects parameter 1 to be resource, boolean given [include/inc.php:573]



        kindly please let me know how to fix it.

        thanks a lot
        You probably skip database installation step, that make this error appear.

        Comment

        • marwansiala
          Junior Member
          • Jun 2013
          • 19

          #5
          i followed these steps:

          ---------------------------------------
          Database

          Start MySQL Database Server and secure

          # service mysqld start
          # mysql_secure_installation
          # mysql -u root -p

          In the MySQL console:

          mysql> create database zabbix character set utf8;
          mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'password';
          mysql> flush privileges;

          Back in the shell we load the Zabbix SQL in the database we just created:

          # mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.0.2/create/schema.sql
          # mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.0.2/create/images.sql
          # mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.0.2/create/data.sql
          -----------------------------------------------------------------

          but when executing the last 3 commands i get this error message:

          bash: /usr/share/doc/zabbix-server-mysql-2.0.2/create/schema.sql: No such file or directory

          Comment

          • jaba
            Junior Member
            • Apr 2013
            • 11

            #6
            Looks like files are not in exact location.
            You can check exact location by checking package content: rpm -ql zabbix-server-mysql

            So if you have latest stable version 2.0.6 installed, then those sql scripts should be there:
            /usr/share/doc/zabbix-server-mysql-2.0.6/create/
            Last edited by jaba; 11-06-2013, 12:43.

            Comment

            • marwansiala
              Junior Member
              • Jun 2013
              • 19

              #7
              i am able to access zabbix but now i am getting this

              ---------
              zabbix server is not running the information displayed may not be current.
              ----------

              Comment

              • tchjts1
                Senior Member
                • May 2008
                • 1605

                #8
                Originally posted by marwansiala
                i am able to access zabbix but now i am getting this

                ---------
                zabbix server is not running the information displayed may not be current.
                ----------
                Do you see Zabbix processes running on your Zabbix server when you run ps -ef|grep zabbix ?

                What does your Zabbix server log say? (zabbix_server.log)

                Comment

                • jaba
                  Junior Member
                  • Apr 2013
                  • 11

                  #9
                  Centos by default have enabled SELlinux, so if Zabbix server is running then it`s probably and issue.

                  Reconfigure or disable SELinux! Disable and restart machine:

                  sed -i 's:SELINUX=enforcing:SELINUX=disabled:g' /etc/selinux/config && reboot
                  Last edited by jaba; 12-06-2013, 09:04.

                  Comment

                  • marwansiala
                    Junior Member
                    • Jun 2013
                    • 19

                    #10
                    Originally posted by tchjts1
                    Do you see Zabbix processes running on your Zabbix server when you run ps -ef|grep zabbix ?

                    What does your Zabbix server log say? (zabbix_server.log)


                    this is the output of the command
                    # ps -ef|grep zabbix
                    zabbix 2008 1 0 Jun11 ? 00:00:06 zabbix_server -c /etc/zabbix/zabbix_server.conf
                    root 21173 3542 0 08:37 pts/0 00:00:00 grep zabbix


                    and the server log:

                    2008:20130612:084203.800 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
                    2008:20130612:084203.800 Database is down. Reconnecting in 10 seconds.

                    Comment

                    • marwansiala
                      Junior Member
                      • Jun 2013
                      • 19

                      #11
                      log:
                      ------------------------------------------------

                      2008:20130612:090014.227 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
                      2008:20130612:090014.227 Database is down. Reconnecting in 10 seconds.
                      2008:20130612:090024.238 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
                      2008:20130612:090024.238 Database is down. Reconnecting in 10 seconds.
                      2008:20130612:090034.248 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
                      2008:20130612:090034.248 Database is down. Reconnecting in 10 seconds.
                      2008:20130612:090044.249 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
                      2008:20130612:090044.250 Database is down. Reconnecting in 10 seconds.
                      21684:20130612:090054.309 server #1 started [configuration syncer #1]
                      21685:20130612:090054.317 server #2 started [db watchdog #1]
                      21694:20130612:090054.390 server #9 started [trapper #1]
                      21696:20130612:090054.438 server #10 started [trapper #2]
                      21698:20130612:090054.484 server #11 started [trapper #3]
                      21700:20130612:090054.506 server #12 started [trapper #4]
                      21703:20130612:090054.550 server #14 started [icmp pinger #1]
                      21702:20130612:090054.551 server #13 started [trapper #5]
                      21707:20130612:090054.606 server #16 started [housekeeper #1]
                      21707:20130612:090054.606 executing housekeeper
                      21708:20130612:090054.607 server #17 started [timer #1]
                      21711:20130612:090054.616 server #18 started [http poller #1]
                      21706:20130612:090054.629 server #15 started [alerter #1]
                      21715:20130612:090054.654 server #20 started [history syncer #1]
                      21717:20130612:090054.670 server #21 started [history syncer #2]
                      21719:20130612:090054.677 server #22 started [history syncer #3]
                      21721:20130612:090054.689 server #23 started [history syncer #4]
                      21722:20130612:090054.690 server #24 started [escalator #1]
                      21725:20130612:090054.712 server #25 started [proxy poller #1]
                      2008:20130612:090054.758 server #0 started [main process]
                      21727:20130612:090054.764 server #26 started [self-monitoring #1]
                      21713:20130612:090054.854 server #19 started [discoverer #1]
                      21691:20130612:090054.949 server #6 started [poller #4]
                      21689:20130612:090054.967 server #5 started [poller #3]
                      21707:20130612:090054.969 housekeeper deleted: 0 records from history and trends, 0 records of deleted items, 0 events, 0 alerts, 0 sessions
                      21692:20130612:090054.971 server #7 started [poller #5]
                      21693:20130612:090054.972 server #8 started [unreachable poller #1]
                      21687:20130612:090054.982 server #3 started [poller #1]
                      21688:20130612:090054.988 server #4 started [poller #2]
                      21722:20130612:090504.141 [Z3005] query failed: [2006] MySQL server has gone away [select escalationid,actionid,triggerid,eventid,r_eventid, esc_step,status,nextcheck from escalations where 1=1 and escalationid between 0 and 99999999999999 order by actionid,triggerid,escalationid]
                      21722:20130612:090504.142 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
                      21722:20130612:090504.142 Database is down. Reconnecting in 10 seconds.
                      21711:20130612:090504.990 [Z3005] query failed: [2006] MySQL server has gone away [select t.httptestid,t.name,t.macros,t.agent,t.authenticat ion,t.http_user,t.http_password from httptest t,applications a,hosts h where t.applicationid=a.applicationid and a.hostid=h.hostid and t.nextcheck<=1371020704 and mod(t.httptestid,1)=0 and t.status=0 and h.proxy_hostid is null and h.status=0 and (h.maintenance_status=0 or h.maintenance_type=0) and t.httptestid between 0 and 99999999999999]
                      21711:20130612:090504.990 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
                      21711:20130612:090504.990 Database is down. Reconnecting in 10 seconds.
                      21685:20130612:090513.020 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21702:20130612:090513.022 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21687:20130612:090513.022 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21727:20130612:090513.024 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21689:20130612:090513.025 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21711:20130612:090513.026 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21691:20130612:090513.027 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21700:20130612:090513.028 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21692:20130612:090513.029 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21725:20130612:090513.031 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21693:20130612:090513.032 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21698:20130612:090513.033 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21694:20130612:090513.035 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21688:20130612:090513.035 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21706:20130612:090513.037 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21703:20130612:090513.037 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21684:20130612:090513.040 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21707:20130612:090513.040 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21708:20130612:090513.043 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21696:20130612:090513.043 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21713:20130612:090513.045 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      2008:20130612:090513.046 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21715:20130612:090513.049 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21719:20130612:090513.053 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21721:20130612:090513.056 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21722:20130612:090513.058 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      21717:20130612:090513.068 Got signal [signal:15(SIGTERM),sender_pid:22283,sender_uid:0,r eason:0]. Exiting ...
                      2008:20130612:090515.046 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
                      2008:20130612:090515.047 Cannot connect to the database. Exiting...
                      1984:20130612:090611.352 Starting Zabbix Server. Zabbix 2.0.6 (revision 35158).
                      1984:20130612:090611.357 ****** Enabled features ******
                      1984:20130612:090611.357 SNMP monitoring: YES
                      1984:20130612:090611.357 IPMI monitoring: YES
                      1984:20130612:090611.357 WEB monitoring: YES
                      1984:20130612:090611.357 Jabber notifications: YES
                      1984:20130612:090611.357 Ez Texting notifications: YES
                      1984:20130612:090611.357 ODBC: YES
                      1984:20130612:090611.357 SSH2 support: YES
                      1984:20130612:090611.357 IPv6 support: YES
                      1984:20130612:090611.357 ******************************
                      2010:20130612:090611.813 server #1 started [configuration syncer #1]

                      Comment

                      • tchjts1
                        Senior Member
                        • May 2008
                        • 1605

                        #12
                        1. You are not connecting to your database.
                        2. When you check the instances of the zabbix server process, you should see several instances of it running.

                        You have some very basic issues that need to be corrected.

                        Comment

                        • marwansiala
                          Junior Member
                          • Jun 2013
                          • 19

                          #13
                          please let me how to fix it, I am new on linux and I am doing my best to but things togther to better understand linux.

                          Comment

                          • tchjts1
                            Senior Member
                            • May 2008
                            • 1605

                            #14
                            It's OK... I've been there.
                            Did you grant the proper access on your database?

                            You should have ran something very similar to these commands when you were setting up your database.

                            Code:
                            sudo mysql
                            create database zabbix character set utf8; 
                            [B]grant all on zabbix.* to zabbix@’localhost’ identified by ‘mypassword’;[/B]
                            quit;
                            'password' should be whatever you have defined in zabbix_server.conf

                            Code:
                            ### Option: DBUser
                            #       Database user. Ignored for SQLite.
                            #
                            # Mandatory: no
                            # Default:
                            # DBUser=
                            
                            DBUser=zabbix
                            
                            ### Option: DBPassword
                            #       Database password. Ignored for SQLite.
                            #       Comment this line if no password is used.
                            #
                            # Mandatory: no
                            # Default:
                            # DBPassword=
                            [B]DBPassword=mypassword[/B]
                            (EDIT) Using 'localhost' is if you run Zabbix DB on the same server as Zabbix App server. if you have 2 separate servers, then try changing 'localhost' to the IP of your Zabbix App server. But you would also have to grant rights to that IP.
                            Last edited by tchjts1; 12-06-2013, 18:04.

                            Comment

                            • marwansiala
                              Junior Member
                              • Jun 2013
                              • 19

                              #15
                              i just did a fresh installation like the following:

                              after installing centos 6.3 desktop

                              ########
                              ######## install mysql
                              ########


                              #yum install mysql

                              ########
                              ######## install zabbix server 2.0.6
                              ########


                              Configure the ZabbixZone package repository and GPG key

                              # rpm --import http://repo.zabbixzone.com/centos/RP...KEY-zabbixzone
                              # rpm -Uv http://repo.zabbixzone.com/centos/za...0-1.noarch.rpm


                              Install the necesarry server packages (and agent, since you'll want to monitor your server too, right?)

                              # yum install mysql-server zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway


                              edit timezone in /etc/httpd/conf.d/zabbix to read this:

                              php_value date.timezone Africa/Tripoli


                              Restart the httpd

                              # service httpd start

                              ########
                              ######## Database
                              ########


                              Start MySQL Database Server and secure

                              # service mysqld start
                              # mysql_secure_installation
                              # mysql -u root -p

                              In the MySQL console:

                              mysql> create database zabbix character set utf8;
                              mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'password';
                              mysql> flush privileges;


                              Back in the shell we load the Zabbix SQL in the database we just created:

                              # mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.0.6/create/schema.sql
                              # mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.0.6/create/images.sql
                              # mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.0.6/create/data.sql

                              ########
                              ######## Zabbix Server
                              ########

                              edit using root ==> /etc/zabbix/zabbix_server.conf to set up zabbix database users 'password'

                              ### Option: DBUser
                              # Database user. Ignored for SQLite.
                              #
                              # Mandatory: no
                              # Default:
                              # DBUser=

                              DBUser=zabbix

                              ### Option: DBPassword
                              # Database password. Ignored for SQLite.
                              # Comment this line if no password is used.
                              #
                              # Mandatory: no
                              # Default:
                              # DBPassword=

                              DBPassword=password


                              Start the zabbix-server process (http://serverurl/zabbix)

                              # service zabbix-server start

                              ########
                              ######## Java Gateway
                              ########


                              The Java gateway service is used for JMX monitoring of servers like JBoss, Tomcat, Weblogic or Websphere.

                              We need to specify the address of the gateway in the zabbix server config (/etc/zabbix/zabbix-server.conf or

                              zabbix-proxy.conf):


                              JavaGateway=10.150.164.214
                              StartJavaPollers=5



                              #######
                              ####### Start on Reboot
                              #######


                              # chkconfig zabbix-server on
                              # chkconfig mysqld on
                              # chkconfig httpd on
                              # chkconfig zabbix-java-gateway on

                              Comment

                              Working...