Invoke-restmethod: unable to connect to remote server

Hi,

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 xxx.xxx.xxx.xxx 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.

Thanks!

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