Loading

×Sorry to interrupt
This page has an error. You might just need to refresh it.
[NoErrorObjectAvailable] Uncaught ReferenceError: addCTracking is not defined
Failing descriptor: {markup://c:KM_ArticleThemeLayout}

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

VMware vPostgres service fails to start in Passive node when vCenter Server Appliance 6.5 vCenter HA is deployed (56917)

Last Updated: 11/6/2018Categories: TroubleshootingTotal Views: 30963Language:
English

Subscribe to get an email
newsletter with new updates

Please provide article feedback:

Symptoms

In the vCenter HA configure tab the Passive node is Down and reports the message:

A replication failure might be occurring at the moment. Automatic failover protection is disabled.
If vCenter HA was recently enabled, initial replication might still be in progress and could take a few minutes.

The vCenter HA monitor tab reports:

Appliance configuration is out of sync.
Appliance state is out of sync.
Appliance sqlite db is out of sync.

Check the services status in Passive node with the commnd line "service-control --status" reporting the below two services are in Stopped status:

vmware-vcha
vmware-vpostgres

Only the below two services are in Running status:
vmware-statsmonitor
vmware-vmon

In the Passive node /var/log/vmware/vcha/vcha-*.log, you see similar error:

2018-07-11T08:58:24.874+08:00 error vcha[7F3896EFC700] [Originator@6876 sub=VchaUtil] Error executing command /bin/su: exit status=[4], stdout=[], stderr=[You are required to change your password immediately (password aged)
--> su: Authentication token is no longer valid; new one required
--> (Ignored)
--> pg_ctl: directory "/storage/db/vpostgres" is not a database cluster directory
--> ]
....
2018-07-11T16:01:04.920+08:00 error vcha[7F3896EFC700] [Originator@6876 sub=VchaUtil] Error executing command /usr/bin/python: exit status=[1], stdout=[logs available at: /var/log/vmware/vcha --> ], stderr=[]
2018-07-11T16:01:04.920+08:00 error vcha[7F3896EFC700] [Originator@6876 sub=VchaUtil] Error while running python script /usr/lib/vmware-vcha/scripts/postgres_passive.py
2018-07-11T16:01:04.941+08:00 info vcha[7F3896EFC700] [Originator@6876 sub=Agent] Fatal event in the HA Agent, shutting down
2018-07-11T16:01:04.941+08:00 info vcha[7F3896EFC700] [Originator@6876 sub=Agent] Shutting down HA Agent

In the /var/log/vmware/vcha/repl_passive_setup.log, you see similar error:

2018-07-11T07:59:53.150Z INFO repl_passive_setup running command ['/bin/su', '-s', '/bin/bash', '-', 'vpostgres', '-c', "/opt/vmware/vpostgres/current/bin/pg_basebackup --pgdata=/storage/db/vpostgres --xlogdir=/storage/dblog/vpostgres/pg_xlog --no-password --progress --dbname='host=10.200.20.1 port=5432 user=replicator password=<redacted> sslmode=require' --verbose --xlog-method=stream"]
2018-07-11T08:01:03.853Z INFO repl_passive_setup rc = [1], stdout = [], stderr = [You are required to change your password immediately (password aged)
....
pg_basebackup: could not get transaction log end position from server: ERROR:  could not open file "./pg_hba.conf.bak": Permission denied
2018-07-11T08:01:03.853Z ERROR repl_passive_setup Failed full_sync: attempt: 100

Run the below command on both Active and Passive node to verify the password of the account "vpostgres" was expired:

[ ~ ]# chage --list vpostgres
Last password change                                    : Mar 14, 2018
Password expires                                        : Jun 13, 2018
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 1
Maximum number of days between password change          : 90
Number of days of warning before password expires       : 7

In the Active node under /storage/db/vpostgres there is file named "pg_hba.conf.bak" and verify that the vpostgres account doesn't have permission to access it.

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Cause

This issue occurs if the vpostgres user password expired. This does not impact normal use of vCenter, however the vCenter HA gets impacted due to operations on additional files. In this example pg_hba.conf.bak.

Resolution

To resolve this issue, change the password of vpostgres user to never expire on all three vCenter HA nodes (active, passive and witness):
1.  Log in to each vCenter HA node as root using SSH or Virtual Machine Console:
b. Change to the BASH shell by running the shell command:

Command> shell

c. Set the vpostgres user account to never expire by running this command:

[ ~ ]# chage -M -1 vpostgres

d. Confirm that the vpostgres user account is set to never expire by running this command:

[ ~ ]# chage --list vpostgres
Last password change                                 : Jul 17, 2018
Password expires                                     : never
Password inactive                                    : never
Account expires                                      : never
Minimum number of days between password change       : 1
Maximum number of days between password change       : -1
Number of days of warning before password expires    : 7

Note: The preceding output excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

2. Remove the file pg_hba.conf.bak under /storage/db/vpostgres/ in both Active and Passive node.
3. Restart the Passive node.

If the Passive node still could not return to UP status after these steps, you need to re-deploy vCenter HA

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

KB
•
升级 vCenter Server Appliance 6.7 时：“添加用户失败：cm to group: cis”、“PAM：身份验证令牌不再有效” (55863)

KB
•
Download and Install VMware Fusion (2014097)

Results 1-3 of 3

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

Related Versions:

Take Our Survey

Support Assistant