Poonam
Poonam

Reputation: 31

Unable to obtain Jdbc connection from DataSource, SSL error: Connection reset

Facing connection issue while connecting to postgresql pod running in OpenShift environment. Details are as below URL: jdbc:postgresql://XXX:5432/YYY?sslmode=require

Flyway 4.2.0 by Boxfuse

ERROR:

Unable to obtain Jdbc connection from DataSource (jdbc:postgresql://XXX:5432/YYY?sslmode=require) for user 'ABC': SSL error: Connection reset

Just wanted to confirm if I need to add certificates to make the connection work?

Please advise.

Upvotes: 1

Views: 4936

Answers (2)

Poonam
Poonam

Reputation: 31

We have fixed this issue by upgrading flyway version to 6.0.7 and postgres driver version to 42.2.8.

The below URL string worked jdbc:postgresql://XXX:5432/YYY?sslmode=require

Thank you all.

Upvotes: 0

Markus Kofler
Markus Kofler

Reputation: 175

I would recommend checking the networking setup of your application which basically means have a look at:

  1. The route (does a DNS record exist for your hostname? Is your route pointing to the correct service and service port?)
  2. The service (is the target port the port your postgresql is listening on?)
  3. The deploymentconfig (did you expose the right port?)
  4. The postgresql (it needs to listen on 0.0.0.0 instead of localhost/127.0.0.1 -> all interfaces (a common mistake))

Upvotes: -2

Related Questions