#1 2016-04-18 19:40:01

BRM
Member
Registered: 2016-04-18

Can't connect to AWS datasource

I'm migrating over from BIRT iHub.  I'm trying to set a datasource to my Amazon RDS database.  I get the following error.

Could not open connection to: jdbc:mysql://my_host_name:3306/my_database_name?noDatetimeStringSync=true with user: my_user_name. java.sql.SQLException: No suitable driver

I've added the RS IP address to Amazon's allowed IP addresses.  The connection string works in other programs like my SQL editor and BIRT report designer.

Any thoughts?

Offline

#2 2016-04-18 19:53:46

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Can't connect to AWS datasource

Hi,

and welcome to the ReportServer Forums.

That is certainly a strange one, since the jdbc url looks ok and the MySQL driver is shipped with ReportServer. When do you get the error message? When you hit "test connection"? I presume that you selected MySQL as database (its close to MsSQL for which the driver is not part of the distribution).

Do you see any additional error message or a stacktrace that you could post?

Cheers,
Arno

Offline

#3 2016-04-18 20:44:24

BRM
Member
Registered: 2016-04-18

Re: Can't connect to AWS datasource

Definitely using the MySQL database option in the dropdown.  I'll try to check allowed IP ranges and passwords again.  I'd be surprised if the problem weren't in there somewhere.

Here is the stacktrace...

net.datenwerke.rs.core.service.reportmanager.exceptions.DatabaseConnectionException: Could not open connection to:  jdbc:mysql://my_host_name:3306/my_database_name?noDatetimeStringSync=true with user: my_user_name. java.sql.SQLException: No suitable driver<br>    at net.datenwerke.rs.base.service.datasources.transformers.database.Database2TableTransformer.transform(Database2TableTransformer.java:57)<br>    at net.datenwerke.rs.base.service.datasources.transformers.database.Database2TableTransformer.transform(Database2TableTransformer.java:1)<br>    at net.datenwerke.rs.base.service.datasources.transformers.DatasourceTransformationServiceImpl.transform(DatasourceTransformationServiceImpl.java:29)<br>    at net.datenwerke.rs.base.service.reportengines.table.SimpleDataSupplier.getData(SimpleDataSupplier.java:127)<br>    at net.datenwerke.rs.base.service.reportengines.table.SimpleDataSupplier.getData(SimpleDataSupplier.java:118)<br>    at net.datenwerke.rs.base.service.reportengines.table.SimpleDataSupplier.getData(SimpleDataSupplier.java:110)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl.testConnection(DatasourceTesterRPCServiceImpl.java:86)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$9748313c.CGLIB$testConnection$0(&lt;generated&gt;)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$9748313c$$FastClassByGuice$$84654621.invoke(&lt;generated&gt;)<br>    at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$9748313c.testConnection(&lt;generated&gt;)<br>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>    at java.lang.reflect.Method.invoke(Method.java:497)<br>    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587)<br>    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:333)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$9748313c.CGLIB$processCall$4(&lt;generated&gt;)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$9748313c$$FastClassByGuice$$84654621.invoke(&lt;generated&gt;)<br>    at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$9748313c.processCall(&lt;generated&gt;)<br>    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:303)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$9748313c.CGLIB$processCall$3(&lt;generated&gt;)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$9748313c$$FastClassByGuice$$84654621.invoke(&lt;generated&gt;)<br>    at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$9748313c.processCall(&lt;generated&gt;)<br>    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)<br>    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)<br>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)<br>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$9748313c.CGLIB$service$17(&lt;generated&gt;)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$9748313c$$FastClassByGuice$$84654621.invoke(&lt;generated&gt;)<br>    at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)<br>    at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)<br>    at net.datenwerke.rs.adminutils.server.datasourcetester.DatasourceTesterRPCServiceImpl$$EnhancerByGuice$$9748313c.service(&lt;generated&gt;)<br>    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)<br>    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)<br>    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)<br>    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)<br>    at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89)<br>    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)<br>    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)<br>    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)<br>    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)<br>    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)<br>    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)<br>    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)<br>    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)<br>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)<br>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)<br>    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)<br>    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)<br>    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)<br>    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)<br>    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)<br>    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)<br>    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)<br>    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)<br>    at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:868)<br>    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)<br>    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2500)<br>    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2489)<br>    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<br>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)<br>    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)<br>    at java.lang.Thread.run(Thread.java:745)<br>Caused by: java.lang.RuntimeException: java.sql.SQLException: No suitable driver<br>    at net.datenwerke.dbpool.DbC3p0PoolServiceImpl$1.get(DbC3p0PoolServiceImpl.java:157)<br>    at net.datenwerke.dbpool.DbC3p0PoolServiceImpl$1.get(DbC3p0PoolServiceImpl.java:1)<br>    at net.datenwerke.rs.base.service.datasources.transformers.database.Database2TableTransformer.transform(Database2TableTransformer.java:54)<br>    ... 90 more<br>Caused by: java.sql.SQLException: No suitable driver<br>    at java.sql.DriverManager.getDriver(DriverManager.java:315)<br>    at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:285)<br>    at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)<br>    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)<br>    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:211)<br>    at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1127)<br>    at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1114)<br>    at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)<br>    at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1855)<br>    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)<br>

