<?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: CloneSession() throws &amp;quot;Login failed because the session could not be re-registered&amp;quot; in vSphere SDK for Perl Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/CloneSession-throws-quot-Login-failed-because-the-session-could/m-p/2921896#M2876</link>
    <description>&lt;P&gt;Moving this to the vSphere SDK for Perl Discussions for better resolution.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 14:30:53 GMT</pubDate>
    <dc:creator>stoevm</dc:creator>
    <dc:date>2022-08-02T14:30:53Z</dc:date>
    <item>
      <title>CloneSession() throws "Login failed because the session could not be re-registered"</title>
      <link>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/CloneSession-throws-quot-Login-failed-because-the-session-could/m-p/2919100#M2873</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I want to create a remote plugin for the vCenter as described in the document Developing Remote Plug-ins with the vSphere Client SDK . Unfortunately I'm not able to clone the session of the currently logged in user.&lt;/P&gt;&lt;P&gt;At first I request a CloneTicket via the REST-API. This works and I get a string which looks like "cst-VCT-52abe3ae-0b53-12f1-c978-abd1252b99e2--tp-12-D3-A0-45-85-74-63-3E-A6-D2-B1-A4-38-90-72-19-27-62-22-00". With this string I want to get a valid user session. As described in the document I use the cloneSession method to gain this. UnfortunatelyI get a InvalidLogin exception.&lt;/P&gt;&lt;P&gt;In the vcenter the log file /storage/log/vmware/vpxd/vpxd-xxx.log states&lt;/P&gt;&lt;PRE&gt;[VpxdUser] Attempt to re-register session with cnxId=529f1252-1a34-5d18-67d2-cab1fa5f5a12 failed&lt;/PRE&gt;&lt;P&gt;The id "529f1252-1a34-5d18-67d2-cab1fa5f5a12" belongs to the session I used to open the SessionManager, which is a different user than the one from which the sesssion should be cloned. I use the perl SDK for the remote plugin but even the language agnostic way via the Mob (https://[FQDN-vCenter]/mob/?moid=SessionManager&amp;amp;method=cloneSession) only leads to the same error:&lt;/P&gt;&lt;PRE&gt;key "vim.fault.InvalidLoginWithReason"&lt;BR /&gt;message "Login failed because the session could not be re-registered."&lt;/PRE&gt;&lt;P&gt;At this point I spent a lot of time into the troubleshooting and I have no idea why the clone operation doesnt work. I can't find anything via Google about this "re-registered" error. Did I miss something? Are there any special reqirements? Can sombody please give me a hint how I can succesfully clone the session?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 07:19:29 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/CloneSession-throws-quot-Login-failed-because-the-session-could/m-p/2919100#M2873</guid>
      <dc:creator>ZD14a</dc:creator>
      <dc:date>2022-07-18T07:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: CloneSession() throws "Login failed because the session could not be re-registered"</title>
      <link>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/CloneSession-throws-quot-Login-failed-because-the-session-could/m-p/2919552#M2874</link>
      <description>&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;It seems like you are using an already logged-in vim port. I tried it locally - first login via username/password and then cloning the session via ticket on the same vim port and got the same error as you. Can you try with a non logged-in vim port instead (e.g. the way it's demonstrated in the remote plugin sample)?&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Plam&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 15:06:51 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/CloneSession-throws-quot-Login-failed-because-the-session-could/m-p/2919552#M2874</guid>
      <dc:creator>Plam_Dimitrov</dc:creator>
      <dc:date>2022-07-20T15:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: CloneSession() throws "Login failed because the session could not be re-registered"</title>
      <link>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/CloneSession-throws-quot-Login-failed-because-the-session-could/m-p/2920287#M2875</link>
      <description>&lt;P&gt;Hi Plam,&lt;/P&gt;&lt;P&gt;Thank you for your input. Indeed, I use a logged in VIM-Session. In the example they use the Java SDK, which allows to get the Session Manager without logging in. In my case I have to use the Perl SDK and there I didn't find a way to get a SessionManager Object without logging in.&lt;/P&gt;&lt;P&gt;What I do now is to use an &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;unprivileged&lt;/SPAN&gt;&lt;/SPAN&gt; service account to log in at the vCenter, get the SessionManager Object, logout and then use the logged out SessionManager object to clone the session.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;my $sessionManager = $vimSession-&amp;gt;get_view(mo_ref =&amp;gt; $vimSession-&amp;gt;get_service_content()-&amp;gt;sessionManager);
$sessionManager-&amp;gt;Logout();
my $returnSession = $sessionManager-&amp;gt;CloneSession(cloneTicket =&amp;gt; $cloneTicket);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this finally works for me. Is it a good solution? I don't know, but it's the only one I found. Does anyone know how to reach this with the Perl SDK without logging in before?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 05:29:40 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/CloneSession-throws-quot-Login-failed-because-the-session-could/m-p/2920287#M2875</guid>
      <dc:creator>ZD14a</dc:creator>
      <dc:date>2022-07-25T05:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: CloneSession() throws "Login failed because the session could not be re-registered"</title>
      <link>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/CloneSession-throws-quot-Login-failed-because-the-session-could/m-p/2921896#M2876</link>
      <description>&lt;P&gt;Moving this to the vSphere SDK for Perl Discussions for better resolution.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 14:30:53 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/CloneSession-throws-quot-Login-failed-because-the-session-could/m-p/2921896#M2876</guid>
      <dc:creator>stoevm</dc:creator>
      <dc:date>2022-08-02T14:30:53Z</dc:date>
    </item>
  </channel>
</rss>

