Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vagrant up: Exception calling "GetRequestStream" with "0" argument(s) #73

Closed
guarisma opened this issue Dec 17, 2016 · 0 comments
Closed

Comments

@guarisma
Copy link

Issue Description

After running vagrant up for several minutes, it dies with an error from a powershell script
Exception calling "GetRequestStream" with "0" argument(s)

Host System

  • OS: Microsoft Windows [Version 10.0.14393]
  • Packer Version: 0.12.0
  • Vagrant Version: 1.8.7
  • VirtualBox Version: 5.1.6r110634

Command Output

==> default: C:\Windows\system32>powershell -Command "$req = [System.Net.HttpWebRequest]::Create('http://localhost:9200/metasploitable3/'); $req.method = 'PUT'; $req.GetResponse()"
==> default: Exception calling "GetResponse" with "0" argument(s): "Unable to connect to the
==> default: remote server"
==> default: At line:1 char:124
==> default: + $req = [System.Net.HttpWebRequest]::Create('http://localhost:9200/metasploita
==> default:
==> default: ble3/'); $req.method = 'PUT'; $req.GetResponse <<<< ()
==> default:
==> default: + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
==> default: + FullyQualifiedErrorId : DotNetMethodException
==> default:
==> default: C:\Windows\system32>powershell -Command "$body = [System.Text.Encoding]::ASCII.GetBytes('{"user":"kimchy", "post_date": "2009-11-15T14:12:12", "message": "Elasticsearch" }'); $req = [System.Ne
t.HttpWebRequest]::Create('http://localhost:9200/metasploitable3/message/1'); $req.method = 'PUT'; $req.ContentType = 'application/x-www-form-urlencoded'; $stream = $req.GetRequestStream(); $stream.Write($body, 0, $bo
dy.Length); $stream.close(); $req.GetResponse()"
==> default: Exception calling "GetRequestStream" with "0" argument(s): "Unable to connect t
==> default:
==> default: o the remote server"
==> default: At line:1 char:338
==> default: + $body = [System.Text.Encoding]::ASCII.GetBytes('{"user":"kimchy", "post_date"
==> default: : "2009-11-15T14:12:12", "message": "Elasticsearch" }'); $req = [System.Net.Htt
==> default: pWebRequest]::Create('http://localhost:9200/metasploitable3/message/1'); $req.m
==> default: ethod = 'PUT'; $req.ContentType = 'application/x-www-form-urlencoded'; $stream
==> default: = $req.GetRequestStream <<<< (); $stream.Write($body, 0, $body.Length); $stream
==> default: .close(); $req.GetResponse()
==> default: + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
==> default: + FullyQualifiedErrorId : DotNetMethodException
==> default:
==> default: You cannot call a method on a null-valued expression.
==> default: At line:1 char:355
==> default: + $body = [System.Text.Encoding]::ASCII.GetBytes('{"user":"kimchy", "post_date"
==> default: : "2009-11-15T14:12:12", "message": "Elasticsearch" }'); $req = [System.Net.Htt
==> default: pWebRequest]::Create('http://localhost:9200/metasploitable3/message/1'); $req.m
==> default: ethod = 'PUT'; $req.ContentType = 'application/x-www-form-urlencoded'; $stream
==> default: = $req.GetRequestStream(); $stream.Write <<<< ($body, 0, $body.Length); $stream
==> default: .close(); $req.GetResponse()
==> default: + CategoryInfo : InvalidOperation: (Write:String) [], RuntimeExce
==> default: ption
==> default: + FullyQualifiedErrorId : InvokeMethodOnNull
==> default:
==> default: You cannot call a method on a null-valued expression.
==> default: At line:1 char:394
==> default: + $body = [System.Text.Encoding]::ASCII.GetBytes('{"user":"kimchy", "post_date"
==> default: : "2009-11-15T14:12:12", "message": "Elasticsearch" }'); $req = [System.Net.Htt
==> default: pWebRequest]::Create('http://localhost:9200/metasploitable3/message/1'); $req.m
==> default: ethod = 'PUT'; $req.ContentType = 'application/x-www-form-urlencoded'; $stream
==> default: = $req.GetRequestStream(); $stream.Write($body, 0, $body.Length); $stream.close
==> default: <<<< (); $req.GetResponse()
==> default: + CategoryInfo : InvalidOperation: (close:String) [], RuntimeExce
==> default: ption
==> default: + FullyQualifiedErrorId : InvokeMethodOnNull
==> default:
==> default:
==> default: Exception calling "GetResponse" with "0" argument(s): "Unable to connect to the
==> default: remote server"
==> default: At line:1 char:414
==> default: + $body = [System.Text.Encoding]::ASCII.GetBytes('{"user":"kimchy", "post_date"
==> default: : "2009-11-15T14:12:12", "message": "Elasticsearch" }'); $req = [System.Net.Htt
==> default: pWebRequest]::Create('http://localhost:9200/metasploitable3/message/1'); $req.m
==> default: ethod = 'PUT'; $req.ContentType = 'application/x-www-form-urlencoded'; $stream
==> default: = $req.GetRequestStream(); $stream.Write($body, 0, $body.Length); $stream.close
==> default: (); $req.GetResponse <<<< ()
==> default: + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
==> default: + FullyQualifiedErrorId : DotNetMethodException
==> default:
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

c:\tmp\vagrant-shell.bat

Stdout from the command:

Stderr from the command:

usmcfiredog added a commit to usmcfiredog/metasploitable3 that referenced this issue Sep 20, 2020
…tial_startup_time

Updated the initial startup time for Elasticsearch Fixes rapid7#73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant