One more reason for the generic Docker error: Invoke-RestMethod "http://localhost:8079/api/http/routers

Error:

ERROR: for mssql-init  Container "1ab3ec142fb9" 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:\MVP-Site\up.ps1:26 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


Context/Resolution:

In my .env file, when I changed the SMS tag from 4.0.0-1809  to 4.1-1809 and tried to compose up, this error was thrown. Docker logs didn't give any information.  So, I changed the tag name to 4.1.0-1809, did a down, clean and up ritual , the push was successful:


It could be just the down, clean and up (all through PowerShell instead of using Docker desktop) that did the trick. So, I wouldn't suspect the tag change unless somebody else comes across the same scenario!

Comments

Popular Posts