Ad Widget

Collapse

Zabbix 3.2.0 and MySQL 5.7 Connection Issues

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • e-coder
    Junior Member
    • Sep 2016
    • 8

    #1

    Zabbix 3.2.0 and MySQL 5.7 Connection Issues

    Hi Guys!

    I've been dealing with this now for hours an i can't find any problems...

    When i start up zabbix-server on my CentOS 7 it cannot connect to the mysql DB.

    Error is:
    [Z3001] connection to database 'zabbix' failed: [0] received invalid response to SSL negotiation: J

    Database runs at Port 3306 und Zabbix-Server is also configured to 3306.

    I disabled ssl in MySQL with the ssl_skip option in the /etc/my.cnf -> didn't change a thing.
    I generated self signed Certs for MySQL -> same result.

    Anybody got an idea?
  • guzzijason
    Senior Member
    • Dec 2015
    • 106

    #2
    Is the database running on the same host as zabbix server, or remote?

    __Jason

    Comment

    • e-coder
      Junior Member
      • Sep 2016
      • 8

      #3
      Yes both on the same machine!

      Comment

      • guzzijason
        Senior Member
        • Dec 2015
        • 106

        #4
        Then you probably want to be connecting using a unix domain socket rather than TCP port. Comment out the DBHost and DBPort config lines, and make sure you have a DBSocket set in zabbix_server.conf, like so:

        # DBHost=localhost
        # DBPort=3306
        DBSocket=/var/lib/mysql/mysql.sock


        (your socket file may or may not live in a different path, so you might need to modify that line.)

        __Jason

        Comment

        • e-coder
          Junior Member
          • Sep 2016
          • 8

          #5
          Hi!

          I tried that, but then zabbix wants to connect to mysql via port 5432 ??

          21430:20160923:094820.034 database is down: reconnecting in 10 seconds
          21430:20160923:094830.035 [Z3001] connection to database 'zabbix' failed: [0] could not connect to server: Connection refused
          Is the server running on host "localhost" (::1) and accepting
          TCP/IP connections on port 5432?
          could not connect to server: Connection refused
          Is the server running on host "localhost" (127.0.0.1) and accepting
          TCP/IP connections on port 5432?

          Comment

          • guzzijason
            Senior Member
            • Dec 2015
            • 106

            #6
            Interesting. 5432 is, I believe, the postgresql server port. Are you sure you have the correct zabbix-server package installed? There are separate server (and front-end) packages for pgsql and mysql.

            If you were using the mysql package and were configured to use unix domain sockets, the connection error should look like this:

            19718:20160922:140146.457 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")


            __Jason

            Comment

            • e-coder
              Junior Member
              • Sep 2016
              • 8

              #7
              OMG - thats it - i installed via "yum install zabbix-server" and it installed pgsql AND mysql

              I removed the package zabbix-server-pgsql and now it works.

              Weird though, because in the config file you can tell zabbix which one to use, but ok.

              Thanks for your help!!!

              This thread can be closed now.

              Comment

              • registration_is_lame
                Senior Member
                • Nov 2007
                • 148

                #8
                Originally posted by e-coder
                I disabled ssl in MySQL with the ssl_skip option in the /etc/my.cnf -> didn't change a thing.
                I generated self signed Certs for MySQL -> same result.

                Anybody got an idea?
                To disable SSL use this instead of ssl_skip in my.cnf for 5.7 mysql

                ssl=0

                Comment

                Working...