0

I cant establish a connection to MySQL workbench using in a database block.

This is the connection setup: enter image description here

Testing would run in a problem with a description like this:

org.mule.runtime.api.connection.ConnectionException: Could not obtain connection from data source
  org.mule.runtime.api.connection.ConnectionException: Could not obtain connection from data source
  Caused by: org.mule.extension.db.api.exception.connection.ConnectionCreationException: Could not obtain connection from data source
  Caused by: java.sql.SQLException: Cannot get connection for URL jdbc:mysql://localhost:3036/proiect?logger=org.mule.extension.db.api.logger.MuleMySqlLogger$$EnhancerByCGLIB$$42140f7b : Communications link failure
  
  The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
  Caused by: java.sql.SQLException: Cannot get connection for URL jdbc:mysql://localhost:3036/proiect?logger=org.mule.extension.db.api.logger.MuleMySqlLogger$$EnhancerByCGLIB$$42140f7b : Communications link failure
  
  The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at org.mule.extension.db.internal.domain.connection.JdbcConnectionFactory.createConnection(JdbcConnectionFactory.java:57)
    at org.mule.extension.db.internal.domain.connection.DbConnectionProvider.connect(DbConnectionProvider.java:139)
    at org.mule.extension.db.internal.domain.connection.DbConnectionProvider.connect(DbConnectionProvider.java:71)
    at org.mule.runtime.module.extension.internal.runtime.config.ClassLoaderConnectionProviderWrapper.connect(ClassLoaderConnectionProviderWrapper.java:60)
    at org.mule.runtime.core.internal.connection.ConnectionUtils.connect(ConnectionUtils.java:49)
    at org.mule.runtime.core.internal.connection.AbstractConnectionProviderWrapper.connect(AbstractConnectionProviderWrapper.java:64)
    at org.mule.runtime.core.internal.connection.ErrorTypeHandlerConnectionProviderWrapper.connect(ErrorTypeHandlerConnectionProviderWrapper.java:64)
    at org.mule.runtime.core.internal.connection.ConnectionUtils.connect(ConnectionUtils.java:49)
    at org.mule.runtime.core.internal.connection.AbstractConnectionProviderWrapper.connect(AbstractConnectionProviderWrapper.java:64)
    at org.mule.runtime.core.internal.connection.DefaultConnectionProviderWrapper.connect(DefaultConnectionProviderWrapper.java:52)
    at org.mule.runtime.core.internal.connection.NullConnectionManagementStrategy.getConnectionHandler(NullConnectionManagementStrategy.java:40)
    at org.mule.runtime.core.internal.connection.DefaultConnectionManager.getConnection(DefaultConnectionManager.java:241)
    at org.mule.runtime.core.internal.connection.DefaultConnectionManager.lambda$testConnectivity$1(DefaultConnectionManager.java:160)
    at org.mule.runtime.core.internal.connection.DefaultConnectionManager.doTestConnectivity(DefaultConnectionManager.java:176)
    at org.mule.runtime.core.internal.connection.DefaultConnectionManager.testConnectivity(DefaultConnectionManager.java:152)
    at org.mule.runtime.core.internal.connection.DelegateConnectionManagerAdapter$EagerConnectionManagerAdapter.testConnectivity(DelegateConnectionManagerAdapter.java:176)
    at org.mule.runtime.core.internal.connection.DelegateConnectionManagerAdapter.testConnectivity(DelegateConnectionManagerAdapter.java:98)
    at org.mule.runtime.module.extension.api.tooling.ExtensionConnectivityTestingStrategy.testConnectivity(ExtensionConnectivityTestingStrategy.java:82)
    at org.mule.runtime.core.internal.connectivity.DefaultConnectivityTestingService.testConnection(DefaultConnectivityTestingService.java:88)
    at org.mule.runtime.config.internal.LazyConnectivityTestingService.testConnection(LazyConnectivityTestingService.java:57)
    at com.mulesoft.agent.services.tooling.MuleAgentConnectivityTestingService.testConnection(MuleAgentConnectivityTestingService.java:77)
    at com.mulesoft.agent.external.handlers.tooling.ToolingRequestHandler.lambda$applicationTestConnection$19(ToolingRequestHandler.java:482)
    at com.mulesoft.agent.util.ResponseHelper.response(ResponseHelper.java:88)
    at com.mulesoft.agent.external.handlers.tooling.ToolingRequestHandler.applicationTestConnection(ToolingRequestHandler.java:481)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103)
    at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:372)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:876)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1623)
    at com.mulesoft.agent.rest.RequestLoggingFilter.doFilter(RequestLoggingFilter.java:95)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
    at com.mulesoft.agent.rest.AuthorizationFilter.doFilter(AuthorizationFilter.java:49)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1711)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1347)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1678)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1249)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at org.eclipse.jetty.server.Server.handle(Server.java:505)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:781)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:917)
    at java.base/java.lang.Thread.run(Thread.java:834)

I really tried to work out what is happening but cant manage. Also the flow look like this:

enter image description here

I could use some help for sure :)

  • The images are working, you have to click the link – Jigau Rafael Jun 22 '21 at 12:06
  • Please use text instead of images. See https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question for more details on the reason. For Mule configurations and flows you should add the XML as text in the question. – aled Jun 22 '21 at 13:27
  • Does this answer your question? [com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure](https://stackoverflow.com/questions/2983248/com-mysql-jdbc-exceptions-jdbc4-communicationsexception-communications-link-fai) – aled Jun 22 '21 at 13:27
  • no really.. i dont know what could be the problem, the error doesnt look very specific... – Jigau Rafael Jun 22 '21 at 13:33
  • There doesn't seem to be a response from the DB server. It may be a networking issue or the config is incorrect. – aled Jun 22 '21 at 15:59
  • the server is ready and i used it many times for java apps – Jigau Rafael Jun 23 '21 at 06:23
  • On the same computer using the same JDBC URL and drivers? – aled Jun 23 '21 at 13:45
  • @JigauRafael did you figured out whats the issue ? – Learner Dec 23 '21 at 00:26
  • @Learner yes, problems with the database... – Jigau Rafael Dec 23 '21 at 13:20

0 Answers0