JDBC可用性组连接错误

JDBC availability group connection error

我正在尝试通过 sqljdbc 驱动程序 v4 连接到可用性组,但出现错误

com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the 
host ..., port 1433 has failed. Error: ".... Verify the 
connection properties. Make sure that an instance of SQL Server is running on 
the host and accepting TCP/IP connections at the port. Make sure that TCP 
connections to the port are not blocked by a firewall.".

连接字符串是

jdbc:sqlserver://...;multiSubnetFailover=true;databaseName=...;responseBuffering=full;selectMethod=direct;user=...;password=...

有什么可能出错的想法吗?直接用机器名就可以连接,而且1433端口是开放的,所以应该不是端口问题,也不是服务器启动问题。

问题是由服务器名称引起的,使用完全限定域名 (FQDN) 解决了这个问题。