TinyTds - 自适应服务器不可用或不存在

问题描述 投票:0回答:1

机器1:

>tsql -C
Compile-time settings (established with the "configure" script)
                            Version: freetds v0.91.90
             freetds.conf directory: /etc
     MS db-lib source compatibility: no
        Sybase binary compatibility: no
                      Thread safety: yes
                      iconv library: yes
                        TDS version: 4.2
                              iODBC: no
                           unixodbc: yes
              SSPI "trusted" logins: no
                           Kerberos: no

我安装了freeTDS并能够连接到mssql,

> TDSVER=4.2 tsql -S xx.xx.xxx.xxx -U xxxx -P xxxx -p 1433
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
1>

所以,当我尝试从TinyTds连接时,它会抛出以下错误,

Adaptive server is unavailable or does not exist

机器2:

配置与机器1中的配置相同,并且从该机器,它与TinyTds连接到mssql

>tsql -C
    Compile-time settings (established with the "configure" script)
                                Version: freetds v0.91.90
                 freetds.conf directory: /etc
         MS db-lib source compatibility: no
            Sybase binary compatibility: no
                          Thread safety: yes
                          iconv library: yes
                            TDS version: 4.2
                                  iODBC: no
                               unixodbc: yes
                  SSPI "trusted" logins: no
                               Kerberos: no

我安装了freeTDS并能够连接到mssql,

> TDSVER=4.2 tsql -S xx.xx.xxx.xxx -U xxxx -P xxxx -p 1433
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
1>

Able to connect to the server using TinyTds

我不知道为什么会发生这种情况或在哪里检查,我不认为这是防火墙问题,因为我能够从终端连接,我也验证了它的凭据等,除了连接是不成功。任何帮助非常感谢!

注意:场景是,

我正在通过jenkins运行测试,它使用从属'machine1'运行ruby进程,在那里它无法连接到sqlserver(配置了freetds)抛出Adaptive Server不可用或不存在错误。

当我将奴隶修改为'machine2'时,它正在建立连接,尽管具有与machine1相同的freetds配置

sql-server ruby linux freetds tiny-tds
1个回答
0
投票

在所有连接上启用端口1433后,我的问题得到了解决

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.