web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / DAX Beginners / Solving “Failed to create a...

Solving “Failed to create a session” in Data upgrade cockpit

Christian Silva Profile Picture Christian Silva 707

I have recently imported Contoso Demo Data using Data Transfer Tool on a brand new CU8 environment and it was required to upgrade it to CU12.

All the previous steps were fine, installation, data importation and CU12 installation (Application and Binary) worked without problems. Then I started the Upgrade Check List, since this was an environment free of customizations I had no problems with Code Upgrade and jumped to Data Upgrade:Capturar2

Problem started on Launch data upgrade step, when I opened the cockpit and clicked on Run I would get the message error “Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics”.
8475.image_4D99E026


Reading some forums and blogs I tried the following troubleshootings:

– Restarted AOS;
– Checked if Admin and AOS account had database privileges;
– Compiled using AXBuild;
– Compiled IL;
– Deleted UAC files;
– Deleted XppIL folder;
– Deleted and recreated partitions.

Observation: If you need more details about these steps, check this post from StoneRidge.

Then I read a post by Joris de Gruyter saying that the reason is because the cockpit runs in CIL and there’s a handoff between client and server using “RunAs”, and that goes through the admin account. If the admin account is invalid, the RunAs fails.

I believe the reason for recreating partitions is because when you import the Demo Data using Data Transfer Tool some system tables are left untouched, including UserInfo table, and the cockpit needs an Admin account for each partition to use on “RunAs”.
The Demo Data consists of three partitions, Initial (default), Public Sector and Extended, for some reason when I deleted the partitions and created again, it didn’t create an Admin account for every new partition.
Capturar3

My solution was to create an Admin account for each partition through Job.

static void CreateUserAdmin(Args _args)
{
       UserInfo userInfo;

       select userInfo where userInfo.id == 'Admin';
       userInfo.(fieldNum(UserInfo, Partition)) = 5637144578;
       userInfo.insert();
}

This job selects a record from UserInfo with ID equals to Admin and then it modifies the field partition to a manual value, that’s why I had to use “(fieldNum(UserInfo, Partition))”, otherwise AX won’t let me assign a value manually.

Checking records through SQL Management Studio again:
Capturar4

I restarted AOS(just to be sure) and tried to run Upgrade Cockpit again, for my hapiness it started working
Capturar5.PNG



This was originally posted here.

Comments

*This post is locked for comments