Ad Widget

Collapse

Upgrading from 2.2.12 to next version

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zabbixfk
    Senior Member
    • Jun 2013
    • 256

    #1

    Upgrading from 2.2.12 to next version

    Hello All,

    I know this may be a simple/silly question, but need some advise on upgrading my zbx instances which are running 2.2.12 as of now.
    I have 1 master (1 cold with db readonly replication) and about 5 proxy instances.
    I see there are 3.0LTS and 3.2x available now, but going through the release notes it seems i have to do 2.2.x to 2.4 then 2.4 to 3.0 then 3.0 to 3.2 it seems, can somebody clarify ? Is it good enough to go to 2.4 ( 2.4.8 is listed under sources), or to go ahead to 3.0.x?
    Since i have lot of devices monitored ( ~ 4K) and about 6 servers for upgrade , i am in a dilemma where and what to do next.

    What is the next stable version i should be upgrading to, and any pointers are greatly helpful.

    Thanks.
  • zabbixfk
    Senior Member
    • Jun 2013
    • 256

    #2
    *bump*

    Thanks

    Comment

    • zabbixfk
      Senior Member
      • Jun 2013
      • 256

      #3
      Upgrading zabbix server 2.2.12 to next version

      *bump*

      Thanks

      Comment

      • elemarmb
        Member
        • Mar 2009
        • 53

        #4
        I try to migrate to 3.2.4 from 2.2.17 !
        Don't work !
        Difference in tables !

        Comment

        • zabbixfk
          Senior Member
          • Jun 2013
          • 256

          #5
          Upgrading from 2.2.12 to next version

          Thanks for the reply.

          How did things work for you then? What was your upgrade versions / procedures? can you share some info?

          Thanks

          Comment

          • elemarmb
            Member
            • Mar 2009
            • 53

            #6
            Another team insert some views in database.
            After removed the views, the upgrade was successful.

            Comment

            • zabbixfk
              Senior Member
              • Jun 2013
              • 256

              #7
              Upgrading from 2.2.12 to next version

              Thanks for the reply.
              Are you saying,
              - copying / taking backup of existing database , configuration files, binaries
              - Compiling new version binary
              - starting up zabbix - which in tern run upgrade scripts for db ( mysql)

              above steps enough to get things right?

              Thanks

              Comment

              • elemarmb
                Member
                • Mar 2009
                • 53

                #8
                Yes.
                Very fast conversion of database in Postgres with 252GB.
                Don't forget the proxies !
                Last edited by elemarmb; 02-05-2017, 14:14.

                Comment

                • zabbixfk
                  Senior Member
                  • Jun 2013
                  • 256

                  #9
                  Upgrading from 2.2.12 to next version

                  Thanks for the quick reply.

                  Mine is MySql so not sure how things would look like.
                  Yes, i would need to upgrade a cold machine, see if DB starts well, then need to do the proxies.
                  I am thinking to go for 3.0 LTS from 2.2.12, i guess only
                  - copying existing binaries to safe locaiton.
                  - moving out config files
                  - compiling 3.0LTS binaries
                  - starting zbx, which would take care of DB upgrade
                  is the plan, do you see any issue here?

                  I have about 7 proxies , 1 master server ( and 1 cold/backup server with MySql DB only replication).
                  So first -
                  - bring down master
                  - upgrade master, copy required config files.
                  - start zbx server , as DB size is close to 51GB it might take some time.
                  then bring up one by one proxy. If everything go well, then bring up cold backup with replication.

                  Any pointers?

                  Thanks

                  Comment

                  • elemarmb
                    Member
                    • Mar 2009
                    • 53

                    #10
                    Prepare the proxies to quickly running in new version. Compile the new proxy in another computer and copy the new binaries to proxies in the /home/zabbix directory. Copy the old running version to backup copy.
                    Execute config in the server.
                    Stop all server and proxies.
                    Rename old server binary.
                    Make install zabbix server.
                    Run zabbix server and execute tail -f /var/logzabbix/zabbix-server to see statistic of conversion.
                    When conversion conclude, its is fast, start new binary proxies with new version.
                    Rollback the backup of DB, if necessary, and running old binaries.

                    If you use virtual machines then you can use test environment.
                    I make a new proxy server with new operating system, then I copy this machine to all others proxies.

                    Comment

                    • zabbixfk
                      Senior Member
                      • Jun 2013
                      • 256

                      #11
                      Upgrading from 2.2.12 to next version

                      Thanks for the reply.

                      I am kind of stuck in upgrading PHP.
                      I had PHP 5.3.3 which is from official repo , for CentOS 6.5 Now i added remi repo and upgraded php to 5.4.5 ( from remi repo) and while ugrading mysql got too upgraded from 5.1.73 to 5.5.56 ( again from remi) and i am not able to start mysql.
                      Its complaining about wrong filesize on ibdata1.

                      Any pointers are helpful.

                      Thanks

                      Comment

                      • zabbixfk
                        Senior Member
                        • Jun 2013
                        • 256

                        #12
                        Upgrading from 2.2.12 to next version

                        * bump *

                        Can some one help here. I would like to know,

                        - in case if i make mysql as 5.5.x and then source the db which was taken dump from mysql 5.1.73 to this and then run zabbix upgrade will this work?

                        What is the correct steps here to be followed?

                        Current setup:
                        MySQL 5.1.73-log
                        PHP - 5.3.3
                        Zabbix - 2.2.12

                        Upgrading to : Zabbix 3.0.6 - LTS

                        Thanks

                        Comment

                        • elikatz79
                          Junior Member
                          • May 2017
                          • 17

                          #13
                          Here is what we did:

                          I ran into a similar scenario not long ago (though we have much much smaller infrastructure) - here is the thread:


                          And here is what we did, in our case it was a migration to a new server but if you can take the risk use this as an upgrade procedure:

                          Late afternoon on Friday I was able to find a solution using this following link:

                          (I don't understand Russian but Google translate was good enough...)

                          and using the Zabbix instruction for the rest of the process:


                          Here is the procedure I ran:
                          1. Install a new server with version 2.2.x (our original is 2.2.9, I installed 2.2.18)
                          2. Drop the data base schema that was created with the new installation using the link i added. (bottom of the page)
                          3. Import the production backup to the new server.
                          4. Make sure the zabbix server is stopped: systemctl stop zabbix-server
                          5. Install the 3.x repo: rpm -Uvh http://repo.zabbix.com/zabbix/3.2/rh...el7.noarch.rpm
                          6. Upgrade Zabbix: yum upgrade zabbix-server-mysql zabbix-web-mysql zabbix-agent
                          7. Login to the data base and disable foreign keys checks: SET GLOBAL FOREIGN_KEY_CHECKS=0;
                          8. Start Zabbix (which upgrades the data base, tail your logs): systemctl start zabbix-server
                          9. Enable the foreign keys checks: SET GLOBAL FOREIGN_KEY_CHECKS=1;

                          I ran this process successfully twice on my dry run server, will run the actual upgrade this coming Friday.

                          Comment

                          • zabbixfk
                            Senior Member
                            • Jun 2013
                            • 256

                            #14
                            Upgrading from 2.2.12 to next version

                            Thanks for the reply.

                            I use to compile zabbix sources, let me try this approach and get back to community.

                            Thanks

                            Comment

                            • zabbixfk
                              Senior Member
                              • Jun 2013
                              • 256

                              #15
                              Upgrading from 2.2.12 to next version (Too Long)

                              However this approach did not help me.

                              I couldn't upgrade using rpm's as first one ( which is already installed ) 2.2.12 is from sources.
                              here is the logs.
                              1). I was able to set up a vm with 2.2.12. and mysql 5.1.33 ( on CentOS 6.3 - which is my production also).
                              2). Imported production DB
                              3). All well. I could add couple of hosts and it worked fine.

                              Now, installed zabbix repo
                              Code:
                              [root@ZABBIX-NEW lib]# rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
                              Retrieving http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
                              warning: /var/tmp/rpm-tmp.NpAHf2: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY
                              Preparing...                ########################################### [100%]
                                 1:zabbix-release         ########################################### [100%]
                              [root@ZABBIX-NEW lib]#
                              I was able to query for new zabbix version ,
                              Code:
                              [root@ZABBIX-NEW lib]# yum info zabbix-server-mysql
                              Loaded plugins: fastestmirror, security
                              Loading mirror speeds from cached hostfile
                               * base: mirror.nbrc.ac.in
                               * extras: mirror.nbrc.ac.in
                               * updates: mirror.nbrc.ac.in
                              Available Packages
                              Name        : zabbix-server-mysql
                              Arch        : x86_64
                              Version     : 3.0.10
                              Release     : 1.el7
                              Size        : 1.7 M
                              Repo        : zabbix
                              Summary     : Zabbix server for MySQL or MariaDB database
                              URL         : http://www.zabbix.com/
                              License     : GPLv2+
                              Description : Zabbix server with MySQL or MariaDB database support.
                              
                              [root@ZABBIX-NEW lib]#
                              When i tried to upgrade, it failed.
                              Code:
                              [root@ZABBIX-NEW lib]# yum upgrade zabbix-server-mysql zabbix-web-mysql zabbix-agent
                              
                              Package(s) zabbix-server-mysql available, but not installed.
                              Package(s) zabbix-web-mysql available, but not installed.
                              Package(s) zabbix-agent available, but not installed.
                              No Packages marked for Update
                              [root@ZABBIX-NEW lib]#
                              So i went ahead and install them ((Too Long))
                              Code:
                              [root@ZABBIX-NEW lib]# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
                              
                              Setting up Install Process
                              Resolving Dependencies
                              --> Running transaction check
                              ---> Package zabbix-agent.x86_64 0:3.0.10-1.el7 will be installed
                              --> Processing Dependency: systemd for package: zabbix-agent-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: zabbix-agent-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: zabbix-agent-3.0.10-1.el7.x86_64
                              ---> Package zabbix-server-mysql.x86_64 0:3.0.10-1.el7 will be installed
                              --> Processing Dependency: systemd for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: fping for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libiksemel.so.3()(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libnetsnmp.so.31()(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              ---> Package zabbix-web-mysql.noarch 0:3.0.10-1.el7 will be installed
                              --> Processing Dependency: zabbix-web = 3.0.10-1.el7 for package: zabbix-web-mysql-3.0.10-1.el7.noarch
                              --> Running transaction check
                              ---> Package fping.x86_64 0:3.10-1.el7 will be installed
                              --> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: fping-3.10-1.el7.x86_64
                              ---> Package iksemel.x86_64 0:1.4-2.el7.centos will be installed
                              --> Processing Dependency: libgnutls.so.28(GNUTLS_1_4)(64bit) for package: iksemel-1.4-2.el7.centos.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: iksemel-1.4-2.el7.centos.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: iksemel-1.4-2.el7.centos.x86_64
                              --> Processing Dependency: libgnutls.so.28()(64bit) for package: iksemel-1.4-2.el7.centos.x86_64
                              ---> Package zabbix-agent.x86_64 0:3.0.10-1.el7 will be installed
                              --> Processing Dependency: systemd for package: zabbix-agent-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: zabbix-agent-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: zabbix-agent-3.0.10-1.el7.x86_64
                              ---> Package zabbix-server-mysql.x86_64 0:3.0.10-1.el7 will be installed
                              --> Processing Dependency: systemd for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libnetsnmp.so.31()(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              ---> Package zabbix-web.noarch 0:3.0.10-1.el7 will be installed
                              --> Processing Dependency: php >= 5.4 for package: zabbix-web-3.0.10-1.el7.noarch
                              --> Processing Dependency: php-ldap for package: zabbix-web-3.0.10-1.el7.noarch
                              --> Running transaction check
                              ---> Package fping.x86_64 0:3.10-1.el7 will be installed
                              --> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: fping-3.10-1.el7.x86_64
                              ---> Package iksemel.x86_64 0:1.4-2.el7.centos will be installed
                              --> Processing Dependency: libgnutls.so.28(GNUTLS_1_4)(64bit) for package: iksemel-1.4-2.el7.centos.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: iksemel-1.4-2.el7.centos.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: iksemel-1.4-2.el7.centos.x86_64
                              --> Processing Dependency: libgnutls.so.28()(64bit) for package: iksemel-1.4-2.el7.centos.x86_64
                              ---> Package php-ldap.x86_64 0:5.3.3-49.el6 will be installed
                              ---> Package zabbix-agent.x86_64 0:3.0.10-1.el7 will be installed
                              --> Processing Dependency: systemd for package: zabbix-agent-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: zabbix-agent-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: zabbix-agent-3.0.10-1.el7.x86_64
                              ---> Package zabbix-server-mysql.x86_64 0:3.0.10-1.el7 will be installed
                              --> Processing Dependency: systemd for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libnetsnmp.so.31()(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: zabbix-server-mysql-3.0.10-1.el7.x86_64
                              ---> Package zabbix-web.noarch 0:3.0.10-1.el7 will be installed
                              --> Processing Dependency: php >= 5.4 for package: zabbix-web-3.0.10-1.el7.noarch
                              --> Finished Dependency Resolution
                              Error: Package: zabbix-agent-3.0.10-1.el7.x86_64 (zabbix)
                                         Requires: libc.so.6(GLIBC_2.14)(64bit)
                              Error: Package: zabbix-web-3.0.10-1.el7.noarch (zabbix)
                                         Requires: php >= 5.4
                                         Installed: php-5.3.3-49.el6.x86_64 (@base)
                                             php = 5.3.3-49.el6
                              Error: Package: iksemel-1.4-2.el7.centos.x86_64 (zabbix-non-supported)
                                         Requires: libgnutls.so.28()(64bit)
                              Error: Package: iksemel-1.4-2.el7.centos.x86_64 (zabbix-non-supported)
                                         Requires: libgnutls.so.28(GNUTLS_1_4)(64bit)
                              Error: Package: fping-3.10-1.el7.x86_64 (zabbix-non-supported)
                                         Requires: libc.so.6(GLIBC_2.15)(64bit)
                              Error: Package: zabbix-agent-3.0.10-1.el7.x86_64 (zabbix)
                                         Requires: libc.so.6(GLIBC_2.17)(64bit)
                              Error: Package: zabbix-server-mysql-3.0.10-1.el7.x86_64 (zabbix)
                                         Requires: systemd
                              Error: Package: zabbix-server-mysql-3.0.10-1.el7.x86_64 (zabbix)
                                         Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
                              Error: Package: iksemel-1.4-2.el7.centos.x86_64 (zabbix-non-supported)
                                         Requires: libc.so.6(GLIBC_2.15)(64bit)
                              Error: Package: zabbix-agent-3.0.10-1.el7.x86_64 (zabbix)
                                         Requires: systemd
                              Error: Package: zabbix-server-mysql-3.0.10-1.el7.x86_64 (zabbix)
                                         Requires: libc.so.6(GLIBC_2.17)(64bit)
                              Error: Package: zabbix-server-mysql-3.0.10-1.el7.x86_64 (zabbix)
                                         Requires: libc.so.6(GLIBC_2.14)(64bit)
                              Error: Package: zabbix-server-mysql-3.0.10-1.el7.x86_64 (zabbix)
                                         Requires: libmysqlclient.so.18()(64bit)
                              Error: Package: zabbix-server-mysql-3.0.10-1.el7.x86_64 (zabbix)
                                         Requires: libnetsnmp.so.31()(64bit)
                              Error: Package: iksemel-1.4-2.el7.centos.x86_64 (zabbix-non-supported)
                                         Requires: libc.so.6(GLIBC_2.14)(64bit)
                               You could try using --skip-broken to work around the problem
                               You could try running: rpm -Va --nofiles --nodigest
                              [root@ZABBIX-NEW lib]#
                              Now my only hope is this

                              1). Compile zabbix 3.0.10 LTS, Take a PHP >5.4, MySQL 5.5.x
                              2). Try to source production DB which is of zabbix 2.2.12 ,
                              3). Start zabbix, and see if it tries to upgrade database

                              Fingers crossed.
                              Just curios, there's no entry in manuals on how to go about older version to new, in case if i missed please point out.

                              Thanks

                              Comment

                              Working...