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

Hot-reload with virtualbox Port Forwarding issue on Virtual Machine #92

Closed
julienkosinski opened this issue Aug 7, 2017 · 7 comments
Closed
Assignees
Labels
Projects

Comments

@julienkosinski
Copy link

julienkosinski commented Aug 7, 2017

Hello,

The hot-reload system is based on watcher which seems to have a bug with Virtualbox synced folders...
radovskyb/watcher#26

Specifically with aah with hot-reload activated, not only events does not work on the folder on the host but also with this configuration it avoids the server from handling requests on the forwarded port 8080.

If anyone is able to help me on this it would be very nice! :)
Thank you very much!

@jeevatkm
Copy link
Member

jeevatkm commented Aug 7, 2017

Looks like to I need to setup an environment for this to verify. Would you mind sharing your vagrant file?

@julienkosinski
Copy link
Author

julienkosinski commented Aug 7, 2017

No problem, thank you very much for your help! :)

https://dl.dropboxusercontent.com/s/jjb4z843virszf1/Vagrantfile

@jeevatkm
Copy link
Member

jeevatkm commented Aug 7, 2017

Thank you, I will have a look.

@jeevatkm
Copy link
Member

@julienkosinski I have verified using vagrant file. The steps I did and observation as follows:

  • Ubuntu VM successfully created, my host machine is Mac OS Sierra.
  • Your startup provision script has chmod -R o+rwx /home/ubuntu/go/, do not set +x source code files
  • First I have verified within VM, does aah work as expected? Yes, it is working as expected (hot-reload, etc) using curl within VM
  • Second I have verified file changes from host system. Yes, it is working as expected (hot-reload, etc) using curl within VM (see timezone is different here, still it worked. host: PST, VM: UTC)
  • Then I have changed VM timezone same as host system i.e. PDT. Then performed first and second steps again. Working as expected.
  • For me port forwarding didn't work, that's why I'm using curl to verified application is functioning.
    • Then I wanted to see the action in the browser. So I did SSH tunneling (vagrant ssh -- -L 8080:localhost:8080) to do port forward.
    • Now I'm able to access the application via browser. App is running within guest VM listening on port 8080.

I hope it helps and gives an idea to handle your VM issues. Closing this ticket.

@jeevatkm jeevatkm self-assigned this Aug 11, 2017
@jeevatkm jeevatkm reopened this Aug 12, 2017
@jeevatkm jeevatkm added bug and removed support labels Aug 12, 2017
@jeevatkm jeevatkm added this to the v0.8 Milestone milestone Aug 12, 2017
jeevatkm added a commit to go-aah/tools that referenced this issue Aug 12, 2017
@jeevatkm
Copy link
Member

jeevatkm commented Aug 12, 2017

Found the problem of port forwarding issue while using hot-reload server within Virtual Machine.

Issue is hot-reload server binds to localhost:8080 so virtual box or vagrant configuration do not how to forward the request for NAT bridge with IP address. As I mentioned in previous comment. SSH tunnel worked, since it was not using NAT bridge.

Solution is to bind hot-reload server to :8080. It works, it listens all IP address in the VM.

I have fixed it, please have a look.

PS: The issue I mentioned about in the gitter - 502 error in Virtual machine usage scenario. I have to investigate it.

@jeevatkm
Copy link
Member

Fixed it. Coming in v0.8 release.

@julienkosinski you can try dev version before the release and share your feedback.

@jeevatkm jeevatkm changed the title Hot-reload with virtualbox synced folder Hot-reload with virtualbox Port Forwarding issue on Virtual Machine Aug 12, 2017
@jeevatkm jeevatkm added this to v0.8 - In Progress in aah Roadmap Aug 12, 2017
@jeevatkm jeevatkm moved this from v0.8 - In Progress to v0.8 - Completed in aah Roadmap Aug 12, 2017
@julienkosinski
Copy link
Author

@jeevatkm Working great! Thank you very much! :D

@jeevatkm jeevatkm moved this from v0.8 - Completed to Released to Audience in aah Roadmap Sep 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
aah Roadmap
  
Released to Audience
Development

No branches or pull requests

2 participants