Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Unable to create temporary file to execute script

  1. #1

    Default Unable to create temporary file to execute script

    Hey Guys,

    I've been trying to fix this error for a couple days now and can't figure out what's going on. I've had several other people who are familiar with pentaho try to fix it, and they haven't been able to come up with a solution either. I'm running on a Windows 10 machine as an administrator. I'm trying to run a simple script to test to make sure the application is working, but it's failing. The only two pieces are the START and Shell script. The Shell is the one with the red x.

    Here is the script:

    hostname
    echo %date%_%time%

    The hostname is replaced by my computer's name.

    Here is the log:
    2017/01/26 09:06:26 - Spoon - Starting job...
    2017/01/26 09:06:26 - Test - Start of job execution
    2017/01/26 09:06:26 - Test - Starting entry [Shell]
    2017/01/26 09:06:26 - Shell - Running on platform : Windows 10
    2017/01/26 09:06:26 - Shell - ERROR (version 7.0.0.0-25, build 1 from 2016-11-05 15.35.36 by buildguy) : Unexpected error running shell [null] : java.lang.Exception: Unable to create temporary file to execute script
    2017/01/26 09:06:26 - Shell - ERROR (version 7.0.0.0-25, build 1 from 2016-11-05 15.35.36 by buildguy) : java.lang.Exception: Unable to create temporary file to execute script
    2017/01/26 09:06:26 - Shell - at org.pentaho.di.job.entries.shell.JobEntryShell.createTemporaryShellFile(JobEntryShell.java:696)
    2017/01/26 09:06:26 - Shell - at org.pentaho.di.job.entries.shell.JobEntryShell.executeShell(JobEntryShell.java:488)
    2017/01/26 09:06:26 - Shell - at org.pentaho.di.job.entries.shell.JobEntryShell.execute(JobEntryShell.java:435)
    2017/01/26 09:06:26 - Shell - at org.pentaho.di.job.Job.execute(Job.java:724)
    2017/01/26 09:06:26 - Shell - at org.pentaho.di.job.Job.execute(Job.java:865)
    2017/01/26 09:06:26 - Shell - at org.pentaho.di.job.Job.execute(Job.java:546)
    2017/01/26 09:06:26 - Shell - at org.pentaho.di.job.Job.run(Job.java:436)
    2017/01/26 09:06:26 - Shell - Caused by: org.apache.commons.vfs2.FileSystemException: Could not create file "file:///C:/Users/ZACH1/AppData/Local/Temp/kettle_022a179e-e3d9-11e6-af26-45e631192048shell.bat".
    2017/01/26 09:06:26 - Shell - at org.apache.commons.vfs2.provider.AbstractFileObject.createFile(AbstractFileObject.java:382)
    2017/01/26 09:06:26 - Shell - at org.pentaho.di.job.entries.shell.JobEntryShell.createTemporaryShellFile(JobEntryShell.java:676)
    2017/01/26 09:06:26 - Shell - ... 6 more
    2017/01/26 09:06:26 - Shell - Caused by: org.apache.commons.vfs2.FileSystemException: Could not write to "file:///C:/Users/ZACH1/AppData/Local/Temp/kettle_022a179e-e3d9-11e6-af26-45e631192048shell.bat".
    2017/01/26 09:06:26 - Shell - at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1407)
    2017/01/26 09:06:26 - Shell - at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1353)
    2017/01/26 09:06:26 - Shell - at org.apache.commons.vfs2.provider.AbstractFileObject.createFile(AbstractFileObject.java:372)
    2017/01/26 09:06:26 - Shell - ... 7 more
    2017/01/26 09:06:26 - Shell - Caused by: java.io.FileNotFoundException: C:\Users\ZACH1\AppData\Local\Temp\kettle_022a179e-e3d9-11e6-af26-45e631192048shell.bat (Access is denied)
    2017/01/26 09:06:26 - Shell - at java.io.FileOutputStream.open0(Native Method)
    2017/01/26 09:06:26 - Shell - at java.io.FileOutputStream.open(Unknown Source)
    2017/01/26 09:06:26 - Shell - at java.io.FileOutputStream.<init>(Unknown Source)
    2017/01/26 09:06:26 - Shell - at java.io.FileOutputStream.<init>(Unknown Source)
    2017/01/26 09:06:26 - Shell - at org.apache.commons.vfs2.provider.local.LocalFile.doGetOutputStream(LocalFile.java:251)
    2017/01/26 09:06:26 - Shell - at org.apache.commons.vfs2.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1399)
    2017/01/26 09:06:26 - Shell - ... 9 more
    2017/01/26 09:06:26 - Test - Finished job entry [Shell] (result=[false])
    2017/01/26 09:06:26 - Test - Job execution finished
    2017/01/26 09:06:26 - Spoon - Job has ended.


    I do have the following system variables added and modified:
    JAVA_HOME to C:\Program Files\Java\jre1.8.0_121
    PENTAHO_JAVA_HOME to C:\Program Files\Java\ jre1.8.0_121
    PENTAHO_JAVA to C:\Program Files\Java\jre1.8.0_121\bin\javaw.exe
    Added %JAVA_HOME%\bin to the PATH variable

    Any help would be sincerely appreciated.

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    There's something fishy with the access rights to your temp folder:

    2017/01/26 09:06:26 - Shell - Caused by: java.io.FileNotFoundException: C:\Users\ZACH1\AppData\Local\Temp\kettle_022a179e-e3d9-11e6-af26-45e631192048shell.bat (Access is denied)
    Try setting your Windows environment variable TEMP / TMP to a folder not managed by Windows, like C:\Kettle\Temp or even C:\Temp, and see what happens.
    If no error occurs, use parameter -Djava.io.tmpdir=C:/Temp as one of your JVM options.
    Last edited by marabu; 01-26-2017 at 02:29 PM.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Quote Originally Posted by ThatComSciGuy View Post
    Could not create file "file:///C:/Users/ZACH1/AppData/Local/Temp/kettle_022a179e-e3d9-11e6-af26-45e631192048shell.bat".
    Looks like a filesystem permissions issue... especially with the error later that says "Access is denied"
    Does C:/Users/ZACH1/AppData/Local/Temp actually exist?

  4. #4

    Default

    Try setting your Windows environment variable TEMP / TMP to a folder not managed by Windows, like C:\Kettle\Temp or even C:\Temp, and see what happens.
    This was the fix. Even though I changed permissions to allow full access, it was still being denied. Something is going on. Thanks for the help!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.