Ad Widget

Collapse

My Proxies continually die

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TecDragon
    Member
    • Nov 2019
    • 63

    #1

    My Proxies continually die

    Zabbix 6.2, Ubuntu 22.04 - MariaDB won't start on these with no good error. I found on another post to delete the /var/lib/mysql log files which works but only temporarily. The only resolution I have been able to find so far is to completely delete and re-install the proxy. Hoping someone may have ran into this and knows a better fix.

    I have rebuilt six of them so far, and more but different ones keep dying. I guess eventually I will have them all rebuilt.

    Does postgres have these issues? MariaDB for me atleast has been problematic.

    Click image for larger version  Name:	image.png Views:	0 Size:	38.9 KB ID:	452894
    Last edited by TecDragon; 19-10-2022, 22:18.
  • LinuxEngi
    Junior Member
    • May 2018
    • 5

    #2
    Are these each different Zabbix Proxy servers? Are you trying to run in HA, or just a bunch of proxies?

    If you are not running in HA you need to be using a separate MariaDB for each proxy. (Servers/Proxies cannot share a SQL database)

    If you are running in HA each proxy will need to be added as a node and HA Cluster will need to be configured accordingly
    Last edited by LinuxEngi; 19-10-2022, 23:31.

    Comment

    • Markku
      Senior Member
      Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
      • Sep 2018
      • 1781

      #3
      The first question I have: if you are not able to find out why your MariaDB "dies", why are you using MariaDB in the first place? Is there a reason you cannot use the SQLite3 variant of the proxy? It's easier to deploy and maintain.

      Otherwise you need to tell us more about your observations and configurations.

      Markku

      Comment

      • TecDragon
        Member
        • Nov 2019
        • 63

        #4
        just picked what appeared to be the default and what I could find documentation on via the internet. MariaDB wont start on those proxies, the only error message is a benign one about the innodb, that when googled showed to be nothing. One article I read said to delete the innodb log file out of the /var/lib/mysql directory. That works... till the server reboots, then I have to delete it again, and the process continues in this manner. Rebuilding the proxy from scratch tends to fix it, was hoping maybe someone else had a similar issue and how did they fix it?

        Comment

        • TecDragon
          Member
          • Nov 2019
          • 63

          #5
          Up to 7 dead today - these proxies will run along for months and then just die all with the same exact issue.

          Is sqllite more reliable? I will switch to using it. Or postgres however most of the documentation is written surrounding MariaDB
          Last edited by TecDragon; 20-10-2022, 16:51.

          Comment

          • Markku
            Senior Member
            Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
            • Sep 2018
            • 1781

            #6
            What does MariaDB say when it "dies"?

            Anyway, I still recommend using the proxy with SQLite3 unless you know you need something else. Install the zabbix-proxy-sqlite3 package and run these:

            sudo mkdir /var/lib/zabbix
            sudo chown zabbix.zabbix /var/lib/zabbix


            and set DBName=/var/lib/zabbix/zabbix_proxy in the proxy configuration file before starting the proxy.

            If/when upgrading the proxy later, delete the database file after stopping the proxy, before starting the new proxy.

            That's pretty much all you need to know to run it. No need to initialize any databases, the proxy will automatically create the database file whenever it is missing.

            Markku

            Comment

            • TecDragon
              Member
              • Nov 2019
              • 63

              #7
              Markku First you normally are correct, and I appreciate you being on this forum. Thank you.

              Second, I am going to take your advice and just start rebuilding these with sqlite3, kinda sucks but whatevs.​


              ​​​

              Comment

              • cyber
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2006
                • 4807

                #8
                You can also have that sqlite db on /dev/shm.. Might be faster, than on disk..

                Comment

                • TecDragon
                  Member
                  • Nov 2019
                  • 63

                  #9
                  thanks cyber Markku

                  Anyway to just switch from MariaDB to sqllite3? I have tried on two of these and failed both times, even when I install the zabbix-sqllite and change the conf it still looks for mariadb and wont start.

                  Comment

                  • Markku
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                    • Sep 2018
                    • 1781

                    #10
                    I'm not a Ubuntu specialist but let's try:

                    sudo apt purge mariadb-server
                    sudo apt purge zabbix\*


                    Then follow the proxy installation instructions in zabbix.com download section.

                    Markku

                    Comment

                    • TecDragon
                      Member
                      • Nov 2019
                      • 63

                      #11
                      Click image for larger version

Name:	image.png
Views:	424
Size:	8.3 KB
ID:	453068
                      even after doing all of that I still get the above Markku thanks though for trying to help. It is like it have mysql embedded into it somewhere.

                      Comment

                      • Markku
                        Senior Member
                        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                        • Sep 2018
                        • 1781

                        #12
                        Can you show us the commands you used for installing Zabbix after the commands I showed you?

                        Markku

                        Comment

                        • TecDragon
                          Member
                          • Nov 2019
                          • 63

                          #13
                          Markku It didn't make sense, if I purged both they shouldn't exist - so - I just did the whole process over again and it worked. I must have missed a step.

                          Ubuntu 22.04
                          Purge Maria DB

                          sudo apt-get purge mariadb-*
                          sudo apt purge zabbix\*
                          sudo apt autoremove
                          sudo reboot

                          Then ran through the steps, to reinstall the zabbix proxy with sql-lite and it works.

                          Thanks! that will save me a batch of time. ​

                          I kind of feel bad about removing MariaDB but if SQLLite winds up being more reliable and easier to maintain then - party time.
                          Last edited by TecDragon; 21-10-2022, 21:57.

                          Comment

                          • cyber
                            Senior Member
                            Zabbix Certified SpecialistZabbix Certified Professional
                            • Dec 2006
                            • 4807

                            #14
                            SQlite is good for up to some 5-600 NVPS. Over that it may start lagging. Housekeeper starts to take time etc.. Does not really help after that, if you throw a bunch of hardware on it or not... it is just internally not keeping up with amount of data...

                            Comment

                            Working...