Starting the LCM service fails with "FATAL: password authentication failed for user "lcm""
search cancel

Starting the LCM service fails with "FATAL: password authentication failed for user "lcm""

book

Article ID: 324140

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

Symptoms:
  • On  the "Update/Patches" page of a Workload Domain, the following message(s) may appear:
"Retrieving all scheduled and in-progress bundles failed. Could not reach the server, possible reasons could be network connectivity issue or server going down"
"Retrieving upgrade precheck failed. Could not reach the server, possible reasons could be network connectivity issue or server going down"
"Retrieving all applicable bundles failed. Could not reach the server, possible reasons could be network connectivity issue or server going down"
  • In the Lifecycle ManagementBundle Management page, similar messages to the below are seen:
"Retrieving all applicable bundles failed. Could not reach the server, possible reasons could be network connectivity issue or server going down"
  • The following error can be seen in LCM service log /var/log/vmware/vcf/lcm/lcm.log:
2020-08-21T23:22:09.392+0000 ERROR [0000000000000000,0000] [o.s.boot.SpringApplication,main] Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lcmEntityManagerFactory' defined in class path resource [com/vmware/evo/sddc/lcm/JpaConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.bea
ns.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean w
ith name 'dataSource' defined in class path resource [com/vmware/evo/sddc/lcm/JpaConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method
 'dataSource' threw exception; nested exception is com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: FATAL: password authentication failed for user "lcm"
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:484)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
        at com.vmware.evo.sddc.lcm.Application.main(Application.java:29)


Environment

VMware Cloud Foundation 3.10.x
VMware Cloud Foundation 3.8.x
VMware Cloud Foundation 4.x
VMware Cloud Foundation 3.9.x
VMware Cloud Foundation 3.7.x

Cause

Either a backslash character (\) is added to the LCM database user password in /opt/vmware/vcf/lcm/lcm-app/conf/application.properties, or the password is changed manually in the application.properties file

Resolution

This is a known issue affecting VMware Cloud Foundation 3.7.1 to 4.0.0.1, this is fixed in VMware Cloud Foundation 4.0.1.

Workaround:
To workaround this issue, please use the steps below.
  1. Open a SSH session to the SDDC Manager VM and switch to the root user:
su -
  1. Comment out line the starts with "lcm.datasource.password", by adding # to the start of the line, in /opt/vmware/vcf/lcm/lcm-app/conf/application.properties, save the changes in the file.
  2. Run command below:
systemctl restart lcm-db
  1. Verify new LCM database user password is generated in /opt/vmware/vcf/lcm/lcm-app/conf/application.properties
  2. Run command below:
systemctl restart lcm
  1. Verify LCM service is up using the API command:
curl localhost/lcm/about | json_pp