Ad Widget

Collapse

Upgrading Zabbix and Alma

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Verunet
    Junior Member
    • Jun 2023
    • 2

    #1

    Upgrading Zabbix and Alma

    Hi there

    We're trying to upgrade our Zabbix4 server running on CentOS6, and want to keep our ~260GB MariaDB which is currently v5.5. So all old versions.

    I've read that RHEL8 is the minimum OS so after unsuccessfully trying various inplace approaches I've deployed a fresh Alma8 along with Zabbix6 and MariaDB v10.5.

    I used mysqldump to copy the DB across to the new server and have it running in the MariaDB v10.5. All services are running but Zabbix can't talk to the database and throws the common error:

    "[Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)"


    I've confirmed the socket is present in that location and have successfully logged into the database with the zabbix user account via the socket: mysql -u zabbix -p -S /var/lib/mysql/mysql.sock The zabbix user can see the zabbix database with show databases.

    I've run mysqlcheck --all-databases which returns all healthy tables. I've configured the zabbix_server.conf correctly as far as I can tell (I copied the relevant values from the working Zabbix4 instance).

    I'm running out of things to check and wanted to see if this is even a viable approach to upgrade Zabbix in the first place - should this work? Have I missed something somewhere?

    Anyway, hope someone may be able to point me in the right direction here please?

    Many thanks.


    Matt
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Since the error code is 13, it may be a permission issue. Are you checked your SELinux settings?

    Comment

    • Verunet
      Junior Member
      • Jun 2023
      • 2

      #3
      Thanks for getting back to me Atsushi. I double checked and SELinux was disabled (and rebooted) however a colleague here also suggested checking permissions and to try resetting them post-SELinux disable:

      restorecon -RFv /

      As soon as I did this Zabbix connected to the database and began updating it:

      1796:20230615:101829.210 database connection re-established
      1796:20230615:101829.586 character set name or collation name that is not supported by Zabbix found in 133 column(s) of database "zabbix"
      1796:20230615:101829.586 only character set(s) "utf8,utf8mb3,utf8mb4" and corresponding collation(s) "utf8_bin,utf8mb3_bin,utf8mb4_bin" should be used in database
      1796:20230615:101829.594 current database version (mandatory/optional): 04040000/04040002
      1796:20230615:101829.594 required mandatory version: 06000000
      1796:20230615:101829.594 optional patches were found
      1796:20230615:101829.594 starting automatic database upgrade
      1796:20230615:101829.710 completed 0% of database upgrade
      1796:20230615:101838.580 slow query: 5.861552 sec, "alter table `items` add constraint c_items_1 foreign key (`hostid`) references `hosts` (`hostid`) on delete cascade"
      1796:20230615:101838.595 completed 1% of database upgrade
      1796:20230615:101838.691 completed 2% of database upgrade
      1796:20230615:101838.812 completed 3% of database upgrade​

      After completing the update successfully Zabbix server stopped but the last message in the log was a repeat of this:

      3665:20230615:102048.515 character set name or collation name that is not supported by Zabbix found in 132 column(s) of database "zabbix"
      3665:20230615:102048.515 only character set(s) "utf8,utf8mb3,utf8mb4" and corresponding collation(s) "utf8_bin,utf8mb3_bin,utf8mb4_bi
      3665:20230615:102048.517 current database version (mandatory/optional): 06000000/06000020
      3665:20230615:102048.517 required mandatory version: 06000000
      3665:20230615:102048.519 database could be upgraded to use primary keys in history tables
      3665:20230615:102048.520 database is not upgraded to use double precision values​​​

      Which is why I don't think it will start now. Being such an old database it didn't have the supported set name or character set so I'll look to update that next.

      I'll post back here the results after checking/updating the character set. Thanks again.

      Comment

      Working...