1 2 Previous Next 15 Replies Latest reply on Feb 15, 2012 2:28 AM by Gerhard Knop

    exportDeployRun don't creates a file

    Gerhard Knop

      I used "blcli Utility exportDeployRun /Testjobs Testjob_09 $JOB_ID /tmp/joboutput" and nothing happens: no error message but also no output file is created.

      What is the reason for this behaviour?

        • 1. exportDeployRun don't creates a file

          Anything in the blcli.log ?

          • 2. exportDeployRun don't creates a file

            Did you use it in a script or manually in the command line? How did you get the job ID (somethimes it is confused with job DBKey or job run DBKey)?

            If you can send the whole set of commands you used it will be easier to debug this case.

            • 3. exportDeployRun don't creates a file
              Gerhard Knop

              I could not find this log.

              • 4. exportDeployRun don't creates a file

                what OS is the blcli being executed ?

                on UNIX it will be home directory of the user ($HOME)/.bladelogic/blcli.log

                On Windows

                it will be %APP_DATA%  i.e. the app data directory

                e.g.

                C:\Documents and Settings\rohit.nayyar\Application Data\BladeLogic\blcli.log

                • 5. Re: exportDeployRun don't creates a file
                  Gerhard Knop

                  I use it in a script and I attached the relevant part of this script.

                  • 6. exportDeployRun don't creates a file

                    I tried to execute the script you sent and it seems to work OK. It might be a problem in your environment, for example missing authorization to create the output file or remediation job which doesn't exist. To find the reason for that you can add "echos" after the BLCLIs, for example:

                     

                    DEPLOY_JOB_KEY=`blcli -r "$ROLE" -v $PROFILE DeployJob getDBKeyByGroupAndName "$JOB_FOLDER" "$JOB_NAME"`

                    echo "DEPLOY_JOB_KEY=$DEPLOY_JOB_KEY"

                    RUN_KEY=`blcli  -r "$ROLE" -v $PROFILE DeployJob executeJobAndWait $DEPLOY_JOB_KEY`

                    FILE="/tmp/jobexport.CSV"

                    JOB_ID=`blcli -r "$ROLE" -v $PROFILE DeployJobRun findLastRunIdByJobKey $DEPLOY_JOB_KEY`

                    echo "JOB_ID=$JOB_ID"

                    VOID=`blcli  -r "$ROLE" -v $PROFILE Utility exportDeployRun $JOB_FOLDER $JOB_NAME  $JOB_ID $FILE`

                    echo "VOID=$VOID \n"

                    ls -l $FILE

                     

                    In that case you will be able to see any error message generated while the script execution.

                    • 7. exportDeployRun don't creates a file
                      Bill Robinson

                      you might also want to use 'DeployJobRun getHadErrors' instead of JobRun getHadErrors...

                      • 8. Re: exportDeployRun don't creates a file
                        Gerhard Knop

                        I tried the way Nimrod told, but it didn’t really help me, e.g. “echo $VOID” gives only “void” as output.

                         

                        I additionally created the file with echo “TEST” > $FILE and that works fine.

                         

                         

                         

                        Mit freundlichen Grüßen

                         

                        W&W Informatik GmbH

                        IE Systemtechnik 2 Server

                         

                        Dr. Gerhard Knop

                         

                         

                        Postanschrift: 71630 Ludwigsburg

                        Büroanschrift: Im Tambour 6, 71638 Ludwigsburg

                        Büro: K6 0236

                         

                        Wüstenrot & Württembergische - Der Vorsorge-Spezialist

                         

                        Telefon: 07141 16-4715

                        Telefax: 07141 16-84715

                        E-Mail: mailto:gerhard.knop@ww-informatik.de <mailto:gerhard.knop@ww-informatik.de

                        Internet: http://www.ww-informatik.de <http://www.ww-informatik.de

                         

                        W&W Informatik GmbH

                        Geschäftsführer: Ralf Stankat (Vorsitzender), Ralph Wildermuth

                        Aufsichtsratsvorsitzender: Klaus Peter Frohmüller

                        Sitz: Ludwigsburg, Registergericht: Amtsgericht Stuttgart HRB 204709, USt-IdNr. DE 176036989

                         

                        P Bitte denken Sie an die Umwelt, bevor Sie diese E-Mail drucken.

                         

                        Von: Nimrod forums@developer.bmc.com

                        Gesendet: Mittwoch, 25. Januar 2012 21:16

                        An: Knop, Gerhard Dr. (IT/IES)

                        Betreff: Re: exportDeployRun don't creates a file New message on BMC Communities

                         

                         

                         

                         

                        BMC Communities <https://communities.bmc.com/communities/index.jspa>

                         

                         

                        Thread: "Re: exportDeployRun don't creates a file"

                         

                         

                        created by Nimrod <https://communities.bmc.com/communities/people/nouliel>  in BMC BladeLogic Server Automation - View the full discussion <https://communities.bmc.com/communities/message/223183#223183

                        • 9. Re: exportDeployRun don't creates a file
                          Gerhard Knop

                          The command 'DeployJobRun getHadErrors'  doesn’t exist:

                           

                           

                           

                          Error      26.01.2012 13:19:45        Unknown command : name space = 'DeployJobRun', command = 'getHadErrors'.com.bladelogic.om.infra.cli.factory.CommandNotFoundException: R: Cannot find command : DeployJobRun, getHadErrors

                           

                           

                           

                           

                           

                           

                           

                          Mit freundlichen Grüßen

                           

                          W&W Informatik GmbH

                          IE Systemtechnik 2 Server

                           

                          Dr. Gerhard Knop

                           

                           

                          Postanschrift: 71630 Ludwigsburg

                          Büroanschrift: Im Tambour 6, 71638 Ludwigsburg

                          Büro: K6 0236

                           

                          Wüstenrot & Württembergische - Der Vorsorge-Spezialist

                           

                          Telefon: 07141 16-4715

                          Telefax: 07141 16-84715

                          E-Mail: mailto:gerhard.knop@ww-informatik.de <mailto:gerhard.knop@ww-informatik.de

                          Internet: http://www.ww-informatik.de <http://www.ww-informatik.de

                           

                          W&W Informatik GmbH

                          Geschäftsführer: Ralf Stankat (Vorsitzender), Ralph Wildermuth

                          Aufsichtsratsvorsitzender: Klaus Peter Frohmüller

                          Sitz: Ludwigsburg, Registergericht: Amtsgericht Stuttgart HRB 204709, USt-IdNr. DE 176036989

                           

                          P Bitte denken Sie an die Umwelt, bevor Sie diese E-Mail drucken.

                           

                          Von: Bill Robinson forums@developer.bmc.com

                          Gesendet: Mittwoch, 25. Januar 2012 21:42

                          An: Knop, Gerhard Dr. (IT/IES)

                          Betreff: Re: exportDeployRun don't creates a file New message on BMC Communities

                           

                           

                           

                           

                          BMC Communities <https://communities.bmc.com/communities/index.jspa>

                           

                           

                          Thread: "Re: exportDeployRun don't creates a file"

                           

                           

                          created by Bill Robinson <https://communities.bmc.com/communities/people/brobinson>  in BMC BladeLogic Server Automation - View the full discussion <https://communities.bmc.com/communities/message/223185#223185

                          • 10. Re: exportDeployRun don't creates a file

                            If there was no erro message I guess that means that all the data is correct. Getting void genarally menas that the file was generated and if the file is generated by echo “TEST” > $FILE it means that there is no authorization problem. I would suggest next tests:

                            • See that there is deploy job run log (maybe it failed and the run log was not generated at all).
                            • Check the blcli log (like Nayyar suggested) to see there are no error messages there
                            • Try to use the script on another NSH machine (with different OS if possible). Maybe the NSH installation is bad.
                            • 11. Re: exportDeployRun don't creates a file
                              Bill Robinson

                              you need to use unreleased commands - blcli_execute ... for the getHadErrors.

                               

                              blcli_execute DeployJob executeJobAndWait ${DEPLOY_JOB_KEY}

                              blcli_storeenv RUN_KEY

                              blcli_execute DeployJobRun getHadErrors

                              blcli_storeenv HAD_ERROR

                                 if [ "${HAD_ERROR}" = "true" ]

                                 then

                                    FILE="/tmp/jobexport"

                              blcli_execute DeployJobRun findLastRunIdByJobKey ${DEPLOY_JOB_KEY}

                              blcli_storeenv JOB_ID

                              blcli_execute Utility exportDeployRun "${JOB_FOLDER_NAME}" "${DEPLOY_JOB_NAME}"  ${JOB_ID} $FILE

                                    cat "$FILE"

                                    echo "\nblcli: DeployJob ${DEPLOY_JOB_NAME} failed - exiting!"

                                    exit 1

                                 fi

                              • 12. Re: exportDeployRun don't creates a file
                                Gerhard Knop

                                Nimrod: I have tried your three suggestions, the deploy job run log exists and it contains the messages I want to get, in blcli.log are no errors (I produced some other errors to see they will be logged, that was ok), I tried another machine (same OS, I have no access to other servers) with the same result.

                                • 13. Re: exportDeployRun don't creates a file
                                  Gerhard Knop

                                  Bill: I used now the unreleased commands and got the following output:

                                   

                                   

                                   

                                  Info       26.01.2012 17:58:25        Start des Deployjobs BJ-20120126-mksysb: die mksysb-Sicherungen werden erstellt.

                                   

                                  Info       26.01.2012 17:59:34        DBKey:SJobRunKeyImpl:17027

                                   

                                  Info       26.01.2012 17:59:34        DeployJobKey DBKey:SJobModelKeyImpl:3075-5-3601031

                                   

                                  Info       26.01.2012 17:59:34        RunKey DBKey:SJobRunKeyImpl:17027

                                   

                                  Info       26.01.2012 17:59:34        true17027

                                   

                                  Info       26.01.2012 17:59:34        JobID 17027

                                   

                                  Info       26.01.2012 17:59:34        JobFolderName /Betriebssystem/AIX/Administrativ

                                   

                                  Info       26.01.2012 17:59:34        DeployJobName BJ-20120126-mksysb

                                   

                                  Error      26.01.2012 17:59:35        Command execution failed. com.bladelogic.om.infra.mfw.util.NotFoundException: No job found with name : BJ-20120126-mksysb? group : 2000095 and type : DEPLOY_JOB

                                   

                                  Error      26.01.2012 17:59:35        //@/C/Program Files/BMC Software/BladeLogic/8.1/NSH/tmp/pasv0646_job1/scripts/job__4996c592-7f87-4140-83e4-30416c207e86/script_DBKey-SJobKeyImpl-2190-11__6238caa1-b550-40d2-ac16-65c259cd822f.34344.1_create_mksysb.nsh:227: command not found: 

                                   

                                  Info       26.01.2012 17:59:35        blcli: DeployJob BJ-20120126-mksysb failed - exiting!

                                   

                                   

                                   

                                   

                                   

                                  The last command before the error was:

                                   

                                   

                                   

                                  blcli_execute Utility exportDeployRun "$" "$"  $ $FILE

                                   

                                   

                                   

                                   

                                   

                                  *******************************************************************************

                                  Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.

                                  Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten

                                  haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.

                                  Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht

                                  gestattet.

                                   

                                  This email may contain confidential and/or privileged information.

                                  If you are not the intended recipient (or have received this email

                                  in error) please notify the sender immediately and destroy this email.

                                  Any unauthorized copying, disclosure or distribution of the material

                                  in this email is strictly forbidden.

                                   

                                  • 14. Re: exportDeployRun don't creates a file
                                    Bill Robinson

                                    if you are still having issues can you post your full script ?

                                    1 2 Previous Next