cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual IP address issue in EFM

SOLVED
Level 3 Adventurer

Virtual IP address issue in EFM

Hi All,

 

I came across a strange situation today, we have 3 nodes - master,standby and witness with EFM 2.1. We are also using VIP.

VIP - 10.133.188.66

Master - 10.133.188.77

Standby - 10.133.188.78

Witness - 10.133.188.79

Master,standby and witness all have thier IP addresses in each other's pg_hba.conf.

 

For VM reboot, we had stopped efm and shutdown master and standby.Once VM rebooted, we started the master,standby and efm.

 

When we ran efm cluster-status efm on master, it gave below error for the standby node:

no pg_hba.conf entry for 10.133.188.66 user efm_check database efmdb

 - where 10.133.188.66 is the VIP that is binded to the master IP 10.133.188.77

 

I don't understand why VIP should be added in the pg_hba.conf file of standby server. It was working well before reboot.

 

Thanks in advance!

2 ACCEPTED SOLUTIONS

Accepted Solutions
EDB Team Member

Re: Virtual IP address issue in EFM

Hi Nikhil,

 

We have tested this internally and we would require the VIP address entery in the pg_hba.conf file on standby server to do the XLOG location comparison between master and standby server under promote status to verify that master and standby servers are in sync with each other. In JDBC connection string they are using VIP address to connect to the database through EFM Agent.

Please find the below screenshot for your reference.

 

VIP_ERROR_HBA.png We have added the VIP entries into a pg_hba.conf and relaoded the standby cluster and we are not seeing VIP pg_hba.conf error.

Add_VIP.png

Level 3 Adventurer

Re: Virtual IP address issue in EFM

Hi @kapil,

 

We reconfigured VIP and EFM and now it works.

 

We had also used a separate NIC for VIP and I think that may have caused the pg_hba error. We removed the NIC and followed the EFM document to reconfigure and since then it is working fine.

 

Thank you for your valuable inputs

 

 

13 REPLIES
EDB Team Member

Re: Virtual IP address issue in EFM

Hi Nikhil,

 

Could you please share the below details for analysis for conclusion.

 

1) EFM cluster status from all three nodes before the reeboot and after the reboot.

2) EFM log files from all three nodes.

EDB Team Member

Re: Virtual IP address issue in EFM

Hi Nikhil,

 

We have tested this internally and we would require the VIP address entery in the pg_hba.conf file on standby server to do the XLOG location comparison between master and standby server under promote status to verify that master and standby servers are in sync with each other. In JDBC connection string they are using VIP address to connect to the database through EFM Agent.

Please find the below screenshot for your reference.

 

VIP_ERROR_HBA.png We have added the VIP entries into a pg_hba.conf and relaoded the standby cluster and we are not seeing VIP pg_hba.conf error.

Add_VIP.png

Level 3 Adventurer

Re: Virtual IP address issue in EFM

Hi @kapil,


I think we don't need VIP entry in standby's pg_hba, we never faced this issue.Before reboot we didn't get the pg_hba error and we had the master's physical IP in standby's pg_hba.

 

I think there is some issue with VIP because VIP is removed after reboot and then we had to add it manually.Will check the VIP issue and get back.

 

Thanks

EDB Team Member

Re: Virtual IP address issue in EFM

Hi Nikhil

 

Thank you for the update. We will wait for your feedback.

Level 3 Adventurer

Re: Virtual IP address issue in EFM

Hi @kapil,

 

We reconfigured VIP and EFM and now it works.

 

We had also used a separate NIC for VIP and I think that may have caused the pg_hba error. We removed the NIC and followed the EFM document to reconfigure and since then it is working fine.

 

Thank you for your valuable inputs

 

 

EDB Team Member

Re: Virtual IP address issue in EFM

Hi Nikhil,

 

Thank you for the update.

 

Glad to hear that issue has been resolved by using separate NIC for VIP.

EDB Team Member

Re: Virtual IP address issue in EFM


@kapil wrote:

Hi Nikhil,

 

We have tested this internally and we would require the VIP address entery in the pg_hba.conf file on standby server to do the XLOG location comparison between master and standby server under promote status to verify that master and standby servers are in sync with each other. In JDBC connection string they are using VIP address to connect to the database through EFM Agent.

Hi,

 

I see that this is resolved, but there is some incorrect information in the thread that I'd like to clear up.

 

When someone runs an 'efm cluster-status <cluster>' command, the 'efm' script process asks the local agent for info, which returns things including the addresses of the nodes in the cluster. The process then uses those addresses to query the databases for the xlog/wal "Promote Status" information in the bottom portion of the output. The 'efm' script process does *not* use the VIP in the JDBC connection string used to get information from the databases. (EFM does try to connect to the db at the VIP address, but only when verifying whether or not a VIP is in use at startup or during a promotion).

 

The error message you're seeing is because the VIP is the *source* of the request, not the destination of the request. The master, with the VIP, tries to connect to the standby database. The source IP used by the master node isn't defined, and in this case the VIP is the one the master node is using. Thus the connection error.

 

Adding the VIP to the allowed list in pg_hba.conf on each db node is probably a good idea, but it isn't because processes are trying to connect to the database that has the VIP (that's controlled by 'listen_addresses' in postgresql.conf).

 

Cheers,

Bobby

 

 

 

Level 3 Adventurer

Re: Virtual IP address issue in EFM

Hi Bobby,

 

The request that you mention is the efm cluster status cmd (run from the master). That cmd shouldnt use VIP as the source, seems incorrect to me? It should use the IP that $HOSTNAME resolves to. If the master will always use the VIP as source, OR if it will use the VIP for some functions and the $HOSTNAME IP for others, then having VIP in the pg_hba.conf on standby is not a "good idea" but a "must". Isnt it?

 

Thanks

EDB Team Member

Re: Virtual IP address issue in EFM


@pcpg wrote:

Hi Bobby,

 

The request that you mention is the efm cluster status cmd (run from the master). That cmd shouldnt use VIP as the source, seems incorrect to me? It should use the IP that $HOSTNAME resolves to. If the master will always use the VIP as source, OR if it will use the VIP for some functions and the $HOSTNAME IP for others, then having VIP in the pg_hba.conf on standby is not a "good idea" but a "must". Isnt it?


The efm command doesn't pick the source address it uses -- it only picks the destination. I don't know how the source is picked by Java and/or the OS.

 

Thanks,

Bobby