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

SSH Error #9

Open
marceloandriolli opened this issue Jul 25, 2017 · 5 comments
Open

SSH Error #9

marceloandriolli opened this issue Jul 25, 2017 · 5 comments

Comments

@marceloandriolli
Copy link

I did all step on readme but when ansible playbook i got this message:

PLAY [all] **********************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************
fatal: [bika]: UNREACHABLE! => {"changed": false, "msg": "SSH Error: data could not be sent to remote host "192.168.33.10". Make sure this host can be reached over ssh", "unreachable": true}
to retry, use: --limit @/Users/marcelorsa/Projects/bika/bika.ansible/bika.retry

PLAY RECAP **********************************************************************************************************************************************
bika : ok=0 changed=0 unreachable=1 failed=0

@ramonski
Copy link
Contributor

Hi @marceloandriolli, seems like your Vagrant box is not running.
Did you do vagrant up before? Can you do vagrant ssh?
https://www.vagrantup.com/intro/getting-started/up.html

@marceloandriolli
Copy link
Author

Hi @ramonski!
Thanks for your reply! I did vagrant up and vagrant ssh, its seemingly was successful! I Will copy the output of this command and put here.

@marceloandriolli
Copy link
Author

marceloandriolli commented Jul 25, 2017

vagrant up output:

Bringing machine 'app' up with 'virtualbox' provider...
==> app: Checking if box 'ubuntu/xenial64' is up to date...
==> app: A newer version of the box 'ubuntu/xenial64' is available! You currently
==> app: have version '20170618.0.0'. The latest is version '20170724.0.0'. Run
==> app: `vagrant box update` to update.
==> app: Resuming suspended VM...
==> app: Booting VM...
==> app: Waiting for machine to boot. This may take a few minutes...
    app: SSH address: 127.0.0.1:2200
    app: SSH username: ubuntu
    app: SSH auth method: password
==> app: Machine booted and ready!
==> app: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> app: flag to force provisioning. Provisioners marked to run always will still run.

vagrant ssh output:

Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-79-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.


Last login: Tue Jul 25 11:25:42 2017 from 10.0.2.2
ubuntu@bika:~$ ping www.google.com.br
PING www.google.com.br (216.58.202.35) 56(84) bytes of data.
64 bytes from gru09s18-in-f3.1e100.net (216.58.202.35): icmp_seq=1 ttl=63 time=34.4 ms
64 bytes from gru09s18-in-f3.1e100.net (216.58.202.35): icmp_seq=2 ttl=63 time=38.7 ms
64 bytes from gru09s18-in-f3.1e100.net (216.58.202.35): icmp_seq=3 ttl=63 time=37.5 ms

ansible-playbook -i vagrant_hosts.cfg vagrant.yml output

 [WARNING]: Found both group and host with same name: bika


PLAY [bika] *********************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************
fatal: [bika]: UNREACHABLE! => {"changed": false, "msg": "SSH Error: data could not be sent to remote host \"192.168.33.10\". Make sure this host can be reached over ssh", "unreachable": true}
	to retry, use: --limit @/Users/marcelorsa/Projects/bika/bika.ansible/vagrant.retry

PLAY RECAP **********************************************************************************************************************************************
bika                       : ok=0    changed=0    unreachable=1    failed=0   

@ramonski
Copy link
Contributor

ramonski commented Aug 8, 2017

Thanks @marceloandriolli.

Can you access the machine via SSH?

Please also check this:

There must be a .vagrant folder with the following contents in your Ansible directory:

.vagrant
└── machines
    └── app
        └── virtualbox
            ├── action_provision
            ├── action_set_name
            ├── creator_uid
            ├── id
            ├── index_uuid
            ├── private_key *)
            └── synced_folders

3 directories, 7 files

*) This key must match your entry in the hosts.cfg file, e.g.:

[develop]
vagrant ansible_ssh_host=192.168.33.150 ansible_ssh_user=vagrant ansible_ssh_private_key_file=.vagrant/machines/app/virtualbox/private_key

@ramonski
Copy link
Contributor

ramonski commented Aug 8, 2017

Please also note, that this repository has moved from bikalabs/bika.ansible to bikalims/bika.ansible

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

No branches or pull requests

2 participants