Publicado el Dejar un comentario

Vagrant 1.8.5: “default: Warning: Authentication failure. Retrying…”

Al intentar ejecutar un máquina virtual con Vagrant (vagrant up), mandaba los siguientes mensajes:

==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
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.

Levantaba la máquina virtual pero arrojaba errores al querer entrar a ella a través de ssh (vagrant ssh). No podía acceder a la máquina virtual.

La versión 1.8.5 de vagrant trae este bug. Para solucionarlo es necesario acceder a la máquina virtual a través de VirtualBox y cambiar los permisos del archivo /home/vagrant/.ssh/authorized_keys ejecutando el siguiente comando:

chmod 0600 /home/vagrant/.ssh/authorized_keys

Una vez hecho esto recargamos la máquina virtual (vagrant reload) y la máquina virtual debe arrancar sin ningún problema y ya podremos acceder a ella a través del ssh (vagrant ssh).

¡Saludos!

Publicado el Dejar un comentario

Obtener año, mes o día de un campo fecha en Oracle con EXTRACT.

A veces es necesario obtener sólo una parte de una fecha de un campo tipo datetime en sentencias SQL en Oracle. En un post pasado se explicó como obtener sólo el año, mes o día con la función to_char(). Ahora vamos a ver cómo obtener los mismos datos pero con la función extract().

En el ejemplo siguiente vamos a ver como obtener el día, mes o año de la fecha actual de la base de datos oracle:

-- Obtiene el día 
SELECT EXTRACT(DAY FROM sysdate) FROM dual;

--Obtiene el mes
SELECT EXTRACT(MONTH FROM sysdate) FROM dual;

--Obtiene el año 
SELECT EXTRACT(YEAR FROM sysdate) FROM dual;

A diferencia de la función to_char() que regresa un tipo caracter o alfanumérico, la función extract() regresa el resultado de tipo numérico.

La función extract() también puede extraer la hora, minuto y segundo de un dato tipo datetime:

-- Obtiene la hora 
SELECT EXTRACT(HOUR FROM systimestamp) FROM dual;

--Obtiene el minuto
SELECT EXTRACT(MINUTE FROM systimestamp) FROM dual;

--Obtiene el segundo 
SELECT EXTRACT(SECOND FROM systimestamp) FROM dual;

¡Espero y les sea útil!

 

Publicado el Dejar un comentario

Ipad Mini no enciende.

Después de usar la ipad mini y dejarla de usar por un tiempo corto, la ipad no quería volver a encender al oprimir el botón de inicio. Tampoco respondía al apagado-encendido  oprimiendo el botón de encendido/apagado o activación/reposo, simplemente no respondía, seguía sin encender.

Una de las causas de que no encienda, puede ser que se haya agotado totalmente la batería, si este es tu caso, simplemente conecte la ipad a al corriente y espera unos minutos a que el icono o dibujo de carga aparezca en la pantalla y enciéndala.

Pero no era este el caso, en mi caso recién había cargado la batería de la ipad, así que no quedó mas remedio que forzar el reinicio del dispositivo.

Para forzar el reinicio de la ipad mini hay que mantener oprimidos por 10 segundos o más los botones encendido/apagado o activación/reposo y el botón inicio, hasta que aparezca el logo de apple en la pantalla. Esto indicará que la ipad mini se a reiniciado correctamente y ha encendido de nuevo. Este modo no borra nada de los datos que ya teníamos.

ipad_mini_3-buttons_connectors

Si aún con este último método sigue sin encender, llévala la un sitio autorizado apple para que la revisen.

¡Espero y este consejo les sea útil!