sbgrid / data-capture-module

5 stars 4 forks source link

Vagrant port conflict with 8080 (Glassfish) #8

Closed pdurbin closed 8 years ago

pdurbin commented 8 years ago

The typical Dataverse developer will have Glassfish running on port 8080 locally so vagrant up won't "just work":

murphy:data-capture-module pdurbin$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'geerlingguy/centos6'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: data-capture-module_default_1478539051355_11284
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 8080 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. You could
try 'vagrant reload' (equivalent of running a halt followed by an up)
so vagrant can attempt to auto-correct this upon booting. Be warned
that any unsaved work might be lost.
murphy:data-capture-module pdurbin$ 

I'm not sure what a better port would be. Maybe 8888 or something.

pdurbin commented 8 years ago

I pushed 630ca0d to https://github.com/pdurbin/data-capture-module/tree/8-port-conflict

I'm getting an error that says "Could not determine remote revision for HEAD":

TASK [dcm : git-install] *******************************************************
ok: [default]

TASK [dcm : ssh-git: github host key fingerprint] ******************************
changed: [default]

TASK [dcm : source directory existance] ****************************************
ok: [default]

TASK [dcm : git, webupdate] ****************************************************
fatal: [default]: FAILED! => {"changed": false, "failed": true, "msg": "Could not determine remote revision for HEAD"}

RUNNING HANDLER [dcm : sshd-restart] *******************************************
    to retry, use: --limit @ansible/dcm.retry

PLAY RECAP *********************************************************************
default                    : ok=33   changed=22   unreachable=0    failed=1   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
(ansible) murphy:data-capture-module pdurbin$ 
pdurbin commented 8 years ago

I found where it says "webupdate": https://github.com/sbgrid/data-capture-module/blob/7b188127a2f0d221f2e528f07c4d2b0ab2e4693a/ansible/roles/dcm/tasks/code_checkout.yml#L14

Maybe merging #9 will help?

pdurbin commented 8 years ago

I merged #9 and the DCM is up now. Closing.