Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to connect to postgresql database from other application #35

Open
snehalasarode opened this issue Jul 15, 2020 · 8 comments
Open

Comments

@snehalasarode
Copy link

I deployed the postgres HA. using the same manifest file ha.yml. provided vip as elastic ip. When i am trying to use this postgresql database for othe application i used database host IP as vip of postgresql. In this case i am getting issue that the application could not connect to database using vip. Any extra setting i have to do or what is exact issue?

@snehalasarode
Copy link
Author

Hi @jhunt I set the value of vip is elastic ip but when i was tring to use this postgresql as database for other application i am providing value of vip to connect external application to this postgresql database at that time i am getting issue cannot connect to database. Here my question is which ip i have to pass to connect to this postgres from other application and why it is not able to connect to vip?

@jhunt
Copy link
Contributor

jhunt commented Jul 15, 2020

What IaaS are you on?

@snehalasarode
Copy link
Author

Hi @jhunt I am using AWS as IaaS. need to do some extra settings for vip? or which ip i have to use to connect to postgres from external application.

@jhunt
Copy link
Contributor

jhunt commented Jul 16, 2020

Check your AWS security groups and or NACLs to ensure that you have allowed for traffic to/from the database VIP / VMs.

@snehalasarode
Copy link
Author

Hi @jhunt I used VIP as elastic ip and done the entry of that elastic ip with port 5432 in security group of application and database. still facing issue: failed to connect to tcp://xx.x.x.x:5432

@snehalasarode
Copy link
Author

what value we can pass for vip other than elastic ip? or Elastic ip is only correct option.

@snehalasarode
Copy link
Author

Hi @jhunt any update on this??

@jhunt
Copy link
Contributor

jhunt commented Aug 31, 2020

When you say

I set the value of vip is elastic ip

Are you saying that you told haproxy, in EC2, to use an elastic IP as the VRRP VIP to trade between the postgres instances? I don't believe VRRP is going to work on any IaaS except vSphere, since you don't generally get to muck about with networking at L2/L3 on cloud providers like AWS.

Can you post the manifest you are deploying?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants