Problemas de configuración Instalación Testing Docker(SOLUCIONADO)

Hola buenas tardes, tratando de realizar la instalación con Docker en modo testing

Edito el archivo /usr/local/proyectos/sanaviron_quilmes/testing/instalacion.env

Agrego la dirección de pilagá y guaraní prueba, también las credenciales de prueba de MP.

Al ingresar en /usr/local/proyectos/sanaviron_quilmes/testing/bin
ejecuto ./ sq_iniciar_entorno

Luego me conecto al núcleo
./docker-connect sq-nucleo
ejecuto el sq_validar instalacion.
Muestra lo siguiente.

root@48e9ea13e6c8:/var/local/sqnucleo# sq validar_instalacion

 ------------------------------------------------------------------------
  INICIANDO VALIDACIONES DE LA INSTALACION del proyecto
 ------------------------------------------------------------------------
In proceso_validar_instalacion.php line 53:
                                                                                                              
  No se pudo conectar con Redis.                                                                              
  Connection to Redis 127.0.0.1:6379 failed after 1 failures.Last Error : (111) Connection refused            
                                                                                                              
  No se pudo conectar con la Unidad de venta.                                                                 
  Client error: `GET http://127.0.0.1/sq_academico/rest/status` resulted in a `404 Not Found` response:       
  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">                                                          
  <html><head>                                                                                                
  <title>404 Not Found</title>                                                                                
  </head><body>                                                                                               
  <h1>Not Found (truncated...)                                                                                
                                                                                                              
                                                                                                              
  No se pudo conectar con SQ-Pagos-Backend.                                                                   
  Client error: `GET http://127.0.0.1/sq_pagos_backend/status` resulted in a `404 Not Found` response:        
  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">                                                          
  <html><head>                                                                                                
  <title>404 Not Found</title>                                                                                
  </head><body>                                                                                               
  <h1>Not Found (truncated...)                                                                                
                                                                                                              
                                                                                                              
  No se pudo conectar con SIU-Pilaga.                                                                         
  Client error: `GET http://127.0.0.1/pilaga/rest/cuentas-tesoreria` resulted in a `404 Not Found` response:  
  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">                                                          
  <html><head>                                                                                                
  <title>404 Not Found</title>                                                                                
  </head><body>                                                                                               
  <h1>Not Found (truncated...)                                                                                
                                                                                                              

validar_instalacion

Al tratar de ingresar a sq_nucleo o sq_academico desde el navegador
http://10.0.2.65:4001/sq_nucleo
http://10.0.2.65:4002/sq_academico
muestra errores.
de conexión a pilaga, guaraní y redis.

Que tengo que revisar? para que poder hacer funcionar el entorno.

Saludos.

Hola Diego, revisa la configuración del archivo instalacion.env

en la linea:

export IP_LOCAL=
ahí deberías tener seteada la ip local de la maquina donde esta instalado el entorno de testing.

Igualmente note que esta buscando las url’s en 127.0.0.1 cuando debería buscar en las ip’s de cada una de las vm que crea docker. Por esto sospecho que esta tirando algun error al iniciar el entorno.

Revisa si el archivo “testing/templates/instalacion.env.dist” tiene las mismas variables que “testing/instalacion.env”. Si no es así actualiza este último.

Saludos y avisame como te fue.

Hola Esteban, Buen día, Gracias por la respuesta.
Revise los archivos que me detallas, " testing/templates/instalacion.env.dist" esta como corresponde, con las configuraciones por default.

“testing/instalacion.env” modifique el parámetro con la ip local de la Maquina Virtual que estoy trabajando, con esto me dejo de dar error de conexión con Redis.

Esta es la salida al iniciar el entrono, tiene errores, queda en " ###### ESPERANDO INICIALIZACION DE COMPONENTES SQ-Nucleo SQ-Academico [2/5]"

-docker:/usr/local/proyectos/sanaviron-quilmes/testing/bin$ sudo bash sq_iniciar_entorno

    ######   DETENIENDO CONTAINERS

    ######   ELIMINANDO CONTAINERS
./eliminar.sh: línea 7: aviso: command substitution: ignored null byte in input
Username for 'https://hub.siu.edu.ar': dbogado@uno.edu.ar
Password for 'https://dbogado@uno.edu.ar@hub.siu.edu.ar': 

    ######   EL PROYECTO TESTING SE ENCUENTRA EN LA ULTIMA VERSION

    ######   ACTUALIZANDO MODULOS

            ######   ACTUALIZANDO IMAGENES (puede demorar unos segundos según la velocidad de la conexión)


            ######   ACTUALIZANDO COMPONENTE: nucleo -> master

Already on 'master'
Your branch is up-to-date with 'origin/master'.
No stash found.


            ######   ACTUALIZANDO COMPONENTE: academico -> master

Already on 'master'
Your branch is up-to-date with 'origin/master'.
No stash found.
./actualizar.sh: línea 66: cd: vintec: No existe el fichero o el directorio


            ######   ACTUALIZANDO COMPONENTE: vintec -> master

Already on 'master'
Your branch is up-to-date with 'origin/master'.
No stash found.
./actualizar.sh: línea 73: cd: sq_pagos: No existe el fichero o el directorio


            ######   ACTUALIZANDO COMPONENTE: sq_pagos -> master

Already on 'master'
Your branch is up-to-date with 'origin/master'.
No stash found.
./actualizar.sh: línea 80: cd: gco: No existe el fichero o el directorio


            ######   ACTUALIZANDO COMPONENTE: gco -> master

fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git

    ######   CONFIGURANDO MODULOS

            ######   CONFIGURANDO COMPONENTES
cp: no se puede efectuar `stat' sobre 'vintec/templates/instalador.env.dist': No existe el fichero o el directorio
sed: no se puede leer vintec/instalador.env: No existe el fichero o el directorio
sed: no se puede leer vintec/instalador.env: No existe el fichero o el directorio
sed: no se puede leer vintec/instalador.env: No existe el fichero o el directorio
sed: no se puede leer vintec/instalador.env: No existe el fichero o el directorio
sed: no se puede leer vintec/instalador.env: No existe el fichero o el directorio
sed: no se puede leer vintec/instalador.env: No existe el fichero o el directorio
sed: no se puede leer vintec/instalador.env: No existe el fichero o el directorio

    ######   INICIANDO CONTAINERS (este proceso puede demorar unos minutos luego de finalizado)
Creating sq-testing ... done
4d74ccee11fae5dfd4120748e3a4a002cae4f7a3f05981b74ac1b7f62bc8ad46
Starting nucleo_data_1_a0b9c380cf52 ... done
Creating sq-db-nucleo               ... done
Creating sq-nucleo                  ... done
Starting academico_data_1_de46b856067e ... done
Creating sq-db-academico               ... done
Creating sq-academico                  ... done
./iniciar.sh: línea 66: cd: vintec: No existe el fichero o el directorio
sq-testing is up-to-date
./iniciar.sh: línea 72: cd: gco: No existe el fichero o el directorio
sq-testing is up-to-date
./iniciar.sh: línea 78: cd: sq_pagos: No existe el fichero o el directorio
ERROR: 
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml
        

    ######   ESPERANDO INICIALIZACION DE COMPONENTES
  SQ-Nucleo SQ-Academico [2/5]

Esta es la salida desde el núcleo al validar la instalación.

root@sq-docker:/usr/local/proyectos/sanaviron-quilmes/testing/bin# sudo bash docker-connect sq-nucleo
Entorno cargado.
Ejecute 'toba' para ver la lista de comandos disponibles.
Ejecute 'sq' para ver la lista de comandos disponibles.
root@94ea4df68485:/var/local/sqnucleo# cd bin/
root@94ea4df68485:/var/local/sqnucleo/bin# sq validar_instalacion

 ------------------------------------------------------------------------
  INICIANDO VALIDACIONES DE LA INSTALACION del proyecto
 ------------------------------------------------------------------------
In proceso_validar_instalacion.php line 53:
                                                                                                              
  No se pudo conectar con la Unidad de venta.                                                                 
  Client error: `GET http://127.0.0.1/sq_academico/rest/status` resulted in a `404 Not Found` response:       
  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">                                                          
  <html><head>                                                                                                
  <title>404 Not Found</title>                                                                                
  </head><body>                                                                                               
  <h1>Not Found (truncated...)                                                                                
                                                                                                              
                                                                                                              
  No se pudo conectar con SQ-Pagos-Backend.                                                                   
  Client error: `GET http://127.0.0.1/sq_pagos_backend/status` resulted in a `404 Not Found` response:        
  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">                                                          
  <html><head>                                                                                                
  <title>404 Not Found</title>                                                                                
  </head><body>                                                                                               
  <h1>Not Found (truncated...)                                                                                
                                                                                                              
                                                                                                              
  No se pudo conectar con SIU-Pilaga.                                                                         
  Client error: `GET http://127.0.0.1/pilaga/rest/cuentas-tesoreria` resulted in a `404 Not Found` response:  
  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">                                                          
  <html><head>                                                                                                
  <title>404 Not Found</title>                                                                                
  </head><body>                                                                                               
  <h1>Not Found (truncated...)                                                                                
                                                                                                              

validar_instalacion


Este es mi archivo “…/testing/instalacion.env”

/usr/local/proyectos/sanaviron-quilmes/testing# cat instalacion.env
# Configuraciones
#=======================================
export IP_LOCAL=10.0.2.65
#export IP_LOCAL=ens18
export DISPATCHER_ACTIVO=true;
export DISPATCHER_URL='http://xxx.xxx.xxx.xxx/dispatcher_notificacion_mp.php?sender=';
export DISPATCHER_BACK_URL='http://xxx.xxx.xxx.xxx/dispatcher_back_mp.php?sender=';
export ES_DESARROLLO=false;

