Ad Widget

Collapse

Critical: After upgrade zabbix proxy isn't updating configs from server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • andris
    Zabbix developer
    • Feb 2012
    • 228

    #16
    You are using MySQL for proxy, right ?

    One idea - did you precisely followed directions in

    while creating proxy DB:
    Code:
    shell> mysql -u<username> -p<password>
    mysql> create database zabbix character set utf8 collate utf8_bin;
    mysql> quit;
    shell> mysql -u<username> -p<password> zabbix < database/mysql/schema.sql
    Pay attention to 'character set utf8 collate utf8_bin', it is important.
    Is it so with your proxy DB ?
    Last edited by andris; 28-07-2016, 13:43.

    Comment

    • zabbixfk
      Senior Member
      • Jun 2013
      • 256

      #17
      Critical: After upgrade zabbix proxy not working

      Thanks for the reply.
      Looks like i had created database only with utf8, not with collate utf8_bin, Would there be any issue? I thought collate is only for string match/perf stuffs ( please correct me if i am wrong)
      Code:
       
      [user@zbx-proxy2 ~]# grep '^DBName=*' /usr/local/etc/zabbix_proxy.conf
      DBName=zabbix
      [user@zbx-proxy2 ~]# mysql -uzabbix  -p -e 'show create database zabbix;'
      Enter password: 
      +----------+-----------------------------------------------------------------+
      | Database | Create Database                                                 |
      +----------+-----------------------------------------------------------------+
      | zabbix   | CREATE DATABASE `zabbix` /*!40100 DEFAULT CHARACTER SET utf8 */ |
      +----------+-----------------------------------------------------------------+
      Thanks

      Comment

      • andris
        Zabbix developer
        • Feb 2012
        • 228

        #18
        collate utf8_bin is in documentation for a good reason. A much more experienced colleague instantly guessed that this omission could be a reason of the whole trouble. An that could explain why the bug is rarely seen.

        Comment

        • zabbixfk
          Senior Member
          • Jun 2013
          • 256

          #19
          Critical: After upgrade zabbix proxy not working

          Thanks for the reply.

          What is the recommendation now? Do you think i should

          1) take the dump of proxy db, stop proxy service, recreate with correct character set, re source the database?

          2) Drop proxy db. Re create the db from scratch, and wait for server to apply configs on newly created proxy db.

          1 or 2, which it better, last time when i had this issue, i tried 2, but though configs were sourcing in proxy db it was failing to get monitoring done for configured hosts. i.e under zabbix agent or snmp image next to host was greyed out ( not green - incase of available, not red - in case of not available) and there was no errors. So i had to re source the dump that i took.

          Any other pointers are greatly helpful.

          Thanks

          Comment

          • andris
            Zabbix developer
            • Feb 2012
            • 228

            #20
            Hi!

            As for proxy DB, it is better to drop it and recreate properly from scratch.

            Andris

            Comment

            • LenR
              Senior Member
              • Sep 2009
              • 1005

              #21
              Proxy databases can be dropped and recreated, just stop the proxy, drop the db and follow the document for creating a proxy db. When you restart the proxy, it will pull a complete current config from the server. Use the schema matching your installed version.

              Comment

              • zabbixfk
                Senior Member
                • Jun 2013
                • 256

                #22
                Critical: After upgrade zabbix proxy not working

                Thanks all for the reply.

                I would like to do drop proxy db and recreate with correct character set. But

                ___RE WRITING OLD OBSERVATION___
                - last time when i did this ( read character set was only utf8 not - collate utf8_bin - ),
                -- though configs were sourcing in proxy db it was failing to get monitoring done for configured hosts.
                -- i.e under zabbix agent or snmp image next to host was greyed out ( not green - incase of available, not red - in case of not available) and there was no errors
                -- And no mention of these host ip's or host names from logs, and i had no idea what was going on.
                -- Also when this happened, hosts which are monitored by proxy were not showing history data ( strange but true)
                -- there were only ping updates , no snmp (in case the host is monitored via snmp) or agent based data ( in case of agent), so graphs were blank, latest data was blank.
                -- I waited for long time , close to 30 mins , but nothing showed up.
                -- Logs were only showing getting up the configs from server, and pushing ping based data back by the proxy to server
                -- Since the icons were greyed out next to host ( under Configuration- hosts), and i looked at db as well under error column, it was blank.

                So i had to re source the dump that i took before dropping the db.
                __DONE__

                So, as per your suggestion, below steps would help me solving the problem,
                1). Bring down proxy service.
                2). Take the back up of exiting proxy database ( in case things don't show up).
                3). Re-create proxy instance db with
                Code:
                create database zabbix character set utf8 collate utf8_bin;
                mysql -uzabbix -p zabbix < database/mysql/schema.sql
                4). Restart proxy service, and wait for the configs to source. Right?

                Anything missing? Any pointers are greatly helpful.

                Thanks

                Comment

                • andris
                  Zabbix developer
                  • Feb 2012
                  • 228

                  #23
                  I think it should work - steps 1-4 as you described.

                  Andris

                  Comment

                  • zabbixfk
                    Senior Member
                    • Jun 2013
                    • 256

                    #24
                    [CLOSED] After upgrade zabbix proxy not working

                    Hello All,

                    Sorry, was out for sometime, hence could not work on this.
                    Now that i am able to get this error (database error, db update was failing) disappeared from all of my logs, i can say that looks like this issue seems to closed to me.

                    Thank you all for taking your time out for replying to this thread. Your suggestions are greatly helpful.

                    Thanks again.

                    Comment

                    Working...