Skip to content

Conversation

@johnmccabe
Copy link
Contributor

  • brooklyn accessible on the local node (desktop/laptop where you have run vagrant up) via mapped 8081 port at http://127.0.0.1:8081 which matches the manual install url (simplifies docs)
  • can still access the byon nodes on 10.10.10.x and avoids having to worry about subnet clashes for brooklyn itself

- brooklyn accessible via mapped 8081 port at http://127.0.0.1:8081 which matches the manual install url (simplifies docs)
- can still access the byon nodes and avoids having to worry about subnet clashes for brooklyn itself
@johnmccabe
Copy link
Contributor Author

johnmccabe commented Apr 6, 2016

fyi @neykov this is related to your comment about the web console url not being correct for Vagrant.

ip: 10.10.10.100
forwarded_ports:
- guest: 8081
host: 8081
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If someone has another process listening on port 8081, then presumably vagrant up brooklyn will fail with a nice message? Is that ok to assume they won't have anything else running there? I think yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's a process running in userspace then it will override the mapped port which will become accessible if the overriding process is halted.
Give me a second and I'll check the output from :auto_correct

- defaults to true in servers.yaml
- doesn't appear to be too reliable, currently fails for me and throws the following warning before attempting to install, rather than fail silently with the locally bound port overriding the forwarded brooklyn port:
```
==> brooklyn: Clearing any previously set forwarded ports...
Vagrant cannot forward the specified ports on this VM, since they
would collide with some other application that is already listening
on these ports. The forwarded port to 8081 is already in use
on the host machine.

To fix this, modify your current project's Vagrantfile to use another
port. Example, where '1234' would be replaced by a unique host port:

  config.vm.network :forwarded_port, guest: 80, host: 1234

Sometimes, Vagrant will attempt to auto-correct this for you. In this
case, Vagrant was unable to. This is usually because the guest machine
is in a state which doesn't allow modifying port forwarding.
```
- Updated the Vagrantfile to point the user at `servers.yaml` when they search for the suggested line in the warning above.
@aledsage
Copy link
Contributor

aledsage commented Apr 6, 2016

LGTM. Works for me when nothing else is using port 8081.
When there is something else using it, then I get the error message that you refer to in your second commit. I like your comment and instructions in the Vagrantfile - very helpful.

Merging, and will cherry-pick into 0.9.0 branch.

@asfgit asfgit merged commit c9c688c into apache:master Apr 6, 2016
asfgit pushed a commit that referenced this pull request Apr 6, 2016
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

Successfully merging this pull request may close these issues.

3 participants