Ask Your Question

Unable to connect to any database using StreamSets on server.

asked 2017-12-13 02:49:26 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am trying to fetch data from mariadb to hdfs using streamsets,what would be the connection string for this? I am facing error in JDBC connection string. I have given the JDBC connection string as: jdbc:mariadb://x.y.z:3306/db

The error is :

 JDBC_00 - Cannot connect to specified database: com.streamsets.pipeline.api.StageException: JDBC_06 - Failed to initialize connection pool: com.zaxxer.hikari.pool.PoolInitializationException: Exception during pool initialization: Could not connect to address=(host=x.y.z)(port=3306)(type=master) : connect timed out
edit retag flag offensive close merge delete


Same issue when i tried to connect with mysql database aswell

Maithri gravatar imageMaithri ( 2017-12-13 07:10:55 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2017-12-13 11:02:16 -0500

metadaddy gravatar image

That looks like a connectivity problem - see the JDBC troubleshooting section in the docs. This is the relevant section:

Verify that the Data Collector machine can access the database machine on the relevant port. You can use tools such as ping and netcat (nc) for this purpose. For example, to verify that the host is accessible:

$ ping 
PING ( 56 data bytes 
64 bytes from icmp_seq=0 ttl=57 time=12.063 ms 
64 bytes from icmp_seq=1 ttl=57 time=11.356 ms 
64 bytes from icmp_seq=2 ttl=57 time=11.626 ms 
--- ping statistics --- 
3 packets transmitted, 3 packets received, 0.0% packet loss 
round-trip min/avg/max/stddev = 11.356/11.682/12.063/0.291 ms

Then to verify that port 3306 can be reached:

$ nc -v -z -w2 3306 
nc: connectx to port 3306 (tcp) failed: Connection refused

If the host or port is not accessible, check the routing and firewall configuration.

edit flag offensive delete link more

answered 2020-01-28 13:23:06 -0500

ghanashyaml gravatar image

updated 2020-01-30 13:43:59 -0500

In my case, I had this error: JDBC_00 - Cannot connect to specified database: com.streamsets.pipeline.api.StageException:Failed to initialize connection pool: com.zaxxer.hikari.pool.PoolInitializationException: Connection attempt failed.

StreamSets troubleshooting tips did not resolve my issue.

Turned out that I had to copy (and remove the older) jdbc driver jar file for my database (postgresql), inside of the libraries folder, viz below: /Applications/<..install folder>/streamsets-libs/streamsets-datacollector-jdbc-lib

This is for JDK 1.8 and latest StreamSets datacollector-3.13.0.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-12-13 02:49:26 -0500

Seen: 3,480 times

Last updated: Jan 30