Ad Widget

Collapse

install zabbix freebsd no conected postgresql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • edsonwolf
    Junior Member
    • Dec 2021
    • 4

    #1

    install zabbix freebsd no conected postgresql

    I installed zabbix on freebsd with pkg ins zabbix64-server zabbix64-frontend-php83 php83-pgsql mod_php83 and configured it, everything went well, opened the configuration page, configured the page, connected to postgresql, everything was fine. But the zabbix server does not connect to postgresql. Even configuring it for postgresql it tries to connect to mysql.
    Thank you in advance for your feedback​

    DBName=zabbix
    DBUser=zab_user
    DBPassword=
    DBHost=127.0.0.1
    DBPort=5432
    DBSchema=public​


    2677:20231102:113130.826 Starting Zabbix Server. Zabbix 6.4.7 (revision 4e555c6d64d).
    2677:20231102:113130.827 ****** Enabled features ******
    2677:20231102:113130.827 SNMP monitoring: YES
    2677:20231102:113130.827 IPMI monitoring: NO
    2677:20231102:113130.827 Web monitoring: YES
    2677:20231102:113130.827 VMware monitoring: YES
    2677:20231102:113130.827 SMTP authentication: YES
    2677:20231102:113130.827 ODBC: YES
    2677:20231102:113130.827 SSH support: YES
    2677:20231102:113130.827 IPv6 support: YES
    2677:20231102:113130.827 TLS support: YES
    2677:20231102:113130.827 ******************************
    2677:20231102:113130.827 using configuration file: /usr/local/etc/zabbix64/zabbix_server.conf
    2677:20231102:113230.888 [Z3001] connection to database 'zabbix' failed: [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 0
    2677:20231102:113230.888 database is down: reconnecting in 10 seconds
    2677:20231102:113340.991 [Z3001] connection to database 'zabbix' failed: [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 0
    2677:20231102:113340.991 database is down: reconnecting in 10 seconds
    2677:20231102:113451.021 [Z3001] connection to database 'zabbix' failed: [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 0
    2677:20231102:113451.021 database is down: reconnecting in 10 seconds
    2677:20231102:113601.123 [Z3001] connection to database 'zabbix' failed: [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 0
    2677:20231102:113601.123 database is down: reconnecting in 10 seconds

  • solution
    Senior Member
    • Jun 2020
    • 269

    #2
    In zabbix_server.conf

    ### Option: DBHost
    # Database host name.
    # If set to localhost, socket is used for MySQL.
    # If set to empty string, socket is used for PostgreSQL.
    # the TNS_ADMIN environment variable to specify the directory where the tnsnames.ora file is located.
    #
    # Mandatory: no
    # Default:
    DBHost=


    Wellington

    Comment

    • edsonwolf
      Junior Member
      • Dec 2021
      • 4

      #3
      Same message
      5366:20231102:124128.370 Starting Zabbix Server. Zabbix 6.4.7 (revision 4e555c6d64d).
      5366:20231102:124128.371 ****** Enabled features ******
      5366:20231102:124128.371 SNMP monitoring: YES
      5366:20231102:124128.371 IPMI monitoring: NO
      5366:20231102:124128.371 Web monitoring: YES
      5366:20231102:124128.371 VMware monitoring: YES
      5366:20231102:124128.371 SMTP authentication: YES
      5366:20231102:124128.371 ODBC: YES
      5366:20231102:124128.371 SSH support: YES
      5366:20231102:124128.371 IPv6 support: YES
      5366:20231102:124128.371 TLS support: YES
      5366:20231102:124128.371 ******************************
      5366:20231102:124128.371 using configuration file: /usr/local/etc/zabbix64/zabbix_server.conf
      5366:20231102:124128.375 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
      5366:20231102:124128.375 database is down: reconnecting in 10 seconds
      5366:20231102:124138.451 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
      5366:20231102:124138.451 database is down: reconnecting in 10 seconds

      Comment

      • edsonwolf
        Junior Member
        • Dec 2021
        • 4

        #4
        The zabbix package does not come with postgresql support, only mysql.

        MDB5: off
        - MDB6: off
        - MYSQL: on
        - MYSQLDV: off
        - ORACLE: off
        - PGSQL: off​

        I compiled it with support and everything worked fine.
        Thanks for the feedback solution

        Comment

        Working...