1

I have two versions of lucee one on my computer and the other on a production server. I wanted to protect a word document using Microsoft RMS service, using the below command:

<cfexecute name="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
    arguments='Protect-RMSFile -File "D:\CM.docx" -TemplateID 75e51549-41f9-464b-897d-28123425733 -OutputFolder d:\' 
    outputfile='D:\refreshsite.log' variable="data" errorvariable="xyz" timeout="50"/>

This works well on my computer but on server gives:

timeout [50000 ms] expired while executing

Despite then I see that the command works fine on the server and the protected file is created. I have no idea what Lucee is waiting for on the server!!!

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
  • Maybe a permission issue? That would explain why it works when testing it in your session, but does not work when executing with the user the CF service is running at. – Alex Aug 02 '19 at 20:10
  • Not really the command is executed and the protected file is produced. It looks that there is a problem informing cfexecute that the operation is over! Which is not the case on the PC!!! – Mustafa Abusalah Aug 04 '19 at 09:15
  • 1
    What is the Lucee version and JVM version on each environment? There were some JVMs where this was reported and later fixed, eg like with this answer: https://stackoverflow.com/a/38150046/4575762 . In some scenarios you may benefit from starting your arguments with "-inputformat none" so in your case that would be arguments='-inputformat none Protect-RMSFile ' Also try verifying that you can run the same command at a prompt on that box if you have access to do so. And try verifying that cfexecute does return on that box when using a trivial command like outputting the current date. – Sev Roberts Aug 05 '19 at 20:06
  • Hi Sev, Lucee version: 5.3.2.77 Java version: jdk1.8.0_91 -inputformat none did not work out, also I noticed that the file created using cfexecute is locked and I can't delete it as another program is using it. So it looks the command execution is kept running! – Mustafa Abusalah Aug 06 '19 at 11:48
  • 1
    Are you using the same versions in *both* environments? What happened when you tried Sev's suggestion of doing something simple, like outputting the current date? – SOS Aug 06 '19 at 21:22
  • Thanks @Ageax for your input, no they are not the same version, both JDK and Lucee are different versions. For trying other command, I tried the below: ` ` This worked just fine and returned: Thursday, August 8, 2019 – Mustafa Abusalah Aug 08 '19 at 06:54

0 Answers0