1

Have you ever get an error during the XM cloud installation via docker like this one?

Invoke-RestMethod : Unable to connect to the remote server
At C: \Users \ionut.plesescu Desktop Repositories \client-dotcom up-ps1:59
**+ ...   $status = Invoke-RestMethod "http://localhost:8079/api/http/routers ...
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException      
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand**

I enabled wsl 2 from Docker, disabled defaultProxy from .NET/machine.config and did everything suggested on internet but got no success in resolving this issue.

Machine being used is not personal machine but provided by my organization, if it matters. I have run ./down.ps1, cd ./docker/clean.ps1, ./up.ps1 and still same error.

Thank you.

5
  • Kindly add the error message in the text for SEO purposes. Sep 12, 2023 at 9:26
  • Done @SumitBhatia. Thanks.
    – Z3RaK
    Sep 12, 2023 at 9:31
  • What have you tried? Have you checked for errors on the CM container? Is the CM container up and running?
    – Richard Seal
    Sep 12, 2023 at 14:41
  • No, no containers open when i run ./up.ps1
    – Z3RaK
    Sep 12, 2023 at 14:46
  • Go to Docker Dashboard, and try checking your containers and its logs. I doubt your few containers are unhealthy and it is causing this problem. Sep 13, 2023 at 5:58

6 Answers 6

1

Make sure that no VPN is enabled on your PC, then do the following steps:

  1. Uncheck Use Docker Compose V2 in docker
  2. run ./down.ps1 , cd ./docker/clean.ps1
  3. delete .pem file in ./docker/traefik/certs
  4. run ./up.ps1

if that still does not work, try to re-run ./init.ps1 with the required params.

1

There could be multiple reasons but you can follow some basic steps as generally we do if we get similar kind of error -

  1. Run ./down.ps1
  2. Run ./up.ps1

If this doesn't work then run ./init.ps1

If the above doesn't work then try -

  • Stop-Service docker
  • Stop-service hns
  • Start-service hns
  • Start-Service docker
  • docker network prune

And then follow the above steps -

  1. Run ./down.ps1
  2. Run ./up.ps1
0

There could be many possibility for this error. When I encountered it, it was because of a invalid license that was mounted. To further help, navigate to your cm docker container's powershell and post the error messages you receive when you run the below command.

Invoke-WebRequest http://localhost -UseBasicParsing
0

Nothing helped but cleaning up everything with the command:

docker system prune -a
0

You have to run the down.ps1 file, then re-run init.ps1, and finally the up.ps1. Sometimes it happens that the variables have to be recreated, that’s why we have to do an Init again. It’s a common issue.

0

I was able to resolve the same issue by following below steps:

  1. run ./down.ps1
  2. run docker system prune -a
  3. Stopped the IIS, whenever we are running docker we need to make sure IIS is stopped. I think this was the main reason for me to face the above issue in the first place.
  4. run ./init.ps1
  5. run ./up.ps1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.