Invoke-restmethod: unable to connect to remote server


I've installed Elasticsearch 7.1.1 using the .msi package. When I open localhost:9200 it gives me " This site can’t be reached refused to connect.

I also opened powershell and typed in: "invoke-restmethod http://localhost:9200" but gave me this error:

Invoke-WebRequest : Cannot validate argument on parameter 'Uri'. The argument is null or empty. Provide an argument
that is not null or empty, and then try the command again.
At line:1 char:24

  • Invoke-WebRequest -URI $url -Proxy 'http://localhost:9200'
  •                    ~~~~
    • CategoryInfo : InvalidData: (:slight_smile: [Invoke-WebRequest], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Please advise.


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.