2016-12-02 30 views
1

rds-combined-ca-bundle.pem certファイルを分解してインポートできました各キーストアを個別にキーストアに追加します。次に、-Djavax.net.ssl.trustStore = path_to_truststore_file と-Djavax.net.ssl.trustStorePassword = passwordをjvmオプションに追加しました。不明なサポートされていないレコードバージョン:しかし、HikariCpを使用して一つのアプリケーション上で、それはエラーjavax.net.ssl.SSLExceptionを生成javax.net.ssl.SSLException:サポートされていないレコードバージョンAmazon RDSおよびHikariCpデータソース設定のMySQL SSL接続でUnknown-0.0エラー

<?xml version="1.0" encoding="UTF-8"?> 
 
<Context path="/contextname" unpackWAR="true" useNaming="true" swallowOutput="false"> 
 
    <Resource removeAbandoned="true" 
 
      removeAbandonedTimeout="60" 
 
      name="jdbc/data" auth="Container" 
 
      type="javax.sql.DataSource" 
 
      maxActive="200" 
 
      maxIdle="60" 
 
      maxWait="20000" 
 
      username="rootuserssl" 
 
      password="rootusersslpassword" 
 
      driverClassName="com.mysql.jdbc.Driver" 
 
      url="jdbc:mysql://myinstance.123456789012.us-east-1.rds.amazonaws.com:3306/dbname?autoReconnect=true&amp;verifyServerCertificate=true&amp;requireSSL=true&amp;useSSL=true"/> 
 
</Context>

:それは、以下のように、JNDIの設定を使用して一つのアプリケーション上で働いていました-0.0。以下はその構成です。

<?xml version="1.0" encoding="UTF-8"?> 
 
<Context path="/contextnametwo" unpackWAR="true" useNaming="true" swallowOutput="false"> 
 
    <Resource name="jdbc/data" auth="Container" 
 
     driverClassName="com.mysql.jdbc.Driver" 
 
     jdbcUrl="jdbc:mysql://myinstance.123456789012.us-east-1.rds.amazonaws.com:3306/dbname?verifyServerCertificate=true&amp;useSSL=true&amp;requireSSL=true" 
 
     factory="com.zaxxer.hikari.HikariJNDIFactory" 
 
     type="javax.sql.DataSource" 
 
     maximumPoolSize="50" 
 
     connectionTestQuery="SELECT 1" 
 
     idleTimeout="300000" 
 
     maxLifetime="600000" 
 
     dataSource.implicitCachingEnabled="true" 
 
     dataSource.cachePrepStmts="true" 
 
     dataSource.prepStmtCacheSize="250" 
 
     dataSource.prepStmtCacheSqlLimit="2048" 
 
     dataSource.useServerPrepStmts="true" 
 
     catalog="dbname" 
 
     username="rootuserssl" 
 
     password="rootusersslpassword" 
 
/> 
 
</Context>

私はHikariCpを使用するアプリケーションに間違って何をしているのですか?

答えて

0

これは、mysqlの代わりにmariadbコネクタ(https://downloads.mariadb.org/connector-java/)を使用して解決しました。魅力のように働いた。

+0

MariaDB JDBCドライバは私に別のエラーを与えました: 'java.net.SocketException:ソフトウェアは接続を中止しました:recv failed' – Adam

関連する問題