You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "ghdestiny (via GitHub)" <gi...@apache.org> on 2025/06/09 06:49:05 UTC
[I] [Bug] [Connector-jdbc] The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12] [seatunnel]
ghdestiny opened a new issue, #9411:
URL: https://github.com/apache/seatunnel/issues/9411
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
### What happened
how to fix it?
### SeaTunnel Version
2.3.10
### SeaTunnel Config
```conf
env {
parallelism = 4
job.mode = "BATCH"
}
source{
Jdbc {
url = "jdbc:sqlserver://data.fl-semp.cn:9531;databasename=dbo_formal"
driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
connection_check_timeout_sec = 100
user = "sempdata"
password = "sempSQLSERVER2018!@#"
query = "select MENUID,MENUNAME,MENUVIEWNAME,MENUURL,MENUTYPE,PARENTCODE,TABORDER from (select top 6 * from( select row_number ( ) over ( order by MENUID asc) as rownumber, MENUID,MENUNAME,MENUVIEWNAME,MENUURL,MENUTYPE,PARENTCODE,TABORDER from T1_SYSTEM_MUEN ) as a where rownumber > 0 order by MENUID asc) a"
}
}
transform {
# If you would like to get more information about how to configure seatunnel and see full list of transform plugins,
# please go to https://seatunnel.apache.org/docs/transform-v2/sql
}
sink {
HdfsFile {
fs.defaultFS = "hdfs://hadoop001.yz.com:8020"
path = "/yz-largeadata/test_sqlserver"
file_format_type = "text"
field_delimiter = ","
row_delimiter = "\n"
#filename_extension = ""
custom_filename = true
is_enable_transaction = true
file_name_expression = "part_${transactionId}"
filename_time_format = "yyyy.MM.dd"
single_file_mode = true
}
}
```
### Running Command
```shell
../bin/seatunnel.sh --config ./test_mssql.template -m local
```
### Error Exception
```log
Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:228)
at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34)
Caused by: org.apache.seatunnel.api.table.factory.FactoryException: ErrorCode:[API-06], ErrorDescription:[Factory initialize failed] - Unable to create a source for identifier 'Jdbc'.
at org.apache.seatunnel.api.table.factory.FactoryUtil.restoreAndPrepareSource(FactoryUtil.java:168)
at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:86)
at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSource(MultipleTableJobConfigParser.java:376)
at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:227)
at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getLogicalDag(ClientJobExecutionEnvironment.java:123)
at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.execute(ClientJobExecutionEnvironment.java:191)
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:165)
... 2 more
Caused by: org.apache.seatunnel.api.table.catalog.exception.CatalogException: ErrorCode:[API-03], ErrorDescription:[Catalog initialize failed] - Failed connecting to jdbc:sqlserver://data.fl-semp.cn:9531;databasename=dbo_formal via JDBC.
at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.getConnection(AbstractJdbcCatalog.java:124)
at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.open(AbstractJdbcCatalog.java:130)
at org.apache.seatunnel.connectors.seatunnel.jdbc.utils.JdbcCatalogUtils.getTables(JdbcCatalogUtils.java:80)
at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSource.<init>(JdbcSource.java:57)
at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSourceFactory.lambda$createSource$0(JdbcSourceFactory.java:80)
at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:180)
at org.apache.seatunnel.api.table.factory.FactoryUtil.restoreAndPrepareSource(FactoryUtil.java:136)
... 8 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: "encrypt" property is set to "true" and "trustServerCertificate" property is set to "false" but the driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption: Error: The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]. ClientConnectionId:21aff5e9-b4d2-49ed-b2d3-3bd3cdbaf4f8
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:4580)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1965)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:4102)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:3690)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:3499)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:2207)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1320)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.getConnection(AbstractJdbcCatalog.java:120)
... 14 more
Caused by: javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]
at sun.security.ssl.Alert.createSSLException(Alert.java:131)
at sun.security.ssl.Alert.createSSLException(Alert.java:117)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:318)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:274)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:265)
at sun.security.ssl.ServerHello$ServerHelloConsumer.onServerHello(ServerHello.java:943)
at sun.security.ssl.ServerHello$ServerHelloConsumer.consume(ServerHello.java:869)
at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:377)
at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:444)
at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:422)
at sun.security.ssl.TransportContext.dispatch(TransportContext.java:182)
at sun.security.ssl.SSLTransport.decode(SSLTransport.java:152)
at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1401)
at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1309)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:440)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1854)
... 22 more
```
### Zeta or Flink or Spark Version
_No response_
### Java or Scala Version
_No response_
### Screenshots
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Connector-jdbc] The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12] [seatunnel]
Posted by "ghdestiny (via GitHub)" <gi...@apache.org>.
ghdestiny closed issue #9411: [Bug] [Connector-jdbc] The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]
URL: https://github.com/apache/seatunnel/issues/9411
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Connector-jdbc] The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12] [seatunnel]
Posted by "rxbyes (via GitHub)" <gi...@apache.org>.
rxbyes commented on issue #9411:
URL: https://github.com/apache/seatunnel/issues/9411#issuecomment-3323339392
修改最新版本JDK的配置文件: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, anon, NULL, \
include jdk.disabled.namedCurves
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Connector-jdbc] The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12] [seatunnel]
Posted by "ghdestiny (via GitHub)" <gi...@apache.org>.
ghdestiny commented on issue #9411:
URL: https://github.com/apache/seatunnel/issues/9411#issuecomment-2955727980
抱歉,这不是bug,是环境导致的,虽然我修改了java.security文件,但是问题是由于系统全局的加密策略导致的。
解决方法:
某些 Linux 发行版(如 RHEL/CentOS 8+、Ubuntu 20.04+)有全局加密策略,可能禁用了 TLSv1。
检查并切换加密策略(以 RHEL/CentOS 为例):
update-crypto-policies --show
如果输出是 FUTURE 或 DEFAULT,TLSv1 可能被禁用。可以切换到 LEGACY 模式(允许 TLSv1):
sudo update-crypto-policies --set LEGACY
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org