Offline

#4 2016-04-18 21:03:26

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Can't connect to AWS datasource

That is indeed quite strange. Two things to try, could you to use the simpler JDBC URL

jdbc:mysql://my_host_name:3306/my_database_name

This should not really make any difference, but who knows. Second thing to try is to select as database MariaDB. The driver is also shipped with ReportServer and is compatible with MySQL.

What edition of ReportServer are you running? Community or Enterprise? If you are running enterprise, could you execute the following script (copy it to the fileserver somewhere beneath "bin", open the terminal with CTRL+ALT+T, go to file via cd PATH, and execute script via exec SCRIPT).

Class.forName('com.mysql.jdbc.Driver');

tout.println(
  java.sql.DriverManager.getDriver('jdbc:mysql://my_host_name:3306/my_database_name?noDatetimeStringSync=true')
  );

return null;

This directly executes the part throwing the exception (and which should really not throw an exception).

Cheers,
Arno

Offline

#5 2016-04-18 21:14:05

BRM
Member
Registered: 2016-04-18

Re: Can't connect to AWS datasource

I tried those two things and got the same result.

I am using community edition.  I assume that means I can't execute the script?

This is an instance I stood up today via bitnami in Google Cloud.  Could there be some sort of issue with this installation?  I could try to stand up the server on Amazon.  It shouldn't make a difference but you never know.

Offline

#6 2016-04-18 21:19:07

Thorsten J. Krause
Guest

Re: Can't connect to AWS datasource

Hi,

This might be something really simple:
Could you verify there is no additional whitespace before the "jdbc:" part of the url? It seems the mysql driver is rather picky about this and in your error message there seems to be an additional blank character.

Cheers,
Thorsten

#7 2016-04-18 21:53:05

BRM
Member
Registered: 2016-04-18

Re: Can't connect to AWS datasource

There was a space before the URL so I fixed that.  Now I get a different error message...

Error
500 Internal Server Error <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body>
Internal Server Error
<p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error.</p> <p>More information about this error may be available in the server error log.</p> </body></html> Statuscode: 500 EncodedResponse: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body>
Internal Server Error
<p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

Offline

#8 2016-04-18 22:02:21

BRM
Member
Registered: 2016-04-18

Re: Can't connect to AWS datasource

For some unexplained reason the connection just worked.  I did not change anything in the RS configuration.  I was verifying that I had added the RS IP to all my AWS security groups and somehow it worked.  Mind you I didn't actually change anything in the security groups, I was just verifying that I had added the IP and then it worked.  Very strange

Offline

#9 2016-04-19 09:20:47

Thorsten J. Krause
Guest

Re: Can't connect to AWS datasource

Glad to hear it's working now.

I don't think the second error had anything to do with your datasource although it still seems strange to me that it just resolved itself.
Did you check the server logfiles if there was anything useful?

Cheers,
Thorsten

#10 2016-04-19 13:42:23

BRM
Member
Registered: 2016-04-18

Re: Can't connect to AWS datasource

No but I will do that.

Offline

Board footer

Powered by FluxBB