Error connecting to https://id.sc-mvp.localhost/.well-known/openid-configuration

I received the below error(s) when trying to start-up Sitecore MVP site in a brand-new machine (Windows 11). When I googled one of those, I couldn't find any results either:

The error(s) occurs whenever CM or id instance' entry is not present in hosts file. So, there are multiple types of errors presented to us as listed below. The simple solution is to:

Add the concerned entries to host file under C:\Windows\System32\drivers\etc:

127.0.0.1 id.sc-mvp.localhost

127.0.0.1 cm.sc-mvp.localhost



Error-1:



Error connecting to https://id.sc-mvp.localhost/.well-known/openid-configuration: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Push-Items : Unable to log into Sitecore, did the Sitecore environment start correctly? See logs above.

At C:\mvp-site\Start-Environment.ps1:130 char:1

+ Push-Items -IdHost "https://id.$($HostDomain)" -CmHost "https://cm.$( ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Push-Items


Pushing latest items to Sitecore...

Error connecting to https://id.sc-mvp.localhost/.well-known/openid-configuration: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Push-Items : Serialization push failed, see errors above.

At C:\mvp-site\Start-Environment.ps1:130 char:1

+ Push-Items -IdHost "https://id.$($HostDomain)" -CmHost "https://cm.$( ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Push-Items


Error-2:



The variable '$status' cannot be retrieved because it has not been set.

At C:\mvp-site\docker\tools\Scripts\Functions-SitecoreCLI.ps1:27 char:14

+     } while ($status.status -ne "enabled" -and $startTime.AddSeconds( ...

+              ~~~~~~~

    + CategoryInfo          : InvalidOperation: (status:String) [], RuntimeException

    + FullyQualifiedErrorId : VariableIsUndefined


The variable '$status' cannot be retrieved because it has not been set.

At C:\mvp-site\docker\tools\Scripts\Functions-SitecoreCLI.ps1:28 char:14

+     if (-not $status.status -eq "enabled") {

+              ~~~~~~~

    + CategoryInfo          : InvalidOperation: (status:String) [], RuntimeException

    + FullyQualifiedErrorId : VariableIsUndefined

Comments

Popular Posts