Sitecore Demo Edge Docker Setup: Invoke-RestMethod : Unable to connect to the remote server error

The following "Invoke-RestMethod : Unable to connect to the remote server" error occurred during one of my up.ps1 execution with Sitecore Demo Edge docker runs.

Solution:

- down.ps1

- clean.ps1

Scenario:

CM did not start stating connectivity issues. No SQL Server installed locally, just Docker setting up containers and threw this error on up.ps1:

ERROR:

for cm  Container "5b8c0dcff336" is unhealthy.

ERROR: Encountered errors while bringing up the project.

Waiting for CM to become available...

Invoke-RestMethod : Unable to connect to the remote server

At C:\Sitecore.Demo.Edge\up.ps1:61 char:19

+ ...   $status = Invoke-RestMethod "http://localhost:8079/api/http/routers ...

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

    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc

   eption

    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand


docker logs -f displayed the following error:

Error:

At C:\StartInit.ps1:40 char:44

+ ...                Where-Object { $serverDatabases.Contains($_.BaseName)}

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

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

    + FullyQualifiedErrorId : InvokeMethodOnNull


Start publishing dacpacs

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [53]. .

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation (memory or maximum allowed connections) on the server..

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: An existing connection was forcibly closed by the remote host.

.

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Client unable to establish connection.

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Client unable to establish connection due to prelogin failure.

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..

sqlcmd exited with code 1

At C:\DeployDatabases.ps1:93 char:9

+         throw "sqlcmd exited with code $LASTEXITCODE"

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

    + CategoryInfo          : OperationStopped: (sqlcmd exited with code 1:Str

   ing) [], RuntimeException

    + FullyQualifiedErrorId : sqlcmd exited with code 1

Comments

Popular Posts