Address the error "Could not resolve placeholder 'dataservice.access.logging.maxDays" when attempting to start vpxd-svcs.
Symptoms:
Following patch update from vcenter appliance from 7U3d to 7U3m, vpxd-svcs service not starting and vpx-svcs logs are throwing error :
vpxd-svcs.log:
2024-08-28T16:41:27.836+05:30 [main [] INFO com.vmware.vim.dataservices.VpxdSvcsMain opId=] Starting service via vmon
2024-08-28T16:41:30.545+05:30 [main [] WARN org.springframework.context.support.ClassPathXmlApplicationContext opId=] Exception encountered during context initializat
ion - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'isAccessLogCreated' defined in clas
s path resource [server-config.xml]: Could not resolve placeholder 'dataservice.access.logging.maxDays' in value "${dataservice.access.logging.maxDays}"; nested excepti
on is java.lang.IllegalArgumentException: Could not resolve placeholder 'dataservice.access.logging.maxDays' in value "${dataservice.access.logging.maxDays}"
2024-08-28T16:41:30.559+05:30 [main [] ERROR com.vmware.vim.dataservices.VpxdSvcsMain opId=] start: Tagging and Authz services failed to start
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'isAccessLogCreated' defined in class path resource [server-config.xml]: Could not resolve placeholder 'dataservice.access.logging.maxDays' in value "${dataservice.access.logging.maxDays}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'dataservice.access.logging.maxDays' in value "${dataservice.access.logging.maxDays}"
This issue is observed even when you update from 7.0u3q to 70u3r.
This issue is due to a file that was not updated during the update : /var/lib/vmware/vpxd-svcs/config/dataservice.properties. It would show this :
"vpxdsvcs.version=8"
Instead of expected :
"vpxdsvcs.version=12
> dataservice.access.logging.maxDays=0
> dataservice.access.logging.checkExists=true
> dataservice.access.logging.maxSize=1048576
> dataservice.access.logging.frequencySeconds=600"
1.Take a backup of the file :
cp /var/lib/vmware/vpxd-svcs/config/dataservice.properties /root/
Then amend the file as follow /var/lib/vmware/vpxd-svcs/config/dataservice.properties :
Replace :
--
vpxdsvcs.version=8
--
With :
--
dataservice.access.logging.maxDays=0
dataservice.access.logging.checkExists=true
dataservice.access.logging.maxSize=1048576
dataservice.access.logging.frequencySeconds=600
--
2.Start vpxd-svcs.
Note:
Make sure you have a backup of the file before performing any modification : /var/lib/vmware/vpxd-svcs/config/dataservice.properties.