linux sqlserver数据库连接问题-The server selected protocol version TLS10 is not accepted by client preferences[TLS12]
linux sqlserver数据库连接问题
异常提示:
The server selected protocol version TLS10 is not accepted by client preferences[TLS12]
- 问题原因:
客户端引用的协议版本是TLS12,但是服务端协议版本是10.简单说就是数据库版本太低,需要降低客户端版本才能适配
解决方式:
-
查询java.security文件
locate java.security -
更新java.security文件
去除java.security文件中jdk.tls.disabledAlgorithms 禁用TLS1.*算法配置,这样客户端就可以适配低版本协议
java.security 文件最终配置:
# Note: This property is currently used by the JDK Reference implementation.
# It is not guaranteed to be examined and used by other implementations.
#
# Example:
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, \
DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
include jdk.disabled.namedCurves
扩展内容
locate命令用于查找文件, 它比find命令的搜索速度快, 它需要一个数据库.这里是centos的配置流程
- 安装locate命令
yum -y install mlocate - 生成数据库
updatedb
参考资料
The server selected protocol version TLS10 is not accepted by client preferences [TLS12] 报错处理
喜欢关注一下,不喜欢点评一下
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?