Pentaho - Error running bat by Windows Task Scheduler

Asked

Viewed 472 times

0

Follows the code of .bat:

@echo off
TITLE MeuProcessoAutomatico
SET currentdir=%~dp0
SET kitchen=C:\pdi\data-integration\Kitchen.bat
SET logfile="%currentdir%main.txt"
echo. >> %logfile%
echo. >> %logfile%

"%kitchen%" /file:"%currentdir%load_obrigacoes.kjb" /level:Basic >> %logfile%

When I run it manually, everything OK, no error occurs. However, when rotating by Agendador de Tarefas do Windows, it returns error. Follow the log:



DEBUG: Using PENTAHO_JAVA_HOME
DEBUG: _PENTAHO_JAVA_HOME=C:\Program Files\Java\jre1.8.0_251
DEBUG: _PENTAHO_JAVA=C:\Program Files\Java\jre1.8.0_251\bin\java.exe

C:\pdi\data-integration>"C:\Program Files\Java\jre1.8.0_251\bin\java.exe"  -Xms1024m "-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2" "-Djava.library.path=libswt\win64" "-Djava.endorsed.dirs=C:\Program Files\Java\jre1.8.0_251\jre\lib\endorsed;C:\Program Files\Java\jre1.8.0_251\lib\endorsed;C:\pdi\data-integration\system\karaf\lib\endorsed" "-DKETTLE_HOME=" "-DKETTLE_REPOSITORY=" "-DKETTLE_USER=" "-DKETTLE_PASSWORD=" "-DKETTLE_PLUGIN_PACKAGES=" "-DKETTLE_LOG_SIZE_LIMIT=" "-DKETTLE_JNDI_ROOT=" -jar launcher\launcher.jar -lib ..\libswt\win64  -main org.pentaho.di.kitchen.Kitchen -initialDir "C:\Users\Usuario_Atual\Documents\tscdigital\Job"\ /file:"C:\Users\Usuario_Atual\Documents\tscdigital\Job\load_obrigacoes.kjb" /level:Basic 
10:17:16,312 INFO  [KarafBoot] Checking to see if org.pentaho.clean.karaf.cache is enabled
10:17:22,570 INFO  [KarafInstance] 
*******************************************************************************
*** Karaf Instance Number: 2 at C:\pdi\data-integration\.\system\karaf\cach ***
***   es\kitchen\data-1                                                     ***
*** Karaf Port:8803                                                         ***
*** OSGI Service Port:9052                                                  ***
*******************************************************************************
2020/06/04 10:17:25 - Kitchen - Logging is at level : Log básico
2020/06/04 10:17:25 - Kitchen - Start of run.
10:17:34,922 INFO  [DriverManager] Installing driver kars.
10:17:34,922 INFO  [DriverManager] 0 drivers will be installed.
10:17:34,922 INFO  [DriverManager] Finished installing drivers kars.
2020/06/04 10:17:42 - load_obrigacoes - Início da execução do job
2020/06/04 10:17:42 - Carte - Installing timer to purge stale objects after 1440 minutes.
2020/06/04 10:17:42 - load_obrigacoes - Starting entry [get_email]
2020/06/04 10:17:42 - get_email - Using run configuration [Pentaho local]
2020/06/04 10:17:42 - get_email - Starting entry [get_email_load]
2020/06/04 10:17:42 - get_email_load - Using run configuration [Pentaho local]
2020/06/04 10:17:42 - get_email_load - Running transformation using the Kettle execution engine
2020/06/04 10:17:42 - get_email_load - Expedindo in?cio para transforma??o [get_email_load]
2020/06/04 10:17:44 - Table output.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:44 - Table output 2.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:44 - Table output 4.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:44 - Table output 3 2.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:44 - Table output 3.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:45 - Thiago.0 - Finished processing (I=2, O=0, R=0, W=2, U=0, E=0)
2020/06/04 10:17:45 - Select values 1.0 - Finished processing (I=0, O=0, R=2, W=2, U=0, E=0)
2020/06/04 10:17:45 - Split Fields 1.0 - Finished processing (I=0, O=0, R=2, W=2, U=0, E=0)
2020/06/04 10:17:45 - Split field to rows 1.0 - Finished processing (I=0, O=0, R=2, W=2, U=0, E=0)
2020/06/04 10:17:45 - Select values.0 - Finished processing (I=0, O=0, R=2, W=2, U=0, E=0)
2020/06/04 10:17:45 - Add constants.0 - Finished processing (I=0, O=0, R=2, W=2, U=0, E=0)
2020/06/04 10:17:45 - Replace in string.0 - Finished processing (I=0, O=0, R=2, W=2, U=0, E=0)
2020/06/04 10:17:45 - Table output.0 - Finished processing (I=0, O=2, R=2, W=2, U=0, E=0)
2020/06/04 10:17:45 - get_email - Starting entry [get_email_process]
2020/06/04 10:17:45 - get_email_process - Using run configuration [Pentaho local]
2020/06/04 10:17:45 - get_email_process - Running transformation using the Kettle execution engine
2020/06/04 10:17:45 - get_email_process - Expedindo in?cio para transforma??o [get_email_process]
2020/06/04 10:17:46 - Table output 3 2.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:46 - Table output.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:46 - Table output 2.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:46 - Table output 3.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:46 - Table output 4.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:46 - Fabiola.0 - Finished reading query, closing connection.
2020/06/04 10:17:46 - Maiara.0 - Finished reading query, closing connection.
2020/06/04 10:17:46 - Thiago.0 - Finished reading query, closing connection.
2020/06/04 10:17:46 - Thais.0 - Finished reading query, closing connection.
2020/06/04 10:17:46 - Select values 2 2.0 - Finished processing (I=0, O=0, R=2, W=2, U=0, E=0)
2020/06/04 10:17:46 - Select values 2.0 - Finished processing (I=0, O=0, R=4, W=4, U=0, E=0)
2020/06/04 10:17:46 - Filter rows 2 2.0 - Finished processing (I=0, O=0, R=2, W=2, U=0, E=0)
2020/06/04 10:17:46 - Dummy (do nothing) 3 2.0 - Finished processing (I=0, O=0, R=2, W=2, U=0, E=0)
2020/06/04 10:17:46 - Filter rows 2.0 - Finished processing (I=0, O=0, R=4, W=4, U=0, E=0)
2020/06/04 10:17:46 - Add constants 2.0 - Finished processing (I=0, O=0, R=2, W=2, U=0, E=0)
2020/06/04 10:17:46 - Dummy (do nothing) 4.0 - Finished processing (I=0, O=0, R=4, W=4, U=0, E=0)
2020/06/04 10:17:46 - Maiara.0 - Finished processing (I=2, O=0, R=0, W=2, U=0, E=0)
2020/06/04 10:17:46 - Thiago.0 - Finished processing (I=4, O=0, R=0, W=4, U=0, E=0)
2020/06/04 10:17:46 - Duana.0 - Finished reading query, closing connection.
2020/06/04 10:17:46 - Update 2.0 - Finished processing (I=2, O=0, R=2, W=2, U=0, E=0)
2020/06/04 10:17:46 - Table output.0 - Finished processing (I=0, O=4, R=4, W=4, U=0, E=0)
2020/06/04 10:17:46 - get_email - Starting entry [Success]
2020/06/04 10:17:46 - get_email - Finished job entry [Success] (result=[true])
2020/06/04 10:17:46 - get_email - Finished job entry [get_email_process] (result=[true])
2020/06/04 10:17:46 - get_email - Finished job entry [get_email_load] (result=[true])
2020/06/04 10:17:47 - load_obrigacoes - Starting entry [Delete_emails_lidos]
2020/06/04 10:17:47 - Delete_emails_lidos - Using run configuration [Pentaho local]
2020/06/04 10:17:47 - delete_emails_lidos - Starting entry [Delete_files]
2020/06/04 10:17:47 - Delete_files - Arquivo [L:\01-GED-Integracao\obrigacoes\1 - Carga\Duana\emaillido] já apagado.
2020/06/04 10:17:47 - Delete_files - Arquivo [L:\01-GED-Integracao\obrigacoes\1 - Carga\Thiago\emaillido] já apagado.
2020/06/04 10:17:47 - Delete_files - Arquivo [L:\01-GED-Integracao\obrigacoes\1 - Carga\Maiara\emaillido] já apagado.
2020/06/04 10:17:47 - Delete_files - Arquivo [L:\01-GED-Integracao\obrigacoes\1 - Carga\Thais\emaillido] já apagado.
2020/06/04 10:17:47 - Delete_files - Arquivo [L:\01-GED-Integracao\obrigacoes\1 - Carga\Fabiola\emaillido] já apagado.
2020/06/04 10:17:47 - delete_emails_lidos - Starting entry [Thiago]
2020/06/04 10:17:47 - delete_emails_lidos - Finished job entry [Thiago] (result=[false])
2020/06/04 10:17:47 - delete_emails_lidos - Finished job entry [Delete_files] (result=[false])
2020/06/04 10:17:47 - load_obrigacoes - Finished job entry [Delete_emails_lidos] (result=[false])
2020/06/04 10:17:47 - load_obrigacoes - Finished job entry [get_email] (result=[false])
2020/06/04 10:17:47 - load_obrigacoes - Starting entry [load_file]
2020/06/04 10:17:47 - load_file - Using run configuration [Pentaho local]
2020/06/04 10:17:47 - load_file - Starting entry [operation_name_file]
2020/06/04 10:17:47 - operation_name_file - Using run configuration [Pentaho local]
2020/06/04 10:17:47 - operation_name_file - Starting entry [rename_file]
2020/06/04 10:17:47 - rename_file - Using run configuration [Pentaho local]
2020/06/04 10:17:47 - rename_file - Running transformation using the Kettle execution engine
2020/06/04 10:17:47 - rename_file - Expedindo in?cio para transforma??o [rename_file]
2020/06/04 10:17:47 - Generate rows.0 - Finished processing (I=0, O=0, R=0, W=1, U=0, E=0)
2020/06/04 10:17:47 - Sort rows.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2020/06/04 10:17:47 - Text file output.0 - Finished processing (I=0, O=1, R=1, W=1, U=0, E=0)
2020/06/04 10:17:47 - operation_name_file - Starting entry [commando_rename_file.bat]
2020/06/04 10:17:47 - commando_rename_file.bat - Running on platform : Windows 10
2020/06/04 10:17:47 - commando_rename_file.bat - Executing command : cmd.exe /C "C:\Users\Usuario_Atual\Documents\tscdigital\Job\commando_rename_file.bat"
2020/06/04 10:17:47 - operation_name_file - Starting entry [Success]
2020/06/04 10:17:47 - operation_name_file - Finished job entry [Success] (result=[true])
2020/06/04 10:17:47 - operation_name_file - Finished job entry [commando_rename_file.bat] (result=[true])
2020/06/04 10:17:47 - operation_name_file - Finished job entry [rename_file] (result=[true])
2020/06/04 10:17:47 - load_file - Starting entry [load_file]
2020/06/04 10:17:47 - load_file - Using run configuration [Pentaho local]
2020/06/04 10:17:47 - load_file - Running transformation using the Kettle execution engine
2020/06/04 10:17:47 - load_file - Expedindo in?cio para transforma??o [load_file]
2020/06/04 10:17:47 - Table output.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:48 - Table input.0 - Finished reading query, closing connection.
2020/06/04 10:17:48 - Table input.0 - Finished processing (I=17433, O=0, R=0, W=17433, U=0, E=0)
2020/06/04 10:17:48 - Sort rows.0 - Finished processing (I=0, O=0, R=17433, W=17433, U=0, E=0)
2020/06/04 10:17:48 - Merge join.0 - Finished processing (I=0, O=0, R=17433, W=0, U=0, E=0)
2020/06/04 10:17:48 - load_file - Starting entry [load_file_rais]
2020/06/04 10:17:48 - load_file_rais - Using run configuration [Pentaho local]
2020/06/04 10:17:48 - load_file_rais - Running transformation using the Kettle execution engine
2020/06/04 10:17:48 - load_file_rais - Expedindo in?cio para transforma??o [load_file_rais]
2020/06/04 10:17:49 - Table output.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:49 - Table input.0 - Finished reading query, closing connection.
2020/06/04 10:17:49 - Table input.0 - Finished processing (I=17433, O=0, R=0, W=17433, U=0, E=0)
2020/06/04 10:17:49 - Sort rows.0 - Finished processing (I=0, O=0, R=17433, W=17433, U=0, E=0)
2020/06/04 10:17:50 - Merge join.0 - Finished processing (I=0, O=0, R=17433, W=0, U=0, E=0)
2020/06/04 10:17:50 - load_file - Starting entry [process_file]
2020/06/04 10:17:50 - process_file - Using run configuration [Pentaho local]
2020/06/04 10:17:50 - process_file - Running transformation using the Kettle execution engine
2020/06/04 10:17:50 - process_file - Expedindo in?cio para transforma??o [process_file]
2020/06/04 10:17:50 - Table output 3 2.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:50 - Table output 4.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:50 - Table output 2.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:50 - Table output 3.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:50 - Table output.0 - Connected to database [bi_integracao] (commit=1000)
2020/06/04 10:17:50 - Maiara.0 - Finished reading query, closing connection.
2020/06/04 10:17:50 - Duana.0 - Finished reading query, closing connection.
2020/06/04 10:17:51 - Thais.0 - Finished reading query, closing connection.
2020/06/04 10:17:51 - Thiago.0 - Finished reading query, closing connection.
2020/06/04 10:17:51 - Fabiola.0 - Finished reading query, closing connection.
2020/06/04 10:17:51 - load_file - Starting entry [move_rec_dec]
2020/06/04 10:17:51 - load_file - Finished job entry [move_rec_dec] (result=[false])
2020/06/04 10:17:51 - load_file - Finished job entry [process_file] (result=[false])
2020/06/04 10:17:51 - load_file - Finished job entry [load_file_rais] (result=[false])
2020/06/04 10:17:51 - load_file - Finished job entry [load_file] (result=[false])
2020/06/04 10:17:51 - load_file - Finished job entry [operation_name_file] (result=[false])
2020/06/04 10:17:51 - load_obrigacoes - Finished job entry [load_file] (result=[false])
2020/06/04 10:17:51 - load_obrigacoes - Job execution finished
2020/06/04 10:17:51 - Kitchen - Finished!
2020/06/04 10:17:51 - Kitchen - Start=2020/06/04 10:17:25.555, Stop=2020/06/04 10:17:51.179
2020/06/04 10:17:51 - Kitchen - Processing ended after 25 seconds.

The first return false falls in that line:

2020/06/04 10:17:47 - delete_email - Finished job entry [Thiago] (result=[false])

In this Job owning 1 Move Files and 5 Get mails (POP3/IMAP).

Versions:

Pentaho 9.0

Windows 10 Pro

Follow a screenshot of the settings of Agendador: inserir a descrição da imagem aqui

1 answer

0


Strangely, the solution was to cancel Executar com privilégios mais altos and also leave the option marked Executar somente quando o usuário estiver conectado.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.