What happens if certs sub-folder is blank under traefik folder

 Error:

Error connecting to https://mvp-id.sc.localhost/.well-known/openid-configuration: The SSL connection could not be established, see inner exception.

C:\MVP-Site\up.ps1 : Unable to log into Sitecore, did the Sitecore environment start correctly? See logs above.

At line:1 char:1

+ .\up.ps1

+ ~~~~~~~~

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

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,up.ps1


Pushing latest items to Sitecore...

Environment default was not defined. Use the login command to define it.

C:\MVP-Site\up.ps1 : Serialization push failed, see errors above.

At line:1 char:1

+ .\up.ps1

+ ~~~~~~~~

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

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,up.ps1


Environment default was not defined. Use the login command to define it.

C:\MVP-Site\up.ps1 : Item publish failed, see errors above.

At line:1 char:1

+ .\up.ps1

+ ~~~~~~~~

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

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,up.ps1



Context/Resolution: Started getting this error when I decided to run Docker from a new folder. Although down-ed the instance from the old folder and cleared its docker folder, the new folder was complaining. So,  subsequently, ran docker system prune -a and setup  the new instance from scratch without much result.

Finally realised although I copied the .env file from the old folder into the new one with the filled values, didn't copy over the certs into the new docker\traefik\certs folder. I decided to copy over the files from the  old  to new folder. Or, in the new folder, you can also execute init.ps1,  which is a cleaner approach. Once I had the proper certs folders under traefik, all was good.

In one other scenario, I noticed that the certs_config.yaml file under  the \docker\traefik\config\dynamic folder didn't have the correct file names of the certs, it looked like this:


instead of this:


When I matched the names and did a docked compose -up, the above error was gone!


Comments

Popular Posts