Jump to content

Cannot connect to MySQL DB using either MySQL or MariaDB driver


max_max_mir
Go to solution Solved by hozawa,

Recommended Posts

JasperServer CE v 5.5

It's an InfiniDB, but uses MySQL drivers to connect to it. I am able to connect to this DB using MySQL workbench and using the MySQLdb package in Python from my workstation as well as from the server that hosts JasperServer. However, when I try to connect to it by setting up a JDBC datasource on JasperServer, it times me out. I tried connecting with the MariaDB driver and set up the MySQL driver as well, but surprisingly both give me the error below (with MariaDB in the error logs - even though I used MySQL driver) - any ideas what may be going on?

java.sql.SQLNonTransientConnectionException: Could not connect to192.168.150.153:3306 : Connection timed outatorg.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:136)atorg.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106)at org.mariadb.jdbc.Driver.connect(Driver.java:114)at java.sql.DriverManager.getConnection(DriverManager.java:571)at java.sql.DriverManager.getConnection(DriverManager.java:215)atcom.jaspersoft.jasperserver.war.action.DataSourceAction.testJdbcDataSource(DataSourceAction.java:482)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:606)atorg.springframework.webflow.action.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:98)atorg.springframework.webflow.action.MultiAction.doExecute(MultiAction.java:123)atorg.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)atorg.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)atorg.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:77)atorg.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)atorg.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145)atorg.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)atorg.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101)at org.springframework.webflow.engine.State.enter(State.java:194)atorg.springframework.webflow.engine.Transition.execute(Transition.java:227)atorg.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:393)atorg.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)atorg.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119)at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)atorg.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:388)atorg.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)atorg.springframework.webflow.engine.ViewState.handleEvent(ViewState.java:232)atorg.springframework.webflow.engine.ViewState.resume(ViewState.java:196)at org.springframework.webflow.engine.Flow.resume(Flow.java:545)atorg.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:261)atorg.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)at sun.reflect.GeneratedMethodAccessor201.invoke(Unknown Source)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:606)atorg.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)atorg.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)atorg.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:66)atorg.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)atorg.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)at com.sun.proxy.$Proxy109.resumeExecution(Unknown Source)atorg.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)atorg.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174)atorg.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)atorg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)atorg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)atorg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)atorg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)atcom.jaspersoft.jasperserver.war.StaticFilesCacheControlFilter.doFilter(StaticFilesCacheControlFilter.java:137)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:399)atcom.jaspersoft.jasperserver.api.security.IPadSupportFilter.doFilter(IPadSupportFilter.java:67)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.api.security.JSSwitchUserProcessingFilter.doFilterHttp(JSSwitchUserProcessingFilter.java:154)atorg.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atorg.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)atorg.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atorg.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)atorg.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)atorg.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)atorg.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atorg.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)atorg.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.api.metadata.user.service.impl.MetadataAuthenticationProcessingFilter.doFilter(MetadataAuthenticationProcessingFilter.java:152)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.war.util.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:94)atorg.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)atorg.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atorg.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)atorg.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)atorg.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)atorg.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:209)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atorg.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)atorg.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)atorg.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)atorg.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:209)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.api.logging.filter.BasicLoggingFilter.doFilter(BasicLoggingFilter.java:53)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.api.security.JSCsrfGuardFilter.doFilter(JSCsrfGuardFilter.java:83)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.api.security.WebAppSecurityFilter.doFilter(WebAppSecurityFilter.java:76)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.war.MultipartRequestWrapperFilter.doFilter(MultipartRequestWrapperFilter.java:90)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atcom.jaspersoft.jasperserver.api.security.encryption.EncryptionFilter.doFilter(EncryptionFilter.java:130)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atorg.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)atorg.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)atorg.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)atorg.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:188)atorg.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)atorg.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:104)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)atcom.jaspersoft.jasperserver.war.util.SessionDecoratorFilter.doFilter(SessionDecoratorFilter.java:43)atorg.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)atorg.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)atcom.jaspersoft.jasperserver.war.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:67)atorg.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)atorg.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)atcom.jaspersoft.jasperserver.war.P3PFilter.doFilter(P3PFilter.java:43)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)atorg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)atorg.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)atorg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)atorg.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)at java.lang.Thread.run(Thread.java:724)Caused by: org.mariadb.jdbc.internal.common.QueryException: Could notconnect to 192.168.150.153:3306 : Connection timed outatorg.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(MySQLProtocol.java:597)atorg.mariadb.jdbc.internal.mysql.MySQLProtocol.(MySQLProtocol.java:216)at org.mariadb.jdbc.Driver.connect(Driver.java:110)... 137 moreCaused by: java.net.ConnectException: Connection timed outat java.net.PlainSocketImpl.socketConnect(Native Method)atjava.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)atjava.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)atjava.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)at java.net.Socket.connect(Socket.java:579)at java.net.Socket.connect(Socket.java:528)atorg.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(MySQLProtocol.java:303)atorg.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(MySQLProtocol.java:593)... 139 more[/code]

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

Are you connecting Workbench from the same machine as Server is on? If not, it may be a network problem.

Nevertheless, this isn't a JasperReports Server problem but with your InfiniDB. Should post this kind of questions to InfiniDB forum or contact their support.

 

BTW, Is InfiniDB supported by JasperReports Server?

Link to comment
Share on other sites

The problem was with the network connection *sheepish grin*. I had InfiniDB on running on a VMWare Player VM and JasperServer on a VirtualBox VM - and while both VMs would talk to the host, they wouldn't talk to each other (I tried and failed to get them to talk to each other). So I installed InfiniDB on another VirbualBox server and am able to connect to it using the MySQL driver.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...