omegaup / deploy

Deployment for omegaUp
2 stars 8 forks source link

Warning: Authentication failure. Retrying. #11

Closed mredigonda closed 6 years ago

mredigonda commented 6 years ago

Estoy tratando de installar el entorno de desarrollo, pero estoy teniendo algunos problemas. Uno de ellos, con una de mis computadoras, es que utilizar vagrant up comienza a procesar algo, que al llegar al 100% termina por congelar mi computadora. Pienso que puede deberse a un problema de hardware, en cuyo caso, sería genial especificar requerimientos mínimos en la Wiki para futuros contribuidores.

Por otro lado, decidí intentar en una computadora con hardware más capaz, y en este caso, a pesar de que no se congela, me surgen los siguientes mensajes:

==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 80 (guest) => 8080 (host) (adapter 1)
    default: 21680 (guest) => 21680 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: ubuntu
    default: SSH auth method: private key
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...

Luego:

Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

El mensaje de error es bastante claro, voy a seguir investigando, pero obviamente, sería genial tener todo esto documentado en la guía, o en alguna sección de troubleshooting.

Saludos.

EDIT:

Acabo de leer esta respuesta en stackoverflow sobre el tema. Luego de seguir los pasos en la primer respuesta (activar el GUI), obtuve que la máquina virtual se traba en la siguiente pantalla:

captura de pantalla de 2018-02-16 20 16 47

heduenas commented 6 years ago

@lhchavez debe de saber mejor, pero tal parece que es un problema con la imagen de la VM, porque en mi compu tengo almacenada la imagen desde el dia 10 de diciembre de 2018, haciendo una instalacion desde 0 se reutiliza esa imagen y si funciona. Si intento sin reutilizar esa imagen, no funciona.

Si puedieramos conseguir la imagen del 10 de diciembre y ponerle esa al Vagrantfile, deberia de funcionar.

heduenas commented 6 years ago

Encontre la imagen de esas fechas (https://cloud-images.ubuntu.com/releases/16.04/release-20171208/ubuntu-16.04-server-cloudimg-amd64-vagrant.box) pero sigue fallando aun con esa imagen.

heduenas commented 6 years ago

@lhchavez sabes como arreglar este problema?

AtharvaKhare commented 6 years ago

@heduenas This issue is caused due to improper username in Vagrantfile. I have sent a PR to fix it https://github.com/omegaup/deploy/pull/10 . You can confirm that the username is indeed culprit by running ssh -i ~/.vagrant.d/insecure_private_key -p 2222 vagrant@127.0.0.1 works, while vagrant ssh --debug tells us that it is trying to connect to ubuntu@127.0.0.1. @mredigonda To fix it, follow these steps:

  1. Run vagrant halt or vagrant suspend. Go to step 2 regardless if it works.
  2. Run vagrant destroy
  3. Edit Vagrant file to change config.username="vagrant" or remove the line entirely.
  4. Run vagrant up
lhchavez commented 6 years ago

This should have been fixed by #10

heduenas commented 6 years ago

Thanks for the fix @AtharvaKhare