Unable To Finish Configuration/Setup of vSAN File Service : Failed to enable file service. socket.gaierror: [Errno -2] Name or service not known
search cancel

Unable To Finish Configuration/Setup of vSAN File Service : Failed to enable file service. socket.gaierror: [Errno -2] Name or service not known

book

Article ID: 326513

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

To inform users how to resolve this error.

Symptoms:
When trying to to enable vSAN FS you receive the error:
"Failed to enable file service. Hosts don't have fileservicecrx capability"

Prior to trying to enable FS the customer made a slight change to the VC FQDN.


In the vmware-vsan-health-service.log you will see the below:

2022-01-10T16:20:38.979Z INFO vsan-mgmt[08941] [VsanVcObjectHelper::AddCallResultAndNotify opID=046ca3b5-W386] delete the single concurrent execution key
2022-01-10T16:20:38.979Z WARNING vsan-mgmt[08941] [VsanClusterFileServiceSystemImpl::_EnableFileService opID=046ca3b5-W386] Hosts don't have fileservicecrx capability
2022-01-10T16:20:39.105Z INFO vsan-mgmt[08941] [VsanClusterFileServiceSystemImpl::_EnableFileService opID=046ca3b5-W386] Creating FSVM with e5dc917f-cce3-4c90-85fb-35b45bc5c496
2022-01-10T16:20:39.106Z INFO vsan-mgmt[08941] [VsanEamUtil::_EamConnect opID=046ca3b5-W386] Connecting to EAM service ...
2022-01-10T16:20:39.106Z INFO vsan-mgmt[08941] [VsanEamUtil::_EamConnect opID=046ca3b5-W386] EAM server URL is: https://fqdn-vc.01.site.st:443/eam/sdk/
2022-01-10T16:20:39.106Z INFO vsan-mgmt[08941] [VsanEamUtil::_EamConnect opID=046ca3b5-W386] Setting EAM adapter: host: fqdn-vc.01.site.st, port: 443, version: eam.version.version7_2, path: /eam/sdk/
2022-01-10T16:20:39.106Z INFO vsan-mgmt[08941] [VsanEamUtil::_GetAgency opID=046ca3b5-W386] EAM QueryAgency information ...
2022-01-10T16:20:39.108Z ERROR vsan-mgmt[08941] [VsanClusterFileServiceSystemImpl::_EnableFileService opID=046ca3b5-W386] Falied to deploy OVF in cluster 'vim.ClusterComputeResource:domain-c1006'
Traceback (most recent call last):
   File "/lib/python3.7/socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
2022-01-03T17:34:56.267Z ERROR vsan-mgmt[30753] [VsanClusterFileServiceSystemImpl::_EditFileServiceStatus opID=d1a5a93d-W10318] Failed to enable file service.


^ vsanEamUtil is pulling the wrong URL (old fqdn).

Cause

vSAN File Service is pulling the FQDN from EAM extension information. EAM URL is not being updated when the vCenter FQDN is changed.

Resolution

Upgrade vCenter to 7.0U3d or higher

Workaround:
If an upgrade is not possible at this time then apply the following workaround:
1. Create a backup of extension.xml.installer with the following command:
cp /etc/vmware-eam/firstboot/extension/extension.xml.installer /etc/vmware-eam/firstboot/extension/extension.xml.installer.bak
2. Edit extension.xml.installer
vi  /etc/vmware-eam/firstboot/extension/extension.xml.installer
3. Replace @HOST@ in EAM health URL and EAM SDK URL with *.
Currently, it looks like this

<health>
   <!-- TODO: here and bellow make service ports configurable -->
   <url>https://@HOST@:443/eam/eamService-web/health.xml</url>
</health>

<server>
   <url>https://@HOST@:443/eam/sdk/</url>
   <description>vSphere ESX Agent Manager</description>
   <company>VMware, Inc.</company>
   <type>com.vmware.vim.eam</type>
   <adminEmail>[email protected]</adminEmail>
</server>

It should be

<health>
   <!-- TODO: here and bellow make service ports configurable -->
   <url>https://*:443/eam/eamService-web/health.xml</url>
</health>

<server>
   <url>https://*:443/eam/sdk/</url>
   <description>vSphere ESX Agent Manager</description>
   <company>VMware, Inc.</company>
   <type>com.vmware.vim.eam</type>
   <adminEmail>[email protected]</adminEmail>
</server>

3. Save the file by hitting Esc followed by :wq!
4. Create file runtime.modification in /etc/vmware-eam/ with the following command:
vi /etc/vmware-eam/runtime.modification
5. Copy PATCH_EXTENSION and paste it into the file created in step 4.
6. Save the file by hitting Esc followed by :wq!
7. Execute service-control --restart eam in order to restart EAM.
8. If the file runtime.modification is not removed in 5 minutes after the restart, you have to remove it with the following command rm /etc/vmware-eam/runtime.modification.
Note: It is very important that this file is removed.

Additional Information

Impact/Risks:
Unable to deploy vSAN FS