Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: Kitchen return codes?

  1. #1
    Join Date
    Jul 2007
    Posts
    247

    Default Kitchen return codes?

    Hi everybody,

    I have some questions concerning the kitchen return codes. The kitchen user manual contains something like this:

    Code:
     Kitchen returns an error code based on how the execution went:
    0 The job ran without a problem.
    1 Errors occurred during processing
    2 An unexpected error occurred during loading / running of the job
    7 The job couldn't be loaded from XML or the Repository
    8 Error loading steps or plugins (error in loading one of the plugins mostly)
    9 Command line usage printing
    When running kitchen on Windows, I would suspect to find the return value in the environment variable %errorlevel%. However, %errorlevel% is always zero, even if there's an error:

    Code:
    19:08:43,935 INFO  [Kitchen] Kitchen - Logging is at level : Basic
    19:08:43,935 INFO  [Kitchen] Kitchen - Start of run.
    19:08:44,420 INFO  [Kettle] Kettle - Reading repositories XML file: C:\Programme\zeb\kettle\.kettle\repositories.xml
    Processing stopped because of an error: 
    An error occurred reading job [Dummy_Job] from the repository
    
    Can't find job : Dummy_Job
    
    
    ERROR: Kitchen can't continue because the job couldn't be loaded.
    echo %errorlevel% will get you... 0

    Any idea anyone?


    Regards,
    Ben

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    It's the return code of the java process.
    I really don't know if the result is propagated to Kitchen.bat

    Perhaps you can try to return %errorlevel% in Kitchen.bat

    Matt

  3. #3
    Join Date
    Jul 2007
    Posts
    247

    Default

    Nevermind, I found a solution for my problem

    Thx anyway,
    Ben

  4. #4
    Join Date
    Jun 2008
    Posts
    4

    Default what was the solution?

    what was the solution? I am also wondering.

  5. #5
    Join Date
    Jun 2008
    Posts
    7

    Default How did you fix it??

    I stuck in the same way... trying to execute with kitchen in a linux and answer my the same:

    INFO 12-06 17:03:11,796 (LogWriter.javarintln:439) -i18n - org.pentaho.di.core.exception.KettleException:
    Message not found in the preferred and failover locale: key=[], package=org.pentaho.di.job.entries.trans

    at org.pentaho.di.i18n.LAFMessageHandler.calculateString(LAFMessageHandler.java:121)
    at org.pentaho.di.i18n.GlobalMessages.getString(GlobalMessages.java:444)
    at org.pentaho.di.i18n.BaseMessages.getString(BaseMessages.java:66)
    at org.pentaho.di.core.config.AnnotatedJobConfigManager.load(AnnotatedJobConfigManager.java:85)
    at org.pentaho.di.core.config.BasicConfigManager.loadAs(BasicConfigManager.java:46)
    at org.pentaho.di.job.JobEntryLoader.readNatives(JobEntryLoader.java:112)
    at org.pentaho.di.job.JobEntryLoader.init(JobEntryLoader.java:101)
    at org.pentaho.di.kitchen.Kitchen.main(Kitchen.java:156)

    2008/06/12 17:03:12:105 GMT+01:00 [INFO] DefaultFileReplicator - Using "/tmp/vfs_cache" as temporary files store.
    ERROR: Kitchen can't continue because the job couldn't be loaded.


    Anty kind of help? Thx in advanced
    P.D: Sorry, i'm bvcelari, "newbie" in pentaho, just say Hy O: )

    Quote Originally Posted by BeLienig View Post
    Nevermind, I found a solution for my problem

    Thx anyway,
    Ben

  6. #6
    Join Date
    May 2006
    Posts
    4,882

    Default

    What about attaching your job?

    Regards,
    Sven

  7. #7
    Join Date
    Jun 2008
    Posts
    1

    Default

    After some trying I found that the following batch-script works fine under WinXP Prof. I've not clue why it didn't work for someone else. However I wasn't successful with "if Errorlevel 0 GOTO..." either. Mabe the error level isn't correctly within kitchen?

    regards, Jan

    The following code resides within my batch-file runkitchen.bat:
    -------------------------------------------------

    @echo off
    if exist error.log del error.log

    call Kitchen.bat /rep:PDI-rep /user:admin /pass:****/job:load_data /dir:myDir/level:Error > error.log
    IF %ERRORLEVEL% == 0 GOTO Erfolg
    IF NOT %ERRORLEVEL% == 0 GOTO FEHLER
    goto Ende

    :Fehler
    echo "Error"
    goto Ende

    :Erfolg
    echo "Import successful"
    goto Ende

    :Ende
    pause

  8. #8
    Join Date
    Jul 2007
    Posts
    247

    Default

    Hi Jan,

    your script works perfectly for me... what is exactly your problem?


    Regards,
    Ben

  9. #9
    Join Date
    Jun 2008
    Posts
    7

    Default Found a solution....

    I'm my issue, was simple and stupid, inside the xml of the job, sometimes (i don't know why, but not always) appear a reference to the location of the original file, in my situation, when i move my files to another folder in my server, kitchen was unable to find then.... my Advice, put all in the same folder or i reades something abaout put all inside a zip file, could be easier and more portable.

    I hope be usefull
    Regards, Bvce

  10. #10
    Join Date
    Jul 2008
    Posts
    1

    Default

    hello @all,

    has anyone a solution for the problem?!?
    how can i get the "real" return code in a win bat file to work with?
    return code = 0 in every case is not really nice to handle

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.