Reputation: 25
I Have a problem on Connect from Port Forwarding Database on Openshift :
I Try Connect to Container running the database to check process and psql command, then it works :
Next, I Try Port Forwarding for Try Connection from outside Openshift Cluster:
Then I Try Connect from Outside Cluster to connect Postgresql have Error: Connection Refuse
Im Using IP Based or Hostname / FQDN Not Working and Error Still Exist
And When I Try Check Firewall port it has been opened port 5432/TCP :
Anyone Can Help Me With This problem ? Thanks
Note: Before I have Been Looking Documentation but Not Working Resolve the Problem Source Documentation: https://www.openshift.com/blog/openshift-connecting-database-using-port-forwarding
"psql: could not connect to server: Connection refused" Error when connecting to remote database
Upvotes: 1
Views: 1920
Reputation: 12494
The oc port-forward
command is forwarding from only your loopback interfaces.
If you are running your client on the same machine where the cluster is running, then use localhost
as your "Host".
If you are running your client on a different machine, they you need more network redirection to get this to work. Please see this post for more information as well as work-arounds for your problem: Access OpenShift forwarded ports from remote host
Upvotes: 1