One more cause for Invoke-RestMethod "http://localhost:8079/api/http/routers error

 Error:

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them

Creating mvp-site_redis_1 ... done

Creating mvp-site_solr_1  ... done

Creating mvp-site_mssql_1 ... done

Creating mvp-site_mssql-init_1 ... done

Creating mvp-site_solr-init_1  ... done

Creating mvp-site_cd_1         ... done


ERROR: for id  Container "12bc164b0150" is unhealthy.


ERROR: for cm  Container "12bc164b0150" 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:35 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


PS C:\MVP-Site> docker-compose logs -f "12bc164b0150"

ERROR: No such service: 12bc164b0150

Context/Resolution:

This error happened when I serialized content items in one folder and tried to set up the same Docker instance in a new folder albeit down-ing the first one. Docker logs didn't reveal anything useful either. I had copied over the concerned content item yml files in the new folder but not the associated .scindex file. When I did the same, the error was gone on up.ps1 in a "new PowerShell window". I did run clear.ps1 in the new folder before running the up.ps1, the second time and mostly do it every time to be safe!

Comments