FreeTDS / freetds

Official FreeTDS repository
http://www.freetds.org/
GNU General Public License v2.0
455 stars 154 forks source link

Update from 1.3 to 1.4.16 breaks connection (RHEL 8) #594

Open pkbarbiedoll opened 1 week ago

pkbarbiedoll commented 1 week ago

Our FreeTDS packages were updated last night (RHEL 8):

@@System
    Upgrade       freetds-1.4.16-1.el8.x86_64                                              @epel
    Upgraded      freetds-1.3.3-1.el8.x86_64                                               @@System
    Upgrade       freetds-devel-1.4.16-1.el8.x86_64                                        @epel
    Upgraded      freetds-devel-1.3.3-1.el8.x86_64                                         @@System
    Upgrade       freetds-libs-1.4.16-1.el8.x86_64                                         @epel
    Upgraded      freetds-libs-1.3.3-1.el8.x86_64  

Immediately following this update, I am showing errors when attempting to log in to an existing configured server using the same password as before:

[user@rhel8 ~]# tsql -S egServer90 -U sqlserveruser
Password: 
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Error 20002 (severity 9):
      Adaptive Server connection failed
Error 20002 (severity 9):
      Adaptive Server connection failed
There was a problem connecting to the server
[user@rhel8 ~]# 

Our config looks like this:

[egServer90]
        host = 12.34.56.78
        instance = INSTANCENAME
        port = 1433
        tds version = 8.0
        text size = 64512
        client charset = UTF-8

We have connectivity to the configured server

[user@nbs ~]# telnet 12.34.56.78 1433
Trying 12.34.56.78...
Connected to 12.34.56.78.
Escape character is '^]'.
^]

telnet> quit
Connection closed.
[user@nbs ~]# 

Any insights on or solutions to this issue greatly appreciated. Again the connection worked just before updating from 1.3.3 to 1.4.16.

We could simply downgrade but would like to know how to get this working under 1.4.16.

Thanks, Adria

freddy77 commented 1 week ago

Probably you should check https://www.freetds.org/userguide/ChoosingTdsProtocol.html and https://www.freetds.org/userguide/logging.html. Protocol 8.0 is now invalid. The dump will help if it's another issue. Another issue could be the TLS version, you could check options in https://www.freetds.org/userguide/freetdsconf.html. Or you could even need to lower the TLS protocols if server is pretty old.

pkbarbiedoll commented 1 week ago

In troubleshooting yesterday I did in fact change TDS from 8.0 to 7.4 as our SQL Server requires that version per documentation. This yielded the same error as above.

Note that the physical server hardware did not change - we merely updated from FreeTDS 1.3 to 1.4.

freddy77 commented 6 days ago

Did you enable the logs to see at which point it's failing? From NEWS file (https://github.com/FreeTDS/freetds/blob/master/NEWS.md) TLS 1 was disabled by default, maybe your server is not recent enough, you could try enabling it.