Ad Widget

Collapse

Zabbix 7.0 MSSQL ODBC Connection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Greg101
    Junior Member
    • Sep 2022
    • 3

    #1

    Zabbix 7.0 MSSQL ODBC Connection

    I am currently hitting a brick wall with setting up the ODBC connections on Zabbix 7.0.
    This was working fine on Zabbix 6.0. Post the 7.0 upgrade of the Zabbix server and proxies, all ODBC connections stopped working from within Zabbix.

    From the proxy, I am able to successfully use isql to reach the MS SQL server.
    Using the same DSN, username and password as the isql test fails in Zabbix with the following error:
    Cannot connect to ODBC DSN: [SQL_ERROR]:[HYT00][0][[unixODBC][Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired]|[08001][11002][[unixODBC][Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2AFA]|[08001][11002][[unixODBC][Microsoft][ODBC Driver 17 for SQL Server]A network-related or instance-specific error has occurred while establishin]
    I am fairly sure that i do not need to configure the Zabbix Agent with anything special as I am attempting to use ODBC connections, but i am not 100% sure.
    Any direction on where to look next would be appreciated.
  • NgRox
    Member
    • Jun 2022
    • 44

    #2
    I recommend using freetds and seeing if it works. I also had several problems with the MSSQL ODBC Driver.

    Comment

    • Greg101
      Junior Member
      • Sep 2022
      • 3

      #3
      Originally posted by NgRox
      I recommend using freetds and seeing if it works. I also had several problems with the MSSQL ODBC Driver.
      Thanks for the suggestion!
      FreeTDS is installed and configured. I can test my connection to the MSSQL server using:

      Code:
      tsql -LS 'DSNName'-U 'user' -P 'password'
      But, when testing in Zabbix, i get the following error:
      Code:
      Cannot connect to ODBC DSN: [SQL_ERROR]:[08S01][20009][[unixODBC][FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist]|[08001][0][[unixODBC][FreeTDS][SQL Server]Unable to connect to data source]|[01000][20013][[unixODBC][FreeTDS][SQL Server]Unknown host machine name.]
      Which just seems like a generic FreeTDS error?

      Comment

      • santosra02
        Junior Member
        • May 2023
        • 21

        #4
        Well, for me it looks like some issue at odbcinst.ini and/or odbc.ini

        Can you check and confirm if every binary in "Driver=" really exist in their path ?

        Comment

        • NgRox
          Member
          • Jun 2022
          • 44

          #5
          Can you check and confirm if tds is installed, if yes, check the driver path

          "Unknown host machine name"

          this must be taken into account

          Comment

          Working...