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:
- Wait for a little while till your CMS pod is up and running properly.
- Your local is conflicting with Traeffik - make sure you have executed
iisreset /stop
before running the up.ps1.
- There are chances that the solr services is conflicting so stopp it or make sure they don't use the port 8983.
- 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.