0

I am a new user at CDAP. I follow Learn CDAP: MongoDB to CDAP Table Youtube tutorial video, but when I click run, It will return error:

"Spark program 'phase-1' failed with error: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]. Please check the system logs for more details."

Why I take this error, I did anything like official tutorial Youtube video and my mongodb service is running well

My Mongodb config CDAP, My JS func in CDAP, My CDAP Table, My database info in mongodb, Error

1 Answers1

0

This question is some months old and the poster probably moved on, but for future readers I got this error as well, so for what it's worth:

In my case, it was because I had not set up the VPC Network Peering. The Dataproc cluster the jobs are run on are created in a separate network and it needs access to the network where your Mongo servers are located.

In general, make sure that you have followed the "Creating a Private Instance" guide, specifically the Set up VPC Network Peering and probably also the Create a firewall rule sections. This will allow the cluster access to the rest of your network and the DB servers in it.

avlund
  • 252
  • 1
  • 4