vagrant share does not work

Created on 20 Mar 2014  ยท  8Comments  ยท  Source: hashicorp/vagrant

If i try the new vagrant share feature i always get the following error:

The sharing proxy exited with a non-zero exit status! This represents
an erroneous exit and likely a bug. Please report this issue.

On the Website https://vagrantcloud.com/shares the link appears, but it does not work.

Here is the debug output:

==> default: Checking authentication and authorization...
 INFO interface: output: Creating Vagrant Share session...
 INFO interface: output: ==> default: Creating Vagrant Share session...
==> default: Creating Vagrant Share session...
 INFO api: /api/v1/shares
DEBUG api: API payload: {"share":{"http_port":8080,"https_port":null,"ports":[8080,2222]}}
DEBUG api: Response: {"expired":false,"has_private_key":false,"name":"shining-horse-4184","http_port":8080,"https_port":null,"ssh_port":null,"ssh_username":null,"ports":[8080,2222],"expired_at":null,"created_at":"2014-03-20T07:41:04.781Z","private_key_password":true,"use_key_once":true}
 INFO interface: detail: Share will be at: shining-horse-4184
 INFO interface: detail:     default: Share will be at: shining-horse-4184
    default: Share will be at: shining-horse-4184
 INFO helper: Executing proxy: ["-share", "-name", "shining-horse-4184", "-target", "127.0.0.1", "-server", "register.vagrantshare.com:8000", "-port", "8080", "-port", "8080", "-port", "2222"]
 INFO subprocess: Starting process: ["/Users/username/.vagrant.d/gems/gems/vagrant-share-1.0.1/localbin/proxy_darwin_amd64", "-share", "-name", "shining-horse-4184", "-target", "127.0.0.1", "-server", "register.vagrantshare.com:8000", "-port", "8080", "-port", "8080", "-port", "2222"]
DEBUG subprocess: Command not in installer, not touching env vars.
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: proxy:1395301264,log,[INFO] Restricting ports to: [8080 8080 2222]
proxy:1395301264,log,[DEBUG] proxy: Connecting to mux server at register.vagrantshare.com:8000
DEBUG helper: Proxy message: ["log", "[INFO] Restricting ports to: [8080 8080 2222]"]
DEBUG helper: Proxy message: ["log", "[DEBUG] proxy: Connecting to mux server at register.vagrantshare.com:8000"]
DEBUG subprocess: stdout: proxy:1395301340,log,[ERR] proxy: Failed to start sharing: Failed to connect to mux server: dial tcp 54.236.96.102:8000: operation timed out
DEBUG helper: Proxy message: ["log", "[ERR] proxy: Failed to start sharing: Failed to connect to mux server: dial tcp 54.236.96.102:8000: operation timed out"]
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31924
DEBUG subprocess: Exit status: 1
 INFO environment: Running hook: environment_unload
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 2 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x0000010235c890>
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<VagrantPlugins::Share::Errors::ProxyExit: The sharing proxy exited with a non-zero exit status! This represents
an erroneous exit and likely a bug. Please report this issue.>
ERROR vagrant: The sharing proxy exited with a non-zero exit status! This represents
an erroneous exit and likely a bug. Please report this issue.
ERROR vagrant: /Users/username/.vagrant.d/gems/gems/vagrant-share-1.0.1/lib/vagrant-share/activate.rb:1323:in `block in execute'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/command.rb:200:in `block in with_target_vms'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/command.rb:194:in `each'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/command.rb:194:in `with_target_vms'
/Users/username/.vagrant.d/gems/gems/vagrant-share-1.0.1/lib/vagrant-share/activate.rb:1120:in `execute'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/cli.rb:42:in `execute'
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/environment.rb:244:in `cli'
/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.5.0/bin/vagrant:147:in `<main>'
 INFO interface: error: The sharing proxy exited with a non-zero exit status! This represents
an erroneous exit and likely a bug. Please report this issue.
The sharing proxy exited with a non-zero exit status! This represents
an erroneous exit and likely a bug. Please report this issue.
 INFO interface: Machine: error-exit ["VagrantPlugins::Share::Errors::ProxyExit", "The sharing proxy exited with a non-zero exit status! This represents\nan erroneous exit and likely a bug. Please report this issue."]

Telnet to register.vagrantshare.com:8000 doesn't work either.

By the way, the beta of vagrantcloud.com looks very promising! Great work!

Most helpful comment

@mitchellh, could you say a little more about how firewalls conflict with vagrant share? I'm having this same issue, and I can't figure out how my firewall and/or my network's firewall might be interfering with vagrant. I tried sudo ufw allow 8000, but no luck so far.

Strangely, the vagrant page about HTTP sharing at https://www.vagrantup.com/blog/feature-preview-vagrant-1-5-share.html says:

Once the share is created, a relatively obscure URL is outputted. This URL will route directly to your Vagrant environment; it doesn't matter if you or accessing party is behind a firewall or NAT.

Yet it seems to matter.

All 8 comments

We've seen this a few times and every time it has been caused by a firewall somewhere. Can you verify that you don't have a firewall blocking access to this port? We're actively seeing many thousands of shares in use so we know its up! :)

Got the same issue as @pdaether.
Which port should I open for fixing the problem?

Update:
I reinstalled vagrant and made a new install from scratch. Now it works grate!

I've been having the same issue. It's due to port 8000 being blocked by the firewall in my case.

@mitchellh, could you say a little more about how firewalls conflict with vagrant share? I'm having this same issue, and I can't figure out how my firewall and/or my network's firewall might be interfering with vagrant. I tried sudo ufw allow 8000, but no luck so far.

Strangely, the vagrant page about HTTP sharing at https://www.vagrantup.com/blog/feature-preview-vagrant-1-5-share.html says:

Once the share is created, a relatively obscure URL is outputted. This URL will route directly to your Vagrant environment; it doesn't matter if you or accessing party is behind a firewall or NAT.

Yet it seems to matter.

It seems to work for me outside my company VPN but not otherwise. It has to be a port block issue somewhere either at the machine where the person needs to connect to or at the main firewall

@mitchellh
Interesting but it seems that my company is blocking the client proxy on 8001. Wondering if that can be changed somewhere...

screen shot 2014-10-14 at 4 38 06 pm

So this is official that vagrant WON'T share when 8000 and 8001 are blocked? I have same issue it seems. I reported it GH-7768

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hesco picture hesco  ยท  3Comments

tomhking picture tomhking  ยท  3Comments

cbednarski picture cbednarski  ยท  3Comments

mpontillo picture mpontillo  ยท  3Comments

dorinlazar picture dorinlazar  ยท  3Comments