今天部署项目遇到一个大坑,调试了一天,最后终于解决。
项目开发框架:spring boot
应用服务器环境:windows server 2012
数据库环境:MS SQL server 2014 端口:1444
连接池:druid
症状:连接数据库报地址端口冲突
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 10.1.12.2, port 1444 has failed. Error: "Address already in use: no further information. 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.".
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:206)
at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:257)
at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2385)
at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:567)
at com.microsoft.sq

本文记录了在Spring Boot项目中,由于使用Druid连接MS SQL Server时出现的端口冲突问题及解决办法。在Windows Server 2012环境下,配置Druid连接池时将测试相关属性设为false可解决此问题。
最低0.47元/天 解锁文章
1261

被折叠的 条评论
为什么被折叠?



