AnsweredAssumed Answered

Pan.bat hangs after completing the transformation

Question asked by saket Maheshwary on Sep 25, 2018
Latest reply on Oct 2, 2018 by Joao Figueiredo

Hello,

 

I am working on a project to upgrade PDI to version 8.1.0.0. We have some add-hoc PDI jobs/transformations which users can execute at will. We have stood up some simple JSP pages running on Tomcat server.

 

In JSP pages we take input arguments and call a batch file (and pass the arguments). In the batch file we call PAN.bat. Most of these transformations generate a file. Once PAN.bat is done we display a link on JSP to download the batch file.

 

In JSP we call the batch file using command:

Process proc = Runtime.getRuntime().exec(etlCommand);

and wait for it to complete using command

returncode = proc.waitFor();

 

Problem that we are facing is that returncode = proc.waitFor(); keeps on waiting because batch file never returns.

 

Our custom batch file calls pan.bat. Pan.bat internally calls spoon.bat. Within spoon.bat we execute launcher\launcher.jar and control never returns from here.

 

Basically in spoon when we execute code:

%SPOON_START_OPTION% "%_PENTAHO_JAVA%" %OPT% -jar launcher\launcher.jar -lib ..\%LIBSPATH% %_cmdline%

 

which internally executes command:

"java.exe"  "-Xms1024m" "-Xmx2048m" "-XX:MaxPermSize=256m" "-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2" "-Djava.library.path=libswt\win64" "-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.pan.Pan -initialDir "D:\Program Files\Pentaho\data-integration-8.1.0.0"\ /rep:"BIREPO8DEV" /trans:"transformation_name" /dir:/Transformations /user:pqrs /pass:abcd /level:Detailed "-param:v_month=JAN" "-param:v_year=2018"

 

control is never returned back. Even after the transformation is done and output file is generated.

 

Another observation that I have is that, as soon as I stop tomcat server (tomcat use to server up JSP pages) control comes back from the above command and I get my subsequent debug messages.

 

I am using following:

Server: Windows Server 2016 Datacenter on a VM

Tomcat: 8.5

Java: 1.8.0_172

PDI: 8.1.0.0

 

I'll really appreciate help on this.

 

Thanks,

Outcomes