本文主要是介绍datax採集sqlserver報錯:not accepted by client preferences [TLS13, TLS12],希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
datax報錯:
Security providers: [SUN version 1.8, SunRsaSign version 1.8, SunEC version 1.8, SunJSSE version 1.8, SunJCE version 1.8, SunJGSS version 1.8, SunSASL version 1.8, XMLDSig version 1.8, SunPCSC version 1.8]
SSLContext provider info: Sun JSSE provider(PKCS12, SunX509/PKIX key/trust factories, SSLv3/TLSv1/TLSv1.1/TLSv1.2/TLSv1.3)
SSLContext provider services:
[SunJSSE: KeyPairGenerator.RSA -> sun.security.rsa.RSAKeyPairGenerator$Legacyaliases: [1.2.840.113549.1.1, OID.1.2.840.113549.1.1]
, SunJSSE: Signature.SHA1withRSA -> sun.security.rsa.RSASignature$SHA1withRSAaliases: [1.2.840.113549.1.1.5, 1.3.14.3.2.29, OID.1.2.840.113549.1.1.5]attributes: {SupportedKeyClasses=java.security.interfaces.RSAPublicKey|java.security.interfaces.RSAPrivateKey}
, SunJSSE: SSLContext.TLS -> sun.security.ssl.SSLContextImpl$TLSContextaliases: [SSL]
, SunJSSE: SSLContext.TLSv1 -> sun.security.ssl.SSLContextImpl$TLS10Contextaliases: [SSLv3]
, SunJSSE: Signature.MD2withRSA -> sun.security.rsa.RSASignature$MD2withRSAaliases: [1.2.840.113549.1.1.2, OID.1.2.840.113549.1.1.2]attributes: {SupportedKeyClasses=java.security.interfaces.RSAPublicKey|java.security.interfaces.RSAPrivateKey}
, SunJSSE: KeyFactory.RSA -> sun.security.rsa.RSAKeyFactory$Legacyaliases: [1.2.840.113549.1.1, OID.1.2.840.113549.1.1]
, SunJSSE: Signature.MD5withRSA -> sun.security.rsa.RSASignature$MD5withRSAaliases: [1.2.840.113549.1.1.4, OID.1.2.840.113549.1.1.4]attributes: {SupportedKeyClasses=java.security.interfaces.RSAPublicKey|java.security.interfaces.RSAPrivateKey}
, SunJSSE: KeyStore.PKCS12 -> sun.security.pkcs12.PKCS12KeyStore
, SunJSSE: TrustManagerFactory.SunX509 -> sun.security.ssl.TrustManagerFactoryImpl$SimpleFactory
, SunJSSE: KeyManagerFactory.SunX509 -> sun.security.ssl.KeyManagerFactoryImpl$SunX509
, SunJSSE: TrustManagerFactory.PKIX -> sun.security.ssl.TrustManagerFactoryImpl$PKIXFactoryaliases: [SunPKIX, X509, X.509]
, SunJSSE: KeyManagerFactory.NewSunX509 -> sun.security.ssl.KeyManagerFactoryImpl$X509aliases: [PKIX]
, SunJSSE: SSLContext.Default -> sun.security.ssl.SSLContextImpl$DefaultSSLContext
, SunJSSE: SSLContext.TLSv1.1 -> sun.security.ssl.SSLContextImpl$TLS11Context
, SunJSSE: Signature.MD5andSHA1withRSA -> sun.security.ssl.RSASignature
, SunJSSE: SSLContext.TLSv1.3 -> sun.security.ssl.SSLContextImpl$TLS13Context
, SunJSSE: SSLContext.TLSv1.2 -> sun.security.ssl.SSLContextImpl$TLS12Context
]
java.ext.dirs: /opt/module/java/jre/lib/ext:/usr/java/packages/lib/ext
2024-03-19 16:41:56.399 [job-0] WARN DBUtil - test connection of [jdbc:sqlserver://xxxx:1433;DatabaseName=xx;trustServerCertificate=true] failed, for Code:[DBUtilErrorCode-10], Description:[连接数据库失败. 请检查您的 账号、密码、数据库名称、IP、Port或者向 DBA 寻求帮助(注意网络环境).]. - 具体错误信息为:com.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]”。 ClientConnectionId:ef10e9bb-35f2-42b3-9a2b-ca633c934856.
2024-03-19 16:41:56.403 [job-0] ERROR RetryUtil
解決方案:
找到java的安裝路徑下的/java.security
我的路徑是:
/opt/module/java/jre/lib/security/java.security
修改以下內容:
jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \include jdk.disabled.namedCurves
之前的:
修改的地方:去掉 TLSv1, TLSv1.1,
jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, \DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \include jdk.disabled.namedCurves
終於解決了,卡了好幾天了
这篇关于datax採集sqlserver報錯:not accepted by client preferences [TLS13, TLS12]的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!