Ad Widget

Collapse

Zabbix Cannot connect to the database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • baloc90
    Junior Member
    • Nov 2017
    • 16

    #16
    Originally posted by kaspars.mednis
    Now please edit the /etc/zabbix/zabbix_server.conf, and correct DBPassword=<password>
    here goes your password from zabbix DB user you created

    after that
    Code:
    systemctl start zabbix-server
    and please provide th following output after that
    Code:
    tail /var/log/zabbix/zabbix_server.log

    Comment

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

      #17
      Seems some problems with semaphores

      If its only a test system, and selinux is disabled, try removing all semaphores, and then start zabbix-server again

      getenforce
      ipcrm -a
      systemctl start zabbix-server
      tail /etc/zabbix/zabbix-server.log

      provide the output please

      Comment

      • baloc90
        Junior Member
        • Nov 2017
        • 16

        #18
        Originally posted by kaspars.mednis
        Seems some problems with semaphores

        If its only a test system, and selinux is disabled, try removing all semaphores, and then start zabbix-server again

        getenforce
        ipcrm -a
        systemctl start zabbix-server
        tail /etc/zabbix/zabbix-server.log

        provide the output please

        Comment

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

          #19
          Sorry,
          Code:
           tail /var/log/zabbix/zabbix_server.log

          Comment

          • baloc90
            Junior Member
            • Nov 2017
            • 16

            #20
            Originally posted by kaspars.mednis
            Sorry,
            Code:
             tail /var/log/zabbix/zabbix_server.log
            Dear Kaspars,
            When i run the above command there is error.

            Comment

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

              #21
              Hello !

              it seems a problem on OS level with semaphores
              Provide please output of commands below

              Code:
              ipcs -su
              Code:
              cat /proc/sys/kernel/sem

              Comment

              • baloc90
                Junior Member
                • Nov 2017
                • 16

                #22
                Originally posted by kaspars.mednis
                Hello !

                it seems a problem on OS level with semaphores
                Provide please output of commands below

                Code:
                ipcs -su
                Code:
                cat /proc/sys/kernel/sem
                Dear Kaspars,

                Comment

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

                  #23
                  You have run out of semaphore arrays

                  used arrays = 128
                  SEMMNI = 128

                  You can read more about this problem here


                  SEMMSL maximum number of semaphores per array
                  SEMMNS maximum semaphores system-wide
                  SEMOPM maximum operations per semop call
                  SEMMNI maximum arrays

                  you can try the following command without rebooting your system

                  Code:
                  sysctl -w kernel.sem="250 32000 100 256"
                  and try to start zabbix-server after the change

                  if everything works as expected, make the change permanent

                  Code:
                  echo "kernel.sem=250 32000 100 256" >> /etc/sysctl.conf
                  Regards,
                  Kaspars

                  Comment

                  • baloc90
                    Junior Member
                    • Nov 2017
                    • 16

                    #24
                    Originally posted by kaspars.mednis
                    You have run out of semaphore arrays

                    used arrays = 128
                    SEMMNI = 128

                    You can read more about this problem here


                    SEMMSL maximum number of semaphores per array
                    SEMMNS maximum semaphores system-wide
                    SEMOPM maximum operations per semop call
                    SEMMNI maximum arrays

                    you can try the following command without rebooting your system

                    Code:
                    sysctl -w kernel.sem="250 32000 100 256"
                    and try to start zabbix-server after the change

                    if everything works as expected, make the change permanent

                    Code:
                    echo "kernel.sem=250 32000 100 256" >> /etc/sysctl.conf
                    Regards,
                    Kaspars
                    Dear Kaspars,
                    Still cannot

                    Comment

                    • Atsushi
                      Senior Member
                      • Aug 2013
                      • 2028

                      #25
                      You have not been able to create a database for Zabbix.
                      Did not you just create a table before?
                      Please try creating a database again.

                      Code:
                      # mysql -u root -p
                      mysql> drop database zabbix;
                      mysql> create database zabbix character set utf8 collate utf8_bin;
                      mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>';
                      mysql> quit
                      # zcat /usr/share/doc/zabbix-server-mysql-3.4.4/create.sql.gz | mysql -uzabbix -p zabbix

                      Comment

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

                        #26
                        Zabbix Server cannot work with a zabbix proxy database
                        You somehow managed to made a zabbix proxy, not a zabbix server database
                        They are completely diferent DBs for different purpouses

                        Because your database is empty, i suggest you do the following steps

                        Code:
                        mysql
                        drop database zabbix;
                        create database zabbix character set utf8 collate utf8_bin;
                        grant all privileges on zabbix.* to zabbix@localhost identified by '<password>';
                        quit;
                        cat /usr/share/doc/zabbix-server-mysql-3.4.4/create.sql.gz | mysql zabbix -uzabbix -p

                        Comment

                        • baloc90
                          Junior Member
                          • Nov 2017
                          • 16

                          #27
                          thank you guys for the support. I logged in admin / password but it does not work.

                          Comment

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

                            #28


                            This is the Zabbix “Welcome” screen. Enter the user name Admin with password zabbix to log in as a Zabbix superuser.

                            Comment

                            • baloc90
                              Junior Member
                              • Nov 2017
                              • 16

                              #29
                              Thanks all,
                              There are differences between admin and Admin.

                              Comment

                              • baloc90
                                Junior Member
                                • Nov 2017
                                • 16

                                #30
                                Dear Kaspars,
                                I will learn more. However,I thank you very much for your support.Once again thank you so much.
                                Regards,

                                Comment

                                Working...