kubernetes-apim
kubernetes-apim copied to clipboard
Unable to connect to Data Source : Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Hi,
Without adding these &verifyServerCertificate=false&useSSL=false&requireSSL=false parameters to jdbc urls, example :
the following exception is thrown:
[2017-08-14 06:29:31,065] ERROR - RegistryContext Unable to get instance of the registry context org.wso2.carbon.registry.core.exceptions.RegistryException: Unable to connect to Data Source at org.wso2.carbon.registry.core.config.RegistryConfigurationProcessor.populateRegistryConfig(RegistryConfigurationProcessor.java:165) [...] ... 60 more Caused by: java.net.SocketException: Broken pipe (Write failed) at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) at java.net.SocketOutputStream.write(SocketOutputStream.java:155) at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:431) at sun.security.ssl.OutputRecord.write(OutputRecord.java:417) at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:886) at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:857) at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:727) at sun.security.ssl.Handshaker.sendChangeCipherSpec(Handshaker.java:1124) at sun.security.ssl.ClientHandshaker.sendChangeCipherAndFinish(ClientHandshaker.java:1216) at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:1128) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:348) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026) at sun.security.ssl.Handshaker.process_record(Handshaker.java:961) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397) at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:163) ... 65 more
[2017-08-14 06:29:31,077] ERROR - RegistryCoreServiceComponent Failed to activate Registry Core bundle
.....................................................................................................
Best regards, Youcef HILEM
We did not encounter this issue when using the mysql-connector-java-5.1.34-bin.jar connector. Probably this issue comes in latest mysql connectors. Thank you for reporting.
You are right. I used mysql-connector-java-5.1.43-bin.jar I just switched to mysql-connector-java-5.1.34.jar and the problem is gone.
We may need to investigate this issue further and if it is not possible to resolve it from WSO2 side, at least mention the required MySQL JDBC driver version in the getting started guide. Thanks!