Closed PeterCielos closed 6 years ago
I don't think the 'become/sudo' stuff is the cause of your problems, since those are ostensibly just warnings (but we will fix them). What's the output of vagrant ssh-config db
?
9muir,
Thank you for replying.
Here is the output for your requested command:
ubuntu@ubuntu:~/CommunityCellularManager/client$ sudo vagrant ssh-config db The machine with the name 'db' was not found configured for this Vagrant environment.
The issues I'm having are the same anyone would have if they simply followed the instructions per https://github.com/facebookincubator/CommunityCellularManager/tree/master/cloud
What's the command you ran to try to provision the database VM? vagrant up db
(or vagrant provision db
if the VM is already created) should work if just run from the cloud
directory. It looks like when you ran vagrant ssh-config db
you were in the client directory (you don't need to use sudo
). What does vagrant status
report in the cloud directory?
9muir,
Your correct I issued the command from the "client" directory mistakenly.
Thank you for pointing that out.
But as you can see below, sometimes you HAVE to issue the "sudo" command BEFORE vagrant because not all vagrant commands work alone without "sudo".
Per your instructions, I've tried the following commands from the "Cloud" directory:
ubuntu@ubuntu:~/CommunityCellularManager/cloud$ sudo vagrant ssh-config db
The provider for this Vagrant-managed machine is reporting that it
is not yet ready for SSH. Depending on your provider this can carry
different meanings. Make sure your machine is created and running and
try again. Additionally, check the output of vagrant status
to verify
that the machine is in the state that you expect. If you continue to
get this error message, please view the documentation for the provider
you're using.
ubuntu@ubuntu:~/CommunityCellularManager/cloud$ vagrant status Vagrant failed to initialize at a very early stage:
The home directory you specified is not accessible. The home directory that Vagrant uses must be both readable and writable.
You specified: /home/ubuntu/.vagrant.d
ubuntu@ubuntu:~/CommunityCellularManager/cloud$ sudo vagrant status Current machine states:
web aborted (virtualbox) db aborted (virtualbox) rmq not created (virtualbox) cert not created (virtualbox) smpp not created (virtualbox) vpn not created (virtualbox)
This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run vagrant status NAME
.
ubuntu@ubuntu:~/CommunityCellularManager/cloud$ sudo vagrant up db
Bringing machine 'db' up with 'virtualbox' provider...
==> db: Checking if box 'ubuntu/trusty64' is up to date...
==> db: Clearing any previously set forwarded ports...
==> db: Clearing any previously set network interfaces...
==> db: Preparing network interfaces based on configuration...
db: Adapter 1: nat
db: Adapter 2: hostonly
==> db: Forwarding ports...
db: 22 (guest) => 2222 (host) (adapter 1)
==> db: Running 'pre-boot' VM customizations...
==> db: Booting VM...
==> db: Waiting for machine to boot. This may take a few minutes...
db: SSH address: 127.0.0.1:2222
db: SSH username: vagrant
db: SSH auth method: private key
db: Warning: Remote connection disconnect. Retrying...
db: Warning: Remote connection disconnect. Retrying...
==> db: Machine booted and ready!
[db] GuestAdditions 4.3.36 running --- OK.
==> db: Checking for guest additions in VM...
==> db: Setting hostname...
==> db: Configuring and enabling network interfaces...
==> db: Mounting shared folders...
db: /vagrant => /home/ubuntu/CommunityCellularManager/cloud
==> db: Machine already provisioned. Run vagrant provision
or use the --provision
==> db: flag to force provisioning. Provisioners marked to run always will still run.
ubuntu@ubuntu:~/CommunityCellularManager/cloud$ sudo vagrant up db --provision
Bringing machine 'db' up with 'virtualbox' provider... ==> db: Checking if box 'ubuntu/trusty64' is up to date... ==> db: Running provisioner: ansible... db: Running ansible-playbook... PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --connection=ssh --timeout=30 --limit="db" --inventory-file=/home/ubuntu/CommunityCellularManager/cloud/.vagrant/provisioners/ansible/inventory -v ansible/postgres.dev.yml Using /home/ubuntu/CommunityCellularManager/cloud/ansible.cfg as config file [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
PLAY [db] **
TASK [Gathering Facts] ***** fatal: [db]: UNREACHABLE! => {"changed": false, "msg": "SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh", "unreachable": true} to retry, use: --limit @/home/ubuntu/CommunityCellularManager/cloud/ansible/postgres.dev.retry
PLAY RECAP ***** db : ok=0 changed=0 unreachable=1 failed=0
Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again.
ubuntu@ubuntu:~/CommunityCellularManager/cloud$ sudo vagrant ssh-config db
Host db HostName 127.0.0.1 User vagrant Port 2222 UserKnownHostsFile /dev/null StrictHostKeyChecking no PasswordAuthentication no IdentityFile /home/ubuntu/CommunityCellularManager/cloud/.vagrant/machines/db/virtualbox/private_key IdentitiesOnly yes LogLevel FATAL
ubuntu@ubuntu:~/CommunityCellularManager/cloud$
One thing to try: you don't usually have to download and install the base OS manually when using Vagrant, so something funky may be happening there.
Sorry, that comment was meant for your other issue. GitHub not a great mobile UI
Running vagrant as root is going to cause a lot of weird issues. SSH keys are going to be all over the place and it shouldn't be necessary to do that.
faced same issue on going through error logs I tried changing in postgres.dev.yml: sudo: yes to become : true , and sudo_user with become_user and this fixed my issue.
Submit a patch!
On Wed, Nov 22, 2017 at 11:38 PM, Sagar Sharma notifications@github.com wrote:
faced same issue on going through error logs I tried changing in postgres.dev.yml: sudo: yes to become : true , and sudo_user with become_user and this fixed my issue.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/facebookincubator/CommunityCellularManager/issues/20#issuecomment-346547563, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_rn6yK4VTxQEl7VYiPDejsUv8_7fPyks5s5SDdgaJpZM4LTb-F .
Hello,
Following the instructions per Facebook's CommunityCellularManager for CLOUD, I am getting errors
I did a git checkout of the following Facebook Community Cellular Manager:
buntu@ubuntu:~/CommunityCellularManager$ sudo git log -n1 commit 9e5415db9a3692f9b1691a4a0c95b7bd43c29fff Author: Steve Muir muir@fb.com Date: Mon Dec 19 11:31:50 2016 -0800
Here is what I'm running:
lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty
I have the following installed:
ubuntu@ubuntu:~/CommunityCellularManager/cloud$ pip3 --version pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
ubuntu@ubuntu:~/CommunityCellularManager/cloud$ pip --version pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
ubuntu@ubuntu:~/CommunityCellularManager/cloud$ vagrant --version Vagrant 1.8.7
VBoxManage --version 4.3.36_Ubuntur105129
ansible --version ansible 2.3.0
Here is the error message I receive:
**DEBUG ssh: Checking key permissions: /home/ubuntu/CommunityCellularManager/cloud/.vagrant/machines/db/virtualbox/private_key INFO interface: detail: Running ansible-playbook... INFO interface: detail: db: Running ansible-playbook... db: Running ansible-playbook... INFO interface: detail: PYTHONUNBUFFERED=1 ANSIBLE_NOCOLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --connection=ssh --timeout=30 --limit="db" --inventory-file=/home/ubuntu/CommunityCellularManager/cloud/.vagrant/provisioners/ansible/inventory -v ansible/postgres.dev.yml PYTHONUNBUFFERED=1 ANSIBLE_NOCOLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --connection=ssh --timeout=30 --limit="db" --inventory-file=/home/ubuntu/CommunityCellularManager/cloud/.vagrant/provisioners/ansible/inventory -v ansible/postgres.dev.yml INFO subprocess: Starting process: ["/usr/local/bin/ansible-playbook", "--connection=ssh", "--timeout=30", "--limit=db", "--inventory-file=/home/ubuntu/CommunityCellularManager/cloud/.vagrant/provisioners/ansible/inventory", "-v", "ansible/postgres.dev.yml"] INFO subprocess: Command not in installer, restoring original environment... DEBUG subprocess: Selecting on IO DEBUG subprocess: stdout: Using /home/ubuntu/CommunityCellularManager/cloud/ansible.cfg as config file INFO interface: detail: Using /home/ubuntu/CommunityCellularManager/cloud/ansible.cfg as config file
Using /home/ubuntu/CommunityCellularManager/cloud/ansible.cfg as config file DEBUG subprocess: stderr: [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. INFO interface: detail: [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. DEBUG subprocess: stdout: PLAY [db] ** INFO interface: detail: PLAY [db] **
PLAY [db] ** DEBUG subprocess: stdout: TASK [Gathering Facts] INFO interface: detail: TASK [Gathering Facts]
TASK [Gathering Facts] ***** DEBUG subprocess: stdout: fatal: [db]: UNREACHABLE! => {"changed": false, "msg": "SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh", "unreachable": true} INFO interface: detail: fatal: [db]: UNREACHABLE! => {"changed": false, "msg": "SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh", "unreachable": true}
fatal: [db]: UNREACHABLE! => {"changed": false, "msg": "SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh", "unreachable": true} DEBUG subprocess: stdout: to retry, use: --limit @/home/ubuntu/CommunityCellularManager/cloud/ansible/postgres.dev.retry
PLAY RECAP ***** db : ok=0 changed=0 unreachable=1 failed=0
INFO interface: detail: to retry, use: --limit @/home/ubuntu/CommunityCellularManager/cloud/ansible/postgres.dev.retry
PLAY RECAP ***** db : ok=0 changed=0 unreachable=1 failed=0
PLAY RECAP ***** db : ok=0 changed=0 unreachable=1 failed=0
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31999 DEBUG subprocess: Exit status: 4 ERROR warden: Error occurred: Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again.**
I've tried to add become/become_user to the Ansible.cfg file all with the same error.
Any assistance would be greatly appreciated!