Sitecore Installation Error Connection was Established but Error Occurred During Login

While Installing the Sitecore 10.3 on my local machine (Windows 11), I encountered with the following error:

[ XConnectXP0_CreateShardApplication... : InvokeSqlcmd ------------------------]
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
[TIME] 00:06:20
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)

sitecore-installation-error-login-1

The root cause of the issue is that a connection to the SqlServer is established without the "TrustServerCertificate" parameter.

Solution:

Go to the xconnect-xp0.json in your Sitecore download setup files, open it in any editor tool, and search the following parameters:

  • CreateShardApplicationDatabaseServerLoginInvokeSqlCmd
  • CreateShardManagerApplicationDatabaseUserInvokeSqlCmd
  • CreateShard0ApplicationDatabaseUserInvokeSqlCmd
  • CreateShard1ApplicationDatabaseUserInvokeSqlCmd

Add the "TrustServerCertificate": true, to all parameters. For example:

"CreateShardApplicationDatabaseServerLoginInvokeSqlCmd": {
"Description": "Create Collection Shard Database Server Login.",
"Type": "InvokeSqlcmd",
"Params": {
"ServerInstance": "[parameter('SqlServer')]",
"TrustServerCertificate": true,
"Credential": "[variable('Sql.Credential')]",
"InputFile": "[variable('Sharding.SqlCmd.Path.CreateShardApplicationDatabaseServerLogin')]",
"Variable": [
"[concat('UserName=',variable('SqlCollection.User'))]",
"[concat('Password=',variable('SqlCollection.Password'))]"
]
},
"Skip": "[or(parameter('SkipDatabaseInstallation'),parameter('Update'))]"
},

sitecore-installation-error-login-2

Reference: https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB1003015

Happy Sitecoreing 😊

Comments

Popular posts from this blog

Sitecore Installation Error: Failed to Start Service 'Sitecore Marketing Automation Engine'

Import CSV Data in Sitecore Using PowerShell: Part-3

Error: Method Through Reflection is Not Allowed after Applying Sitecore Hotfix