2.2.4
Mac OS 10.13.6
Debian Jessie
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "demo" do |web|
web.vm.box = "debian/contrib-jessie64"
web.vm.network :private_network, ip: "192.168.100.100"
web.vm.synced_folder ".", "/var/www", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp'], linux__nfs_options: ['rw','no_subtree_check','all_squash','async']
web.vm.provision :shell, :path => "install.sh"
web.vm.provider "virtualbox" do |v|
v.memory = 4096
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
end
end
I should have been able to access the Vagrant VM via Ngrok
The Share Session was not started fully
vagrant upvagrant share --http 80Vagrant Share now defaults to using the `ngrok` driver.
The `classic` driver has been deprecated.
For more information about the `ngrok` driver, please
refer to the documentation:
https://www.vagrantup.com/docs/share/
==> demo: Detecting network information for machine...
demo: Local machine address: 127.0.0.1
demo:
demo: Note: With the local address (127.0.0.1), Vagrant Share can only
demo: share any ports you have forwarded. Assign an IP or address to your
demo: machine to expose all TCP ports. Consult the documentation
demo: for your provider ('virtualbox') for more information.
demo:
demo: Local HTTP port: 80
demo: Local HTTPS port: disabled
demo: Port: 2222
==> demo: Creating Vagrant Share session...
Hi there,
Thank you for opening an issue. However, there is not enough information here to reproduce or provide a recommendation. When you first open an issue, a template is pre-filled in the box. That template provides instructions for getting your host and guest information, the version of Vagrant, and the debug output. Without that information, it is very challenging for us to assist you.
Please supply that information either by updating this ticket or by closing this ticket and opening a new one. Thank you!
Issue updated.
@paul-gene - Do you have the full debug log of running vagrant share --http 80?
I have the very same problem, but I have an extra question. When there's a local port exposed by Vagrant (through :forwarded_port), why doesn't Vagrant use it? It seems it always defaults to 80, even if a port was specifically forwarded through Vagrantfile.
On topic, by looking at the debug logs, I can see ngrok outputting an URL which does work, but Vagrant never outputs it as it seems some errors follow, but are not detrimental to the share working at all. Here are my logs on this, if it helps (I'm forcing the correct port as per the above paragraph): https://pastebin.com/raw/FwNmizju
I emphasize the ngrok URL does work, it's just never output by vagrant share.
Thanks and apologies for hijacking the issue.
@briancain ~how can I get a debug log when I run the command?~ https://pastebin.com/RBFbyg2C here you go
I can see the Ngrok URL in the debug too, but when I visit it, I get the message:
Failed to complete tunnel connection
The connection to http://08f789a1.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:80.Make sure that a web service is running on localhost:80 and that it is a valid address.
The error encountered was: dial tcp [::1]:80: connect: connection refused
How do I run vagrant share pointing towards my vhost I have setup for the Vagrant Box?
@paul-gene - hmmm...is this config file empty at all? Or does it exist?
/Users/paulcanning/.ngrok2/ngrok.yml
from...
DEBUG subprocess: stdout: {"err":"\u003cnil\u003e","lvl":"info","msg":"open config file","path":"/Users/paulcanning/.ngrok2/ngrok.yml","t":"2019-04-26T10:48:07.115148+01:00"}
@briancain it exists, but simply has an auth token in it
To add; when debugging, the ngrok URL is visible in the output. If I enter the URL in my phone, it manages to "load" the URL, but ends up redirecting to the vhost domain
eg
VHost = mydomain.test
Ngrok = 123456.ngrok.io
Enter 123456.ngrok.io into phone browser, blank page loads slowly then ends up on mydomain.test
Thanks for the additional information! I'll put it in our next milestone to be worked on for the next release. :heart:
Hi. I confirm this bug.
Vagrant version: Vagrant 2.2.5
ngrok version 2.3.30
I was following the Vagrant Getting Started tutorial and it took me a while to find the ngrok URL buried in the debug log:
{"addr":"http://localhost:4567","lvl":"info","msg":"started tunnel","name":"http","obj":"tunnels","t":"2019-07-13T16:00:20.9730045+02:00","url":"http://44852af9.ngrok.io"}
It is not shown however in the normal output, leading to believe that the share is not working:
vagrant share
Vagrant Share now defaults to using thengrokdriver.
Theclassicdriver has been deprecated.For more information about the
ngrokdriver, please
refer to the documentation:https://www.vagrantup.com/docs/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: 4567
default: Local HTTPS port: disabled
default: Port: 2222
default: Port: 4567
==> default: Creating Vagrant Share session...
I have the same issue just as @oeramirez described. I'm on Windows 10 with vagrant 2.2.5.
+1 on this bug with Vagrant version 2.2.4 and ngrok version 2.3.34 on MacOS 10.14.6
+1 on this bug with Vagrant version 2.2.5 and ngrok version 2.3.34 on MacOS 10.14.6
However you can get ngrok URL by running vagrant share --debug and searching for it in recent lines of output.
Another +1 on this bug with Vagrant version 2.2.5, and ngrok version 2.3.34 on Ubuntu 18.04. As per @fqr297's suggestion, I was able to find the ngrok URL in debug mode.
+1 on this as well; same as above
+1 on this as well; same as above
I am seeing the same issue here with Vagrant 2.2.6 on Fedora 30 with a newly created ngrok account. As for other reporters, I can get the ngrok URL by using --debug but it is not shown otherwise.
Looking at https://github.com/Chassis/Chassis/issues/644, this happens to be caused by a bug/change in ngrok itself, which was introduced in versions after 2.2.8. I can confirm that using ngrok v2.2.8 (using the link in the abovementioned Chassis issue) allows the ngrok URL to be displayed with vagrant share
Maybe a mention in the Vagrant share docs could be useful too, just as they did for Chassis?
Hmmm some fix? I upgraded to the latest vagran and i'ts only work with --debug
I have the same issue with Vagrant version 2.2.7 and ngrok version 2.3.35. At least, the symptoms are the same. In my case, my ngrok dashboard status screen shows that I have a tunnel, but when I try actually loading the URL shown there, the ngrok service tells me that "Tunnel TUNNEL_ID.ngrok.io not found." On the Vagrant side, Vagrant's output hangs at "==> default: Creating Vagrant Share session..." as it does for the others in this thread.
For what it's worth, you can see more of ngrok's data by loading http://localhost:4040 after starting the vagrant share attempt, even if Vagrant fails to complete the connection.
I am having the same issue with Vagrant 2.2.7, ngrok version 2.3.35 and macOS 10.15.3, any fix yet!
This integration seems to be deprecated, you can now just use ngrok directly. ngrok http 197.168.10.10:8000 where the IP and port are those of you vagrant box, you can also use any local domains you have mapped in your hosts file. Amazing system!
I'm also having the issue on Vagrant 2.2.7 and macOS 10.15.4
This has been fixed in vagrant-share 1.1.10
Cheers!
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.
Most helpful comment
To add; when debugging, the ngrok URL is visible in the output. If I enter the URL in my phone, it manages to "load" the URL, but ends up redirecting to the vhost domain
eg
VHost = mydomain.test
Ngrok = 123456.ngrok.io
Enter 123456.ngrok.io into phone browser, blank page loads slowly then ends up on mydomain.test