gislab-npo / gislab

GIS.lab - total reduction of deployment and maintenance costs for complete free and open source geospatial infrastructure
http://gislab-npo.github.io/gislab/
GNU General Public License v3.0
40 stars 14 forks source link

GIS.lab Unit initialization fails #444

Closed landam closed 9 years ago

landam commented 9 years ago

After fresh GIS.lab Unit installation the initialization (1) fails:

fatal: [gislab-unit] => Missing become password
 __________________________________________
< TASK: Detect hardware model by processor >
 ------------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

FATAL: no hosts matched or all hosts have already failed -- aborting

 ____________
< PLAY RECAP >
 ------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

           to retry, use: --limit @/home/landa/gislab-unit.retry

gislab-unit                : ok=0    changed=0    unreachable=1    failed=0   

(1) https://github.com/imincik/gis-lab/wiki/GIS.lab-Unit#gislab-unit-initialization

imincik commented 9 years ago

Please try to log in to that machine using 'ssh' client and SSH key you use for Ansible. I guess that it fails on 'known_hosts' keys problem.

landam commented 9 years ago

ssh ubuntu@mygislab -i ~/.ssh/mykey works, the ansible playbook still fails.

imincik commented 9 years ago

OK, try to run ansible-playbook with more verbose mode "-vv" and paste output here.

landam commented 9 years ago

The -vv output gives just:

<147.32.131.60> REMOTE_MODULE setup
fatal: [gislab-unit] => Missing become password
<147.32.131.60> ESTABLISH CONNECTION FOR USER: ubuntu
<147.32.131.60> REMOTE_MODULE setup
<147.32.131.60> EXEC ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/landa/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o IdentityFile="/home/landa/.ssh/key" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 x /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1444725580.65-87768967039795 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1444725580.65-87768967039795 && echo $HOME/.ansible/tmp/ansible-tmp-1444725580.65-87768967039795'
<147.32.131.60> PUT /tmp/tmpiFJj2Q TO /home/ubuntu/.ansible/tmp/ansible-tmp-1444725580.65-87768967039795/setup
<147.32.131.60> EXEC ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/landa/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o IdentityFile="/home/landa/.ssh/key" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 x /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=achmstpevudcnkmcyjtkufphrzyrjsaf] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-achmstpevudcnkmcyjtkufphrzyrjsaf; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ubuntu/.ansible/tmp/ansible-tmp-1444725580.65-87768967039795/setup; rm -rf /home/ubuntu/.ansible/tmp/ansible-tmp-1444725580.65-87768967039795/ >/dev/null 2>&1'"'"''
fatal: [gislab-unit] => Missing become password
<147.32.131.60> ESTABLISH CONNECTION FOR USER: ubuntu
<147.32.131.60> REMOTE_MODULE setup
<147.32.131.60> EXEC ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/landa/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o IdentityFile="/home/landa/.ssh/id_rsa_gislab" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 147.32.131.60 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1444725580.65-87768967039795 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1444725580.65-87768967039795 && echo $HOME/.ansible/tmp/ansible-tmp-1444725580.65-87768967039795'
<147.32.131.60> PUT /tmp/tmpiFJj2Q TO /home/ubuntu/.ansible/tmp/ansible-tmp-1444725580.65-87768967039795/setup
<147.32.131.60> EXEC ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/landa/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o IdentityFile="/home/landa/.ssh/id_rsa_gislab" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 147.32.131.60 /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=achmstpevudcnkmcyjtkufphrzyrjsaf] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-achmstpevudcnkmcyjtkufphrzyrjsaf; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ubuntu/.ansible/tmp/ansible-tmp-1444725580.65-87768967039795/setup; rm -rf /home/ubuntu/.ansible/tmp/ansible-tmp-1444725580.65-87768967039795/ >/dev/null 2>&1'"'"''
fatal: [gislab-unit] => Missing become password
landam commented 9 years ago

On server it's seems that login somehow hangs:

ubuntu@GisLab:~$ w
 10:42:15 up  1:10,  6 users,  load average: 0.00, 0.00, 0.00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
ubuntu   pts/0    x.fsv.cvut 10:38    4:03   0.00s  0.00s /bin/sh -c sudo -k && sudo -H -S -p "[sudo via ansible, key=zxjcsnpqgarepahzxqkupegkrqdicrxa] pa
ubuntu   pts/1    x.fsv.cvut 10:38    3:44   0.00s  0.00s /bin/sh -c sudo -k && sudo -H -S -p "[sudo via ansible, key=aliftpmawljtoolohezkxsoszwirrqgb] pa
ubuntu   pts/2    x.fsv.cvut 10:38    3:36   0.00s  0.00s /bin/sh -c sudo -k && sudo -H -S -p "[sudo via ansible, key=sywjukjhjryjcvdteffakjauhlsyibrh] pa
ubuntu   pts/3    x.fsv.cvut 10:39    2:35   0.00s  0.00s /bin/sh -c sudo -k && sudo -H -S -p "[sudo via ansible, key=achmstpevudcnkmcyjtkufphrzyrjsaf] pa
ubuntu   pts/4    x.fsv.cvut 10:40    1:59   0.00s  0.00s /bin/sh -c sudo -k && sudo -H -S -p "[sudo via ansible, key=cebktmwdvucggnihxzruybnopscvytkx] pa
ubuntu   pts/5    x.fsv.cvut 10:42    7.00s  0.23s  0.00s w
landam commented 9 years ago

Ansible version:

ansible 1.9.3
imincik commented 9 years ago

Please try to run 'ansible -vv -m setup' and paste output here. See 'man ansible' how for other needed options.

landam commented 9 years ago

ansible --inventory=/path/to/gislab-unit.inventory --private-key=path/to/mykey providers/gislab-unit/gislab-unit.yml -m setup -vv

No hosts matched
landam commented 9 years ago

I am trying fresh installation again from scratch (installing ubuntu from usb flash disc), unfortunately it still fails

git pull
ansible-playbook ... providers/gislab-unit/gislab-unit.yml

fatal: [gislab-unit] => Missing become password

?

mpastor commented 9 years ago

You must regenerate installation ISO image.

landam commented 9 years ago

Thanks, now it works