我正在尝试使用 JDBC 驱动程序建立与 Sybase ASE 15.7 的 SSL 连接,但没有成功。我尝试了以下选项:
使用 JTDS 1.25 驱动程序 (jtds-1.2.5.jar)
使用以下连接字符串:
jdbc:jtds:sybase://host:port;databaseName=dbname;ssl=request
我有
Network error IOException: Connection refused
使用 Jconnect 4 (jconn4.jar)
使用以下连接字符串:
jdbc:sybase:Tds:host:port/dbname?ENABLE_SSL=true
我有
java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s) ... java.sql.SQLException: I/O Error: DB server closed connection.
我检查了 Sybase 日志,看到以下错误:
kernel SSL or Crypto Error Message: 'The SSL handshake failed. Root error: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol'.
看起来 Sybase 服务器需要 SSL 连接,但 java 客户端仍然没有使用 SSL(尽管连接字符串属性标记 ssl=true)。
尝试搜索 Sybase 文档时运气不佳,无论是针对此错误还是针对带有 JConnect 的 SSL。
任何答案将不胜感激 - 我对驱动程序的类型和配置很灵活。
谢谢