rundeck / docs

Rundeck documentation
https://github.com/rundeck/rundeck
69 stars 146 forks source link

Upgrading to 3.3.4 mysql notes should mention `verifyServerCertificate=false` setting #687

Open gschueler opened 4 years ago

gschueler commented 4 years ago

Describe the bug

From JP:

looks like mariadb driver is not working as expected when the db is TLS configured original jdbc working fine using com.mysql.cj.jdbc.Driver driver:

dataSource.url = jdbc:mysql://host:3307/db?autoReconnect=true&useSSL=true&verifyServerCertificate=false&requireSSL=true

using mariadb driver org.mariadb.jdbc.Driver same url: rundeck won't start showing this output:

Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:450) ~[?:1.8.0_265]
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:317) ~[?:1.8.0_265]
    at sun.security.validator.Validator.validate(Validator.java:262) ~[?:1.8.0_265]
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330) ~[?:1.8.0_265]
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:237) ~[?:1.8.0_265]
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132) ~[?:1.8.0_265]
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1670) ~[?:1.8.0_265]
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:226) ~[?:1.8.0_265]
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1082) ~[?:1.8.0_265]
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:1010) ~[?:1.8.0_265]
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1079) ~[?:1.8.0_265]
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1388) ~[?:1.8.0_265]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1416) ~[?:1.8.0_265]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1400) ~[?:1.8.0_265]

looks like verifyServerCertificate=false is not a mariadb attribute: info here i changed above attribute for trustServerCertificate=true and the connection works fine now.

Source page

https://docs.rundeck.com/docs/upgrading/upgrading-to-rundeck-3.3.4.html#mysql

gschueler commented 4 years ago

Note: can link to the mysql connector/J download instructions here https://docs.rundeck.com/docs/administration/configuration/database/mysql.html#mysql-jdbc-driver