# Pilaga
#=======================================
export API_PILAGA_URL='http://10.0.2.68/siu/pilaga2018/rest/';
export API_PILAGA_USUARIO='xxx;
export API_PILAGA_PASSWORD='xxx';
export API_PILAGA_METHOD='digest';

# Guarani
#=======================================
export API_GUARANI_URL='http://10.0.2.66/guarani/3.15.1/rest/';
export API_GUARANI_USUARIO='xxx';
export API_GUARANI_PASSWORD='xxx';
export API_GUARANI_METHOD='basic';

# MercadoPago
#=======================================
export MP_CLIENT_ID=xxxxx;
export MP_CLIENT_SECRET=xxxxx;

# Mail
#=======================================
export CONFIGURAR_EMAIL=false;
export ENVIA_EMAILS=0;
export EMAIL_ENVIOS_DESARROLLO='';
export SMTP_HOST='smtp.gmail.com';
export SMTP_PUERTO='587';
export SMTP_USUARIO='';
export SMTP_CLAVE='';

# Graylog
#=======================================
export INICIAR_GRAYLOG=false;

Muchas Gracias, Saludos.

Esteban,
como estás? Justo te iba a contactar por esto y lo vi en el foro.

El tema es que hay que tocar muchos sq.ini para pegarles a las IP 172.17.0.x de los otros contenedores. Además, veo que hay errores en los ini que apuntan a redis ya que buscar el redis en localhost cuando debería buscarlo en la IP del contenedor de redis que levanta la instalación.

Por otro lado, encontramos temitas relacionados con vintec, el repo no existe más, ahora veo que es vintec_old…

Saludos
Alejandro

En realidad, en los sq.ini quedan dos alternativas:

  • Poner la IP de la VM que corre lso contenedores con el port 4001, 4002, etc. Por ejemplo, 172.17.0.1:4002

  • Poner la IP de cada contenedor y el port 80.

Saludos
Alejandro

Listo, está resuelto con el tema de que faltaba acceso a un repositorio. Ahora los scripts terminan bien y la app queda operativa.

Saludos
Alejandro

Prefecto Ale y gracias por el debug!

Abrazo

Por lo que comenta Alejandro ya se puede descargar vintec y termina correctamente el inicio de los componentes.

Saludos.

root@sq-docker:/usr/local/proyectos/sanaviron-quilmes/testing/bin# bash sq_iniciar_entorno

    ######   DETENIENDO CONTAINERS

    ######   ELIMINANDO CONTAINERS
./eliminar.sh: línea 7: aviso: command substitution: ignored null byte in input
./eliminar.sh: línea 56: aviso: command substitution: ignored null byte in input
./eliminar.sh: línea 59: aviso: command substitution: ignored null byte in input
./eliminar.sh: línea 68: aviso: command substitution: ignored null byte in input
./eliminar.sh: línea 74: aviso: command substitution: ignored null byte in input
./eliminar.sh: línea 91: aviso: command substitution: ignored null byte in input
Error: No such container: academico_data_1
./eliminar.sh: línea 99: aviso: command substitution: ignored null byte in input
Error: No such container: nucleo_data_1

    ######   EL PROYECTO TESTING SE ENCUENTRA EN LA ULTIMA VERSION

    ######   ACTUALIZANDO MODULOS

            ######   ACTUALIZANDO IMAGENES (puede demorar unos segundos según la velocidad de la conexión)


            ######   ACTUALIZANDO COMPONENTE: nucleo -> master

Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'


            ######   ACTUALIZANDO COMPONENTE: academico -> master

Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'


            ######   ACTUALIZANDO COMPONENTE: vintec -> master

Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'


            ######   ACTUALIZANDO COMPONENTE: sq_pagos -> master

Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'


            ######   ACTUALIZANDO COMPONENTE: gco -> master

Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'

    ######   CONFIGURANDO MODULOS

            ######   CONFIGURANDO COMPONENTES

    ######   INICIANDO CONTAINERS (este proceso puede demorar unos minutos luego de finalizado)
Creating sq-testing ... done
959af45f2b324c42c0b7750a9dad9e8f5b36d1f58b80a5a91c93ffb47fcdafb4
Starting nucleo_data_1_a0b9c380cf52 ... done
Creating sq-db-nucleo               ... done
Creating sq-nucleo                  ... done
Starting academico_data_1_de46b856067e ... done
Creating sq-db-academico               ... done
Creating sq-academico                  ... done
Creating vintec_data_1_b5b0d6fb62b3 ... done
Creating sq-db-vintec               ... done
Creating sq-vintec                  ... done
Creating sq-pagos-backend ... done
Creating sq-pagos ... done

    ######   ESPERANDO INICIALIZACION DE COMPONENTES
  SQ-Nucleo SQ-Academico SQ-Vintec SQ-GCO SQ-Pagos [5/5] - LISTO

    ######   CONFIGURACION FINAL DE MODULOS

            ######   CONFIGURACION FINAL SQ

    ######   ENTORNO INICIADO   ######