VMware {code} Community
jmdev
Contributor
Contributor

Long pause & timeout when requesting ServiceInstance

I'm using the latest VMWare CLI on linux which includes the vSphere SDK for Perl (I know not to install them both). I am connecting to a stand alone ESXi 5.5 host.

Whenever I call Util::connect() with tracing (verbose) enabled I see this:

REQUEST: $VAR1 = '<?xml version="1.0" encoding="UTF-8"?>

   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

                     xmlns:xsd="http://www.w3.org/2001/XMLSchema"

                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <soapenv:Body>

<RetrieveServiceContent xmlns="urn:vim25"><_this type="ServiceInstance">ServiceInstance</_this>

</RetrieveServiceContent></soapenv:Body></soapenv:Envelope>

';

And it hangs there for about 45 seconds and eventually gives me a response.

RESPONSE: $VAR1 = '<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

<RetrieveServiceContentResponse xmlns="urn:vim25"><returnval><rootFolder type="Folder">ha-folder-root</rootFolder><propertyCollector type="PropertyCollector">ha-property-collector</propertyCollector><viewManager type="ViewManager">ViewManager</viewManager><about><name>VMware ESXi</name><fullName>VMware ESXi 5.5.0 build-1623387</fullName><vendor>VMware, Inc.</vendor><version>5.5.0</version><build>1623387</build><localeVersion>INTL</localeVersion><localeBuild>000</localeBuild><osType>vmnix-x86</osType><productLineId>embeddedEsx</productLineId><apiType>HostAgent</apiType><apiVersion>5.5</apiVersion><licenseProductName>VMware ESX Server</licenseProductName><licenseProductVersion>5.0</licenseProductVersion></about><setting type="OptionManager">HostAgentSettings</setting><userDirectory type="UserDirectory">ha-user-directory</userDirectory><sessionManager type="SessionManager">ha-sessionmgr</sessionManager><authorizationManager type="AuthorizationManager">ha-authmgr</authorizationManager><serviceManager type="ServiceManager">ha-servicemanager</serviceManager><perfManager type="PerformanceManager">ha-perfmgr</perfManager><eventManager type="EventManager">ha-eventmgr</eventManager><taskManager type="TaskManager">ha-taskmgr</taskManager><accountManager type="HostLocalAccountManager">ha-localacctmgr</accountManager><diagnosticManager type="DiagnosticManager">ha-diagnosticmgr</diagnosticManager><licenseManager type="LicenseManager">ha-license-manager</licenseManager><searchIndex type="SearchIndex">ha-searchindex</searchIndex><fileManager type="FileManager">ha-nfc-file-manager</fileManager><datastoreNamespaceManager type="DatastoreNamespaceManager">ha-datastore-namespace-manager</datastoreNamespaceManager><virtualDiskManager type="VirtualDiskManager">ha-vdiskmanager</virtualDiskManager><ovfManager type="OvfManager">ha-ovf-manager</ovfManager><dvSwitchManager type="DistributedVirtualSwitchManager">ha-dvsmanager</dvSwitchManager><localizationManager type="LocalizationManager">ha-l10n-manager</localizationManager><storageResourceManager type="StorageResourceManager">ha-storage-resource-manager</storageResourceManager><guestOperationsManager type="GuestOperationsManager">ha-guest-operations-manager</guestOperationsManager></returnval></RetrieveServiceContentResponse>

</soapenv:Body>

</soapenv:Envelope>';

Tracing with perl shows it's waiting on the ESXi host to respond (Verified with Debug::Trace). If I look on the ESXi side I see this right at the end of the pause just before I get the response.

[380C1B70 error 'SoapAdapter.HTTPService'] Failed to read request; stream: <io_obj p:0x38b00630, h:-1, <TCP '0.0.0.0:0'>, <TCP '0.0.0.0:0'>>, error: N7Vmacore16TimeoutExceptionE(Operation timed out)

pam_per_user: create_subrequest_handle(): doing map lookup for user "root"

pam_per_user: create_subrequest_handle(): creating new subrequest (user="root", service="system-auth-generic")

Accepted password for user root from 192.168.0.4

The Login continues and everything works. It's hanging before it even makes the request to login, so it's not an authentication system it's waiting on (it uses local auth anyways). I can't for the life of me figure out what this thing is trying to connect to and is waiting for.

0 Kudos
1 Reply
CoinGrahamIV
Contributor
Contributor

Is anything else slow on the console of the ESXi hosts?  Logging into the console for instance.  Are you using an ip or FQDN?

Check DNS on the ESXi system.  Try to resolve hostnames from the the ESXi console.

I've seen these kinds of delays on linux systems are that trying to resolve their own hostname and they don't respond until dns fails and then it works.

0 Kudos