0

My configuration:

  • ordinary PC computer
  • Debian 8 GNU/Linux 32bit as OS ( fresh, stock install w/o configuring any firewalls if they are configured they are done by installer )
  • latest vagrant installed from vagrant .deb package from vaagrant page
  • virtualbox installed from contrib repo of Debian ( method: as mentioned at: https://wiki.debian.org/VirtualBox#Debian_8_.22Jessie.22 )
  • rsync from repo ( as vagrant needs it and I had to install it after I noticed error )

  • network that has almost every imaginable port blocked

What I want to do

*creating box and installing stuff on it*
$ vagrant login
*logged in*
$ vagrant up
*box is up*
$ vagrant share
and here comes the problem

My problem

$ vagrant share
==> default: Detecting network information for machine...
    default: Local machine address: 127.0.0.1
    default:  
    default: Note: With the local address (127.0.0.1), Vagrant Share can only
    default: share any ports you have forwarded. Assign an IP or address to your
    default: machine to expose all TCP ports. Consult the documentation
    default: for your provider ('virtualbox') for more information.
    default:  
    default: Local HTTP port: 8080
    default: Local HTTPS port: disabled
    default: Port: 2222
    default: Port: 8080
==> default: Checking authentication and authorization...
==> default: Creating Vagrant Share session...
    default: Share will be at: rambunctious-goat-2041

Here it hangs for few minutes, so in the meantime I check what ports I have open in another console

$ nmap localhost

Starting Nmap 6.47 ( http://nmap.org ) at 2016-08-30 21:56 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00020s latency).
Other addresses for localhost (not scanned): 127.0.0.1
Not shown: 995 closed ports
PORT     STATE SERVICE
25/tcp   open  smtp
111/tcp  open  rpcbind
631/tcp  open  ipp
2222/tcp open  EtherNet/IP-1
8080/tcp open  http-proxy

Ok, 2222 and 8080 are open, ( they are closed before I run 'vagrant up' command)

And after few minutes vagrant finally prints error message and quits, so vagrant output looks this way:

$ vagrant share
==> default: Detecting network information for machine...
    default: Local machine address: 127.0.0.1
    default:  
    default: Note: With the local address (127.0.0.1), Vagrant Share can only
    default: share any ports you have forwarded. Assign an IP or address to your
    default: machine to expose all TCP ports. Consult the documentation
    default: for your provider ('virtualbox') for more information.
    default:  
    default: Local HTTP port: 8080
    default: Local HTTPS port: disabled
    default: Port: 2222
    default: Port: 8080
==> default: Checking authentication and authorization...
==> default: Creating Vagrant Share session...
    default: Share will be at: rambunctious-goat-2041
The sharing proxy exited with a non-zero exit status! This represents
an erroneous exit and likely a bug. Please report this issue.

Here are last lines of debug output of

vagrant share --debug

I decided to put here only those as they are most related to the final error message, and because whole log produced by --debug flag is so looooong.

(...  so many many many lines ommited ... )
==> default: Creating Vagrant Share session...
 INFO api: /api/v1/shares
DEBUG api: API payload: {"share":{"http_port":8080,"https_port":null,"ports":[2222,8080]}}
DEBUG api: Response: {"custom_domain":false,"expired":false,"has_private_key":false,"name":"wild-pronghorn-2195","http_port":8080,"https_port":null,"ssh_port":null,"ssh_username":null,"ports":[2222,8080],"expired_at":null,"created_at":"2016-08-30T18:17:28.755Z","private_key_password":true,"token":null,"use_key_once":true,"domain":"vagrantshare.com","full_domain":"wild-pronghorn-2195.vagrantshare.com","mux_insecure":false,"mux_client_addr":"register.vagrantshare.com:8001","mux_server_addr":"register.vagrantshare.com:8000"}
 INFO interface: detail: Share will be at: wild-pronghorn-2195
 INFO interface: detail:     default: Share will be at: wild-pronghorn-2195
    default: Share will be at: wild-pronghorn-2195
 INFO interface: Machine: share-name ["wild-pronghorn-2195", {:target=>:default}]
 INFO helper: Executing proxy: ["-share", "-name", "wild-pronghorn-2195", "-target", "127.0.0.1", "-server", "register.vagrantshare.com:8000", "-port", "8080", "-port", "2222", "-port", "8080"]
 INFO subprocess: Starting process: ["/opt/vagrant/embedded/gems/gems/vagrant-share-1.1.5/localbin/proxy_linux_386", "-share", "-name", "wild-pronghorn-2195", "-target", "127.0.0.1", "-server", "register.vagrantshare.com:8000", "-port", "8080", "-port", "2222", "-port", "8080"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: proxy:1472588546,log,[INFO] Restricting ports to: [8080 2222 8080]
proxy:1472588546,log,[DEBUG] proxy: Connecting to mux server at register.vagrantshare.com:8000
DEBUG helper: Proxy message: ["log", "[INFO] Restricting ports to: [8080 2222 8080]"]
DEBUG helper: Proxy message: ["log", "[DEBUG] proxy: Connecting to mux server at register.vagrantshare.com:8000"]
DEBUG subprocess: stdout: proxy:1472588694,log,[ERR] proxy: Failed to start sharing: Failed to connect to mux server: dial tcp 52.72.124.216:8000: connection timed out
DEBUG helper: Proxy message: ["log", "[ERR] proxy: Failed to start sharing: Failed to connect to mux server: dial tcp 52.72.124.216:8000: connection timed out"]
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31852
DEBUG subprocess: Exit status: 1
 INFO environment: Running hook: environment_unload
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: environment_unload #<Vagrant::Action::Builder:0x9a156cc>
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: /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.5/lib/vagrant-share/activate.rb:1401:in `block in execute'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/plugin/v2/command.rb:235:in `block in with_target_vms'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/plugin/v2/command.rb:229:in `each'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/plugin/v2/command.rb:229:in `with_target_vms'
/opt/vagrant/embedded/gems/gems/vagrant-share-1.1.5/lib/vagrant-share/activate.rb:1178:in `execute'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/cli.rb:42:in `execute'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:302:in `cli'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.5/bin/vagrant:174: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."]

Well, especially connections those lines looks suspicious

DEBUG helper: Proxy message: ["log", "[INFO] Restricting ports to: [8080 2222 8080]"]
DEBUG helper: Proxy message: ["log", "[DEBUG] proxy: Connecting to mux server at register.vagrantshare.com:8000"]
DEBUG subprocess: stdout: proxy:1472588694,log,[ERR] proxy: Failed to start sharing: Failed to connect to mux server: dial tcp 52.72.124.216:8000: connection timed out
DEBUG helper: Proxy message: ["log", "[ERR] proxy: Failed to start sharing: Failed to connect to mux server: dial tcp 52.72.124.216:8000: connection timed out"]
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31852
DEBUG subprocess: Exit status: 1

My question I googled that error message but what I found is unclear to me, as It only mentions that "firewall is blocking some ports". On the other hand I was informed that I should be able to perform successfull vargant share despite the firewall. Also Vagrant page ( https://www.hashicorp.com/blog/feature-preview-vagrant-1-5-share.html ) states:

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

I interpret that it means vagrant share is supposed to work in my case and firewall blocking ports should not be an issue. So Im puzzled what's going on.

To sum up: is it possible to perform 'vargant share' from behind firewall blocking "uncommon" ( almost evey possible that is not 80, 22, most 'basic' ports ) or it is not possible despite mentioned vargant page states otherwise?

1 Answer 1

0

You can use httptunnel to mask your traffic as a "common HTTP" traffic. See here: https://unix.stackexchange.com/questions/190490/how-to-use-ssh-over-http-or-https

I've seen three solutions:

1
  • Yea, I know that I probably can. Yet it does not answer my question - is vagrant supposed to work despite firewall ( as Vagrant page suggests ) or not? Aug 31, 2016 at 6:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .