Home Gitesh Portfolio Blog About Me Gallery Contact

XM Cloud: Failing Invoke-RestMethod localhost:8079

Error:

Invoke-RestMethod "http://localhost:8079/api/http/routers

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

No connection could be made because the target machine actively refused it.



 

Solution:

Issue is happening when you have just started your containers. In your ./up.ps1 script , Powershell tries to browse "http://localhost:8079/api/http/routers/cm-secure@docker" but it fails to get response and then this error happens. There are a few possible solutions:

  1. Wait for a little while till your CMS pod is up and running properly.
  2. Your local is conflicting with Traeffik - make sure you have executed iisreset /stop before running the up.ps1.
  3. There are chances that the solr services is conflicting so stopp it or make sure they don't use the port 8983.
  4. If you still get this error then docker run -it exec <containername> powershell.exe  Then inside the powershell of the container, try to execute Invoke-WebRequest http://localhost -UseBasicParsing to see the actual reason for the error.
Posted: 26/11/2023 8:34:30 p.m. by Gitesh Shah | with 0 comments