<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Connect-VIServer occurs error intermittently in vSphere Update Manager PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Connect-VIServer-occurs-error-intermittently/m-p/484618#M109</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's of course hard to analyse what goes wrong from a distance.&lt;/P&gt;&lt;P&gt;I personally would try to collect as much info as possible before doing the Connect-VIServer:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is there anything in $global:defaultviservers&lt;/LI&gt;&lt;LI&gt;Can the FQDN of the VCSA be resolved&lt;/LI&gt;&lt;LI&gt;Is the VCSA reachable&lt;/LI&gt;&lt;LI&gt;What route is followed to the VCSA&lt;/LI&gt;&lt;LI&gt;...&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I would check the vpxd log when it goes wrong.&lt;/P&gt;&lt;P&gt;If it is an intermittent issue, I would also see if the connection between your station and the VCSA might have packet drops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first step is trying to find a clue of what goes wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Sep 2018 06:38:58 GMT</pubDate>
    <dc:creator>LucD</dc:creator>
    <dc:date>2018-09-21T06:38:58Z</dc:date>
    <item>
      <title>Connect-VIServer occurs error intermittently</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Connect-VIServer-occurs-error-intermittently/m-p/484617#M108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I deploy VM using Ansible + PowerCLI, usually it works well.&lt;/P&gt;&lt;P&gt;But Connect-VIServer occurs error rarely. (about once or twice in a hundred chances)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is the stdout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(198, 198, 198); border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: left; background-color: #f2f2f2; color: #505050; padding: 6px;" valign="middle"&gt;&lt;STRONG&gt;stdout&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;&lt;P&gt;Connect-VIServer : 9/19/18 1:39:20 AM Connect-VIServer An error occurred while sending the request. At /var/lib/awx/projects/vmware_dev/roles/1_common_vmware/files/gatherVMInfo_v1.1.ps1:21 char:1 + Connect-VIServer -Server $server -User $user -Password $password| O ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Connect-VIServer], ViError + FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_SoapException,VMware.VimAutomation.ViCore.Cmdlets.Commands.&lt;/P&gt;&lt;P&gt;ConnectVIServer get-vm : 9/19/18 1:39:20 AM Get-VM You are not currently connected to any servers. Please connect first using a Connect cmdlet. At /var/lib/awx/projects/vmware_dev/roles/1_common_vmware/files/gatherVMInfo_v1.1.ps1:23 char:7 + $vm = get-vm | where { $_.ExtensionData.config.uuid -eq $uuid } + ~~~~~~ + CategoryInfo : ResourceUnavailable: (:) [Get-VM], ViServerConnectionException + FullyQualifiedErrorId : Core_BaseCmdlet_NotConnectedError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM Disconnect-VIServer : 9/19/18 1:39:20 AM Disconnect-VIServer PowerCLI is currently not connected to a server. To create a new connection use Connect-VIServer. /var/lib/awx/projects/vmware_dev/roles/1_common_vmware/files/gatherVMInfo_v1.1.ps1:41 char:1 + Disconnect-VIServer -Confirm:$false + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Disconnect-VIServer], ViServerConnectionException + FullyQualifiedErrorId : Core_DisconnectVIServer_NotConnectedError,VMware.VimAutomation.ViCore.Cmdlets.Commands.DisconnectVIServer&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked it and vCenter was in normal. (cpu usage, mem usage, network bandwidth, max sessions..)&lt;/P&gt;&lt;P&gt;There are no proxy or firewall. Ansible server and vCenter is on same network.&lt;/P&gt;&lt;P&gt;and InvalidCertificateAction option is set Ignore in profile.ps1 file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would make this error?&lt;/P&gt;&lt;P&gt;Could anyone please help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="68" style="border: 1px solid rgb(198, 198, 198); border-image: none; width: 878px; height: 70.1px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: left; background-color: #f2f2f2; color: #505050; padding: 6px;" valign="middle"&gt;&lt;STRONG&gt;/opt/microsoft/powershell/6.0.1/profile.ps1&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;&lt;P&gt;Set-PowerCLIConfiguration -InvalidCerficateAction ignore -confirm:$false | Out-Null&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2018 06:30:05 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Connect-VIServer-occurs-error-intermittently/m-p/484617#M108</guid>
      <dc:creator>handover</dc:creator>
      <dc:date>2018-09-21T06:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Connect-VIServer occurs error intermittently</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Connect-VIServer-occurs-error-intermittently/m-p/484618#M109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's of course hard to analyse what goes wrong from a distance.&lt;/P&gt;&lt;P&gt;I personally would try to collect as much info as possible before doing the Connect-VIServer:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is there anything in $global:defaultviservers&lt;/LI&gt;&lt;LI&gt;Can the FQDN of the VCSA be resolved&lt;/LI&gt;&lt;LI&gt;Is the VCSA reachable&lt;/LI&gt;&lt;LI&gt;What route is followed to the VCSA&lt;/LI&gt;&lt;LI&gt;...&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I would check the vpxd log when it goes wrong.&lt;/P&gt;&lt;P&gt;If it is an intermittent issue, I would also see if the connection between your station and the VCSA might have packet drops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first step is trying to find a clue of what goes wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2018 06:38:58 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Connect-VIServer-occurs-error-intermittently/m-p/484618#M109</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2018-09-21T06:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Connect-VIServer occurs error intermittently</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Connect-VIServer-occurs-error-intermittently/m-p/484619#M110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I am not familiar with vmware or vCenter. I am developer of automation script for vCenter using Ansible.&lt;/P&gt;&lt;P&gt;In our environments, ansible server (linux with powershell and powercli) calls powershell script which uses connect-VIserver.&lt;/P&gt;&lt;P&gt;99% of these actions is successful. But in very rare case, Connect-VIServer was failed like bellow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my answers.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is there anything in $global:defaultviservers&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; No. we don't use&amp;nbsp; $global:defaultviservers. Instead of it, ansible server passed the necessary parameters as ps scripts arguements such as -sever, -user, -password&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Can the FQDN of the VCSA be resolved&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; I am not sure I understand this clearly. but ansible server has a vCenter server name in /etc/hosts with it's IP address. And we use only IP address to call Connect-VIServer.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is the VCSA reachable&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; You mean vCenter? It is reachable. ansible server and vCenter are in the same network. No firewall or security things between them.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;What route is followed to the VCSA&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; Like I said, no routing info is needed. They are in the same NW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition, this occurs very rarely and temporarilly as well. The very next call within a seconds was always successful.&lt;/P&gt;&lt;P&gt;I checked vCenter server resource utilization. but it was very low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, according to your advise, I will monitor the communication with ping or http ping and log it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you tell me how to check vpxd log? I have an account with only read permission.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2018 07:15:20 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Connect-VIServer-occurs-error-intermittently/m-p/484619#M110</guid>
      <dc:creator>handover</dc:creator>
      <dc:date>2018-09-21T07:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Connect-VIServer occurs error intermittently</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Connect-VIServer-occurs-error-intermittently/m-p/484620#M111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The $global:defaultviservers is an automatic variable, which shows which vCenter connections are open.&lt;/P&gt;&lt;P&gt;See &lt;A href="https://vdc-repo.vmware.com/vmwb-repository/dcr-public/538b0256-c152-4c10-b092-7dc05fd55cd7/52d93c1f-653e-460f-8cc1-a728b989ba29/doc/Connect-VIServer.html"&gt;Connect-VIServer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The vCenter relies on DSN, name resolution is a pre-req for a proper functioning vSphere setup.&lt;/P&gt;&lt;P&gt;And that needs to work forward and reverse on the vCenter.&lt;/P&gt;&lt;P&gt;Even if you have a local hosts file, it's on the vCenter that name resolution has to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The vpxd log is present on the vCenter. You can use the &lt;A href="https://vdc-repo.vmware.com/vmwb-repository/dcr-public/538b0256-c152-4c10-b092-7dc05fd55cd7/52d93c1f-653e-460f-8cc1-a728b989ba29/doc/Get-Log.html"&gt;Get-Log&lt;/A&gt; cmdlet to retrieve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="text-align: Left; font-family: Segoe UI; font-style: normal; font-weight: normal; font-size: 12; color: #000000;"&gt;&lt;P style="font-family: Lucida Console; margin: 0 0 0 0; background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 16;"&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN&gt;Get-Log&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080;"&gt;&lt;SPAN&gt;-Key&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #8a2be2;"&gt;&lt;SPAN&gt;vpxd:vpxd.log&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;&lt;SPAN&gt;|&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN&gt;select&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080;"&gt;&lt;SPAN&gt;-ExpandProperty&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #8a2be2;"&gt;&lt;SPAN&gt;Entries&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;&lt;SPAN&gt;|&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Lucida Console; margin: 0 0 0 0; background-color: #ffffff;"&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN&gt;Out-File&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080;"&gt;&lt;SPAN&gt;-FilePath&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #8a2be2;"&gt;&lt;SPAN&gt;/tmp/vpxd.log &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2018 07:27:10 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/Connect-VIServer-occurs-error-intermittently/m-p/484620#M111</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2018-09-21T07:27:10Z</dc:date>
    </item>
  </channel>
</rss>

