Ad Widget

Collapse

Zabbix frontend out of date? (another "frontend does not match Zabbix database")

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dampersand
    Junior Member
    • Apr 2016
    • 16

    #1

    Zabbix frontend out of date? (another "frontend does not match Zabbix database")

    As if this we didn't have enough upgrade horror stories...

    I'm pushing the upgrade from 3.2 to 3.4 right now, and upon completing the upgrade (zabbix-server reported the database 100% upgraded and started polling, according to the log) I'm running into the following error on the web frontend:



    Database error

    The frontend does not match Zabbix database. Current database version (mandatory/optional): 3040000/3040005. Required mandatory version: 3020000. Contact your system administrator.



    Yup! Seen those before, haven'tcha?

    I think what's really freaking me out is that this shows that the frontend is actually the thing that's too old.

    I'm on a centOS7 machine being virtualized within openVZ. zabbix was installed from packages, and upgraded using the method at https://www.zabbix.com/documentation...es/rhel_centos (with the difference that I'm actually using zabbix-release-3.4-2 instead of 3.4-1).


    some outputs:

    Code:
    [root@zabbix yum.repos.d]# rpm -qa | grep zabbix
    zabbix-release-3.4-2.el7.noarch
    zabbix-agent-3.4.4-2.el7.x86_64
    zabbix-server-mysql-3.4.4-2.el7.x86_64
    zabbix-web-3.4.4-2.el7.noarch
    zabbix-web-mysql-3.4.4-2.el7.noarch
    Code:
      8661:20171109:152435.810 Starting Zabbix Server. Zabbix 3.4.4 (revision 74338).
      8661:20171109:152435.810 ****** Enabled features ******
      8661:20171109:152435.810 SNMP monitoring:           YES
      8661:20171109:152435.810 IPMI monitoring:           YES
      8661:20171109:152435.810 Web monitoring:            YES
      8661:20171109:152435.810 VMware monitoring:         YES
      8661:20171109:152435.810 SMTP authentication:       YES
      8661:20171109:152435.810 Jabber notifications:      YES
      8661:20171109:152435.810 Ez Texting notifications:  YES
      8661:20171109:152435.811 ODBC:                      YES
      8661:20171109:152435.811 SSH2 support:              YES
      8661:20171109:152435.811 IPv6 support:              YES
      8661:20171109:152435.811 TLS support:               YES
      8661:20171109:152435.811 ******************************
      8661:20171109:152435.811 using configuration file: /etc/zabbix/zabbix_server.conf
      8661:20171109:152435.816 current database version (mandatory/optional): 03040000/03040005
      8661:20171109:152435.816 required mandatory version: 03040000
      8661:20171109:152436.931 server #0 started [main process]
      8663:20171109:152436.932 server #1 started [configuration syncer #1]
      8664:20171109:152436.933 server #2 started [alerter #1]
      8665:20171109:152436.933 server #3 started [alerter #2]
      8666:20171109:152436.934 server #4 started [alerter #3]
      8667:20171109:152436.934 server #5 started [housekeeper #1]
      8668:20171109:152436.935 server #6 started [timer #1]
      8669:20171109:152436.935 server #7 started [http poller #1]
      8670:20171109:152436.936 server #8 started [discoverer #1]
      8671:20171109:152436.936 server #9 started [history syncer #1]
      8672:20171109:152436.937 server #10 started [history syncer #2]
      8673:20171109:152436.937 server #11 started [history syncer #3]
      8674:20171109:152436.938 server #12 started [history syncer #4]
      8675:20171109:152436.939 server #13 started [history syncer #5]
      8676:20171109:152436.939 server #14 started [history syncer #6]
      8677:20171109:152436.939 server #15 started [history syncer #7]
      8679:20171109:152436.940 server #16 started [history syncer #8]
      8681:20171109:152436.941 server #17 started [history syncer #9]
      8683:20171109:152436.941 server #18 started [history syncer #10]
      8685:20171109:152436.942 server #19 started [history syncer #11]
      8687:20171109:152436.942 server #20 started [history syncer #12]
      8689:20171109:152436.943 server #21 started [history syncer #13]
      8691:20171109:152436.943 server #22 started [history syncer #14]
      8693:20171109:152436.944 server #23 started [history syncer #15]
      8695:20171109:152436.944 server #24 started [history syncer #16]
      8697:20171109:152436.945 server #25 started [history syncer #17]
      8699:20171109:152436.945 server #26 started [history syncer #18]
      8701:20171109:152436.946 server #27 started [history syncer #19]
      8703:20171109:152436.946 server #28 started [history syncer #20]
      8705:20171109:152436.947 server #29 started [escalator #1]
      8706:20171109:152436.947 server #30 started [proxy poller #1]
      8707:20171109:152436.948 server #31 started [self-monitoring #1]
      8708:20171109:152436.948 server #32 started [task manager #1]
      8710:20171109:152436.949 server #33 started [poller #1]
      8711:20171109:152436.949 server #34 started [poller #2]
      8712:20171109:152436.950 server #35 started [poller #3]
      8713:20171109:152436.951 server #36 started [poller #4]
      8715:20171109:152436.951 server #37 started [poller #5]
      8717:20171109:152436.952 server #38 started [poller #6]
      8718:20171109:152436.953 server #39 started [poller #7]
      8719:20171109:152436.953 server #40 started [poller #8]
      8720:20171109:152436.954 server #41 started [poller #9]
      8721:20171109:152436.955 server #42 started [poller #10]
      8722:20171109:152436.955 server #43 started [poller #11]
      8723:20171109:152436.956 server #44 started [poller #12]
      8724:20171109:152436.956 server #45 started [poller #13]
      8725:20171109:152436.957 server #46 started [poller #14]
      8729:20171109:152436.967 server #50 started [poller #18]
      8727:20171109:152436.969 server #48 started [poller #16]
      8739:20171109:152436.971 server #60 started [poller #28]
      8730:20171109:152436.971 server #51 started [poller #19]
      8731:20171109:152436.972 server #52 started [poller #20]
      8726:20171109:152436.973 server #47 started [poller #15]
      8733:20171109:152436.973 server #54 started [poller #22]
      8728:20171109:152436.974 server #49 started [poller #17]
      8734:20171109:152436.974 server #55 started [poller #23]
      8741:20171109:152436.975 server #62 started [poller #30]
      8736:20171109:152436.975 server #57 started [poller #25]
      8737:20171109:152436.976 server #58 started [poller #26]
      8738:20171109:152436.977 server #59 started [poller #27]
      8732:20171109:152436.977 server #53 started [poller #21]
      8740:20171109:152436.978 server #61 started [poller #29]
      8735:20171109:152436.979 server #56 started [poller #24]
      8742:20171109:152436.987 server #63 started [poller #31]
      8748:20171109:152436.989 server #68 started [poller #36]
      8746:20171109:152436.991 server #66 started [poller #34]
      8751:20171109:152436.991 server #71 started [poller #39]
      8753:20171109:152436.997 server #73 started [poller #41]
      8747:20171109:152436.997 server #67 started [poller #35]
      8754:20171109:152437.004 server #74 started [poller #42]
      8745:20171109:152437.009 server #65 started [poller #33]
      8755:20171109:152437.009 server #75 started [poller #43]
      8757:20171109:152437.009 server #77 started [poller #45]
      8760:20171109:152437.010 server #80 started [poller #48]
      8749:20171109:152437.010 server #69 started [poller #37]
      8759:20171109:152437.010 server #79 started [poller #47]
      8750:20171109:152437.010 server #70 started [poller #38]
      8756:20171109:152437.010 server #76 started [poller #44]
      8752:20171109:152437.010 server #72 started [poller #40]
      8758:20171109:152437.011 server #78 started [poller #46]
      8744:20171109:152437.015 server #64 started [poller #32]
      8763:20171109:152437.021 server #83 started [poller #51]
      8761:20171109:152437.021 server #81 started [poller #49]
      8767:20171109:152437.025 server #87 started [poller #55]
      8765:20171109:152437.025 server #85 started [poller #53]
      8766:20171109:152437.026 server #86 started [poller #54]
      8762:20171109:152437.027 server #82 started [poller #50]
      8771:20171109:152437.028 server #91 started [poller #59]
      8764:20171109:152437.030 server #84 started [poller #52]
      8770:20171109:152437.033 server #90 started [poller #58]
      8773:20171109:152437.036 server #93 started [unreachable poller #1]
      8772:20171109:152437.038 server #92 started [poller #60]
      8768:20171109:152437.040 server #88 started [poller #56]
      8774:20171109:152437.045 server #94 started [unreachable poller #2]
      8769:20171109:152437.045 server #89 started [poller #57]
      8787:20171109:152437.050 server #101 started [trapper #5]
      8776:20171109:152437.052 server #95 started [unreachable poller #3]
      8778:20171109:152437.055 server #96 started [unreachable poller #4]
      8784:20171109:152437.057 server #99 started [trapper #3]
      8782:20171109:152437.061 server #98 started [trapper #2]
      8785:20171109:152437.063 server #100 started [trapper #4]
      8781:20171109:152437.066 server #97 started [trapper #1]
      8789:20171109:152437.070 server #102 started [icmp pinger #1]
      8791:20171109:152437.071 server #104 started [icmp pinger #3]
      8790:20171109:152437.074 server #103 started [icmp pinger #2]
      8792:20171109:152437.077 server #105 started [icmp pinger #4]
      8793:20171109:152437.081 server #106 started [icmp pinger #5]
      8795:20171109:152437.081 server #107 started [icmp pinger #6]
      8803:20171109:152437.090 server #109 started [icmp pinger #8]
      8804:20171109:152437.095 server #110 started [alert manager #1]
      8801:20171109:152437.100 server #108 started [icmp pinger #7]
      8805:20171109:152437.100 server #111 started [preprocessing manager #1]
      8818:20171109:152438.004 server #114 started [preprocessing worker #3]
      8817:20171109:152438.015 server #113 started [preprocessing worker #2]
      8807:20171109:152438.099 server #112 started [preprocessing worker #1]
    Code:
    <?php
    // Zabbix GUI configuration file.
    global $DB;
    
    $DB['TYPE']     = 'MYSQL';
    $DB['SERVER']   = 'localhost';
    $DB['PORT']     = '0';
    $DB['DATABASE'] = 'zabbix';
    $DB['USER']     = 'zabbix';
    $DB['PASSWORD'] = '<redacted>';
    
    // Schema name. Used for IBM DB2 and PostgreSQL.
    $DB['SCHEMA'] = '';
    
    $ZBX_SERVER	 = 'localhost';
    $ZBX_SERVER_PORT = '10051';
    $ZBX_SERVER_NAME = 'Zabbix';
    
    $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;



    How in the devil do I get the web frontend to the right version? I've uninstalled and reinstalled zabbix-web, but all that's done is make me grouchy. Anyone have ideas?
  • dampersand
    Junior Member
    • Apr 2016
    • 16

    #2
    So, for those reading in the future, I came up with a workaround immediately after posting, but... it seems like there's a bigger problem somewhere.

    in /var/www/html/zabbix/include is the file 'defines.inc.php', that defines a crapton of php variables (including the following):

    Code:
    define('ZABBIX_VERSION',        '3.4.4');
    define('ZABBIX_API_VERSION',    '3.4.4');
    define('ZABBIX_EXPORT_VERSION', '3.4');
    define('ZABBIX_DB_VERSION',     3040000);
    These lines were all set to 3.2 numbers (ie, 3020000).

    I'm not sure why the upgrade to the correct zabbix-web didn't fix these (which means Something Is Not Right), and I'm a little scared about it, but the workaround is in place and I can access my toys.

    If anyone has any ideas as to the cause, please lemme know.

    Comment

    • dampersand
      Junior Member
      • Apr 2016
      • 16

      #3
      Yup. Went to investigate a little farther.

      The php frontend source of zabbix-3.4.4 differs tremendously from the stuff in the packages. No idea what happened here, but my workaround-ed 'charts.php' is throwing an error in the web console.

      thankfully, installing the frontend from sources is actually really easy - according to the zabbix material, all one does is move crap from the zabbix-3.4.4/frontend/php/ directory to the /var/www/html/zabbix/ directory (reserving old conf files, etc). Hopefully that helps someone in the future.

      Nonetheless, I'd LOVE to know why updating zabbix-web doesn't actually update zabbix-web. Not looking forward to the next upgrade (when I'll have completely forgotten all that I've done for this one). Bonus points for any tips.

      Comment

      • allexpetrov
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2017
        • 361

        #4
        Hi there,

        Which command you've issued to upgrade the packages?

        Regards,
        Alex!

        Comment

        • dampersand
          Junior Member
          • Apr 2016
          • 16

          #5
          oh, y'know, the usual...

          Code:
          #copy all the config files and stop all the services
          yum clean all
          yum upgrade
          yum upgrade zabbix-web
          yum upgrade zabbix-*
          #wtf is going on why isn't this working
          rm /etc/yum.repos.d/zabbix
          rpm -Uvh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.centos.noarch.rpm
          yum update
          yum upgrade zabbix-*
          #maybe it's being served from another repository?
          rm /etc/yum.repos.d/zabbix
          yum clean all
          yum update
          yum search zabbix
          #nope, no zabbix without the zabbix repo
          rpm -Uvh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.centos.noarch.rpm
          #etc, etc, etc
          etc etc etc... just a lot of trying every command I know of! There's way more in there, but who can remember what they did five days ago? I sure can't xD

          Comment

          • kaspars.mednis
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Oct 2017
            • 349

            #6
            You tried

            Code:
            http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.centos.noarch.rpm
            Zabbix 3.4.4 is without -centos
            Code:
            http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
            you can look at http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/

            Regards,
            Kaspars

            Comment

            • allexpetrov
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • May 2017
              • 361

              #7
              To avoid any misunderstanding and misconfiguration - please visit this page: https://www.zabbix.com/documentation...es/rhel_centos

              etc etc etc... just a lot of trying every command I know of! There's way more in there, but who can remember what they did five days ago? I sure can't xD
              Use history command

              Regards,
              Alex!

              Comment

              Working...