Ask Your Question
1

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

Comments

Same issue when i tried to connect with mysql database aswell

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

1 Answer

Sort by ยป oldest newest most voted
1

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 1.2.3.4 is accessible:

$ ping 1.2.3.4 
PING 1.2.3.4 (1.2.3.4): 56 data bytes 
64 bytes from 1.2.3.4: icmp_seq=0 ttl=57 time=12.063 ms 
64 bytes from 1.2.3.4: icmp_seq=1 ttl=57 time=11.356 ms 
64 bytes from 1.2.3.4: icmp_seq=2 ttl=57 time=11.626 ms 
^C
--- 1.2.3.4 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 1.2.3.4 3306 
nc: connectx to 1.2.3.4 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
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 778 times

Last updated: Jan 22