transmission_of_audio_and_video:audio_and_video
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| transmission_of_audio_and_video:audio_and_video [2025/12/25 20:40] – aperez | transmission_of_audio_and_video:audio_and_video [2025/12/25 20:42] (current) – aperez | ||
|---|---|---|---|
| Line 18: | Line 18: | ||
| + | ====== Automatic Startup of Java Application (VisionLite) as a Windows Service ====== | ||
| + | ===== Purpose ===== | ||
| + | Establish a standard, reproducible, | ||
| + | application as a **Windows Service**, ensuring: | ||
| - | + | | |
| - | + | * Independence from user login | |
| - | + | * Automatic restart on failures | |
| - | + | * Use of standard production paths | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | ====== Arranque Automático de Aplicación Java (VisionLite) como Servicio en Windows ====== | + | |
| - | + | ||
| - | ===== Propósito ===== | + | |
| - | Establecer un procedimiento estándar, reproducible y alineado a buenas prácticas para | + | |
| - | ejecutar una aplicación Java (.jar) como **Servicio de Windows**, garantizando: | + | |
| - | + | ||
| - | | + | |
| - | * Independencia del login de usuario | + | |
| - | * Reinicio automático ante fallos | + | |
| - | * Uso de rutas estándar de producción | + | |
| --- | --- | ||
| - | ===== Escenario | + | ===== Scenario |
| - | Aplicación | + | Java application manually executed with: |
| < | < | ||
| Line 53: | Line 38: | ||
| </ | </ | ||
| - | Requerimiento: | + | Requirement: |
| - | Ejecutarse automáticamente tras cada reinicio del sistema operativo. | + | The application must start automatically after every operating system reboot. |
| --- | --- | ||
| - | ===== Requisitos | + | ===== Requirements |
| * Windows Server 2016+ / Windows 10+ | * Windows Server 2016+ / Windows 10+ | ||
| - | * PowerShell | + | * PowerShell |
| - | * Conectividad a Internet (instalación inicial) | + | * Internet |
| * Java Runtime Environment (JRE) | * Java Runtime Environment (JRE) | ||
| * NSSM (Non-Sucking Service Manager) | * NSSM (Non-Sucking Service Manager) | ||
| Line 67: | Line 52: | ||
| --- | --- | ||
| - | ===== Paso 1 — Instalación de Chocolatey ===== | + | ===== Step 1 — Chocolatey |
| - | Chocolatey | + | Chocolatey |
| - | ==== Verificación | + | ==== Verification |
| <code powershell> | <code powershell> | ||
| choco -v | choco -v | ||
| </ | </ | ||
| - | ==== Instalación | + | ==== Installation |
| <code powershell> | <code powershell> | ||
| Set-ExecutionPolicy Bypass -Scope Process -Force | Set-ExecutionPolicy Bypass -Scope Process -Force | ||
| Line 82: | Line 67: | ||
| </ | </ | ||
| - | Cerrar y abrir PowerShell | + | Close and reopen |
| --- | --- | ||
| - | ===== Paso 2 — Instalación y Verificación de Java ===== | + | ===== Step 2 — Java Installation and Verification |
| - | Se recomienda | + | Java LTS is recommended |
| - | ==== Instalación | + | ==== Java 8 Installation |
| <code powershell> | <code powershell> | ||
| choco install jre8 -y | choco install jre8 -y | ||
| </ | </ | ||
| - | ==== Verificación | + | ==== Verification |
| <code powershell> | <code powershell> | ||
| java -version | java -version | ||
| </ | </ | ||
| - | Salida validada en este entorno: | + | Validated output in this environment: |
| < | < | ||
| java version " | java version " | ||
| Line 106: | Line 91: | ||
| --- | --- | ||
| - | ===== Paso 3 — Identificación de la Ruta REAL de Java ===== | + | ===== Step 3 — Identifying the REAL Java Path ===== |
| - | ⚠️ | + | ⚠️ |
| < | < | ||
| C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe | C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe | ||
| </ | </ | ||
| - | ==== Validación del binario | + | ==== Validate the real binary |
| <code powershell> | <code powershell> | ||
| Test-Path " | Test-Path " | ||
| </ | </ | ||
| - | Resultado: | + | Result: |
| < | < | ||
| True | True | ||
| </ | </ | ||
| - | Ruta confirmada: | + | Confirmed path: |
| < | < | ||
| C:\Program Files\Java\jre1.8.0_261\bin\java.exe | C:\Program Files\Java\jre1.8.0_261\bin\java.exe | ||
| Line 129: | Line 114: | ||
| --- | --- | ||
| - | ===== Paso 4 — Instalación de NSSM ===== | + | ===== Step 4 — NSSM Installation |
| - | NSSM permite ejecutar aplicaciones como servicios de Windows | + | NSSM allows applications to run as controlled |
| - | ==== Instalación | + | ==== Installation |
| <code powershell> | <code powershell> | ||
| choco install nssm -y | choco install nssm -y | ||
| </ | </ | ||
| - | ==== Verificación | + | ==== Verification |
| <code powershell> | <code powershell> | ||
| nssm version | nssm version | ||
| Line 144: | Line 129: | ||
| --- | --- | ||
| - | ===== Paso 5 — Verificación del Servicio | + | ===== Step 5 — Service Verification |
| - | Comprobar si el servicio ya existe: | + | Check whether the service already exists: |
| <code powershell> | <code powershell> | ||
| Line 151: | Line 136: | ||
| </ | </ | ||
| - | Resultado validado: | + | Validated result: |
| < | < | ||
| Name DisplayName | Name DisplayName | ||
| Line 159: | Line 144: | ||
| --- | --- | ||
| - | ===== Paso 6 — Configuración del Servicio | + | ===== Step 6 — VisionLite |
| - | Todos los comandos deben ejecutarse en **PowerShell | + | All commands must be executed in **PowerShell |
| - | ==== Definición del ejecutable | + | ==== Java executable definition |
| <code powershell> | <code powershell> | ||
| nssm set VisionLite Application " | nssm set VisionLite Application " | ||
| </ | </ | ||
| - | ==== Parámetros de ejecución | + | ==== Execution parameters |
| <code powershell> | <code powershell> | ||
| nssm set VisionLite AppParameters "-jar VLite_2_3_169.jar" | nssm set VisionLite AppParameters "-jar VLite_2_3_169.jar" | ||
| </ | </ | ||
| - | ==== Directorio de trabajo inicial | + | ==== Initial working directory |
| <code powershell> | <code powershell> | ||
| nssm set VisionLite AppDirectory " | nssm set VisionLite AppDirectory " | ||
| </ | </ | ||
| - | ==== Arranque automático | + | ==== Automatic startup |
| <code powershell> | <code powershell> | ||
| nssm set VisionLite Start SERVICE_AUTO_START | nssm set VisionLite Start SERVICE_AUTO_START | ||
| </ | </ | ||
| - | ==== Reinicio automático si falla ==== | + | ==== Automatic restart on failure |
| <code powershell> | <code powershell> | ||
| nssm set VisionLite AppExit Default Restart | nssm set VisionLite AppExit Default Restart | ||
| Line 190: | Line 175: | ||
| --- | --- | ||
| - | ===== Paso 7 — Inicio y Validación del Servicio | + | ===== Step 7 — Service Start and Validation |
| <code powershell> | <code powershell> | ||
| nssm start VisionLite | nssm start VisionLite | ||
| Line 196: | Line 181: | ||
| </ | </ | ||
| - | Estado validado: | + | Validated state: |
| < | < | ||
| STATE : 4 RUNNING | STATE : 4 RUNNING | ||
| </ | </ | ||
| - | ==== Confirmación de Auto-Start ==== | + | ==== Auto-start confirmation |
| <code powershell> | <code powershell> | ||
| sc qc VisionLite | sc qc VisionLite | ||
| </ | </ | ||
| - | Resultado: | + | Result: |
| < | < | ||
| START_TYPE : 2 AUTO_START | START_TYPE : 2 AUTO_START | ||
| Line 213: | Line 198: | ||
| --- | --- | ||
| - | ===== Paso 8 — Corrección por Buenas Prácticas | + | ===== Step 8 — Best Practice Correction |
| - | La ruta basada en el Desktop | + | A user Desktop–based path is **NOT recommended** for production. |
| - | ==== Ruta estándar definida | + | ==== Standard path defined |
| < | < | ||
| C: | C: | ||
| Line 223: | Line 208: | ||
| --- | --- | ||
| - | ===== Paso 9 — Migración del Servicio a Ruta Estándar | + | ===== Step 9 — Service Migration to Standard Path ===== |
| - | ==== Detener el servicio | + | ==== Stop the service |
| <code powershell> | <code powershell> | ||
| nssm stop VisionLite | nssm stop VisionLite | ||
| </ | </ | ||
| - | ==== Crear directorio de producción | + | ==== Create production directory |
| <code powershell> | <code powershell> | ||
| mkdir C: | mkdir C: | ||
| </ | </ | ||
| - | ==== Migrar archivos de la aplicación | + | ==== Migrate application files ==== |
| <code powershell> | <code powershell> | ||
| Move-Item " | Move-Item " | ||
| </ | </ | ||
| - | ==== Actualizar directorio de trabajo del servicio | + | ==== Update service working directory |
| <code powershell> | <code powershell> | ||
| nssm set VisionLite AppDirectory " | nssm set VisionLite AppDirectory " | ||
| </ | </ | ||
| - | ==== Reiniciar el servicio | + | ==== Restart the service |
| <code powershell> | <code powershell> | ||
| nssm start VisionLite | nssm start VisionLite | ||
| Line 253: | Line 238: | ||
| --- | --- | ||
| - | ===== Paso 10 — Validación | + | ===== Step 10 — Final Validation |
| - | ==== Dump de configuración | + | ==== NSSM configuration dump ==== |
| <code powershell> | <code powershell> | ||
| nssm dump VisionLite | nssm dump VisionLite | ||
| </ | </ | ||
| - | Confirmar: | + | Confirm: |
| < | < | ||
| AppDirectory C: | AppDirectory C: | ||
| </ | </ | ||
| - | ==== Prueba recomendada | + | ==== Recommended test ==== |
| - | Reiniciar el servidor y verificar que el servicio se encuentre en estado | + | Reboot the server and verify the service is in RUNNING |
| --- | --- | ||
| - | ===== Operación Diaria | + | ===== Daily Operations |
| <code powershell> | <code powershell> | ||
| nssm start VisionLite | nssm start VisionLite | ||
| Line 280: | Line 265: | ||
| ===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
| - | ^ Síntoma | + | ^ Symptom |
| - | | El servicio se detiene | + | | Service stops | Incorrect directory |
| - | | El JAR no inicia | + | | JAR does not start | Incorrect |
| - | | No arranca tras reboot | No AUTO_START | Verificar | + | | Does not start after reboot | Not AUTO_START | Verify |
| - | | Archivos no encontrados | + | | Files not found | Relative paths | Use standard path | |
| --- | --- | ||
| - | ===== Buenas Prácticas | + | ===== Best Practices |
| - | * Usar `C: | + | * Use `C: |
| - | * Evitar rutas dependientes del perfil de usuario | + | * Avoid user-profile-dependent paths |
| - | * Documentar cambios en Wiki | + | * Document changes in Wiki |
| - | * Centralizar gestión mediante | + | * Centralize management with NSSM |
| - | * Considerar usuario dedicado para servicios críticos | + | * Consider a dedicated service account for critical services |
| --- | --- | ||
| - | ===== Nota Final ===== | + | ===== Final Note ===== |
| - | Una vez configurado como servicio: | + | Once configured as a service: |
| - | ❌ NO ejecutar manualmente: | + | ❌ DO NOT manually execute: |
| < | < | ||
| java -jar VLite_2_3_169.jar | java -jar VLite_2_3_169.jar | ||
| </ | </ | ||
| - | ✅ Gestionar exclusivamente como servicio | + | ✅ Manage exclusively as a Windows |
| --- | --- | ||
| Line 332: | Line 317: | ||
| sc query VisionLite | sc query VisionLite | ||
| </ | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
transmission_of_audio_and_video/audio_and_video.1766695224.txt.gz · Last modified: by aperez
