MSSQL: Unable to connect to a instance with different port than 1433

Hey guys,

i'm trying to reach a MS SQL instance with the port 1436. But he tries to connect over 1433. I think it is a bug:


If you think: "How could you know that it tries to connect over 1433?" Answer: We have another instance on this machine which is running with the port 1433. The file ERRORLOG is full of the denied access logins.


Thanks in advance.

Comments

  • Sorry forget to publish the version:


  • Hello,

    1.check which driver the script is using:

    cd /home/lpar2rrd/lpar2rrd # or where your LPAR2RRD work dir is

    cat data/SQLServer/sqlserver_driver.txt

    {ODBC Driver 13 for SQL Server}


    2.and then check file "/etc/odbcinst.ini" to make sure there isn't specified port under the used driver

    example:

    [ODBC Driver 13 for SQL Server]

    Description=Microsoft ODBC Driver 13 for SQL Server

    Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2

    UsageCount=1

    Port=1433

  • Hey,


    Output /home/lpar2rrd/lpar2rrd/data/SQLServer/sqlserver_driver.txt:::

    {ODBC Driver 18 for SQL Server}


    Output /etc/odbcinst.ini:

    [ODBC Driver 18 for SQL Server]

    Description=Microsoft ODBC Driver 18 for SQL Server

    Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.1.so.1.1

    UsageCount=1


    There is a entry for FREETDS with a port 1433:

    [FreeTDS]

    Description=Free Sybase & MS SQL Driver

    Driver=/usr/lib/libtdsodbc.so

    Setup=/usr/lib/libtdsS.so

    Driver64=/usr/lib64/libtdsodbc.so

    Setup64=/usr/lib64/libtdsS.so

    Port=1433



    BUT i hope that the application is not using this section ;-)


    Kind regards

  • It uses the first section for sure. I believe that the issue has been found, download these 2 patches, apply them and try the connection test again, if it goes ok then the data should start collecting as well


    https://download.lpar2rrd.com/patch/7.43-2-1-g4983/sqlserver-apitest.pl.gz

    https://download.lpar2rrd.com/patch/7.43-2-1-g4983/sqlserver-db2json.pl.gz

    Gunzip it and copy to /home/lpar2rrd/lpar2rrd/bin (755, lpar2rrd owner)

    If your web browser gunzips it automatically then just rename it: mv sqlserver-apitest.pl.gz sqlserver-apitest.pl ; mv sqlserver-db2json.pl.gz sqlserver-db2json.pl

  • Thanks for quick reply. I will check it.

    I also found a "workaround": I've added the named instance behind the hostname.... ;-) But the port number is also not working here...You can enter any port you want there ;-)

  • Hi damerva,

    your fix works fine.

    Thanks.

    Kind regards and have a nice day.

Sign In or Register to comment.