Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

ksc_simple_respond times out after 50 seconds with PPM 9.12

SOLVED
Go to solution
Highlighted
bzdafro
Collector

ksc_simple_respond times out after 50 seconds with PPM 9.12

Hi

 

We have been using ksc_simple_respond on several of our workflows to execute scripts.   As an example, we use it to kick off oracle scripts and pass it our oracle password.   Some of the scripts can take several minutes to complete, especially if updating large tables.   When we upgraded from 7.5 to 9.12 the ksc_simple_respond times out after 50 seconds.  We can no longer control its timeout value within the object type or the workflow step.    HP solution was to stop using the command, which doesnt work properly - since PPM executes the command and moves on.   Our developers cannot tell when the script completes or if it was successful or failed.   Has anyone run into this or know a way around it?

 

 

 

 

This is what it looks like when it times out....

 

Sending command: echo KSC_EXIT_STATUS $? 1
waiting for something to read...
echo KSC_EXIT_STATUS $? 1
Sending command: echo KSC_EXIT_STATUS $? 2
waiting for something to read...
echo KSC_EXIT_STATUS $? 2
Sending command: echo KSC_EXIT_STATUS $? 3
waiting for something to read...
echo KSC_EXIT_STATUS $? 3
Sending command: echo KSC_EXIT_STATUS $? 4
waiting for something to read...
echo KSC_EXIT_STATUS $? 4
Sending command: echo KSC_EXIT_STATUS $? 5
waiting for something to read...
echo KSC_EXIT_STATUS $? 5


Proceeding with command execution.

KSC Simple Respond Command Failed [Sat Feb 25 03:05:05 EST 2012]


7 REPLIES
Jim Esler
Honored Contributor

Re: ksc_simple_respond times out after 50 seconds with PPM 9.12

To execute sqlplus scripts we have been using ksc_capture_output in validations and ksc_local_exec in execution steps. The credentials are pulled from an Environment. An example:

 

ksc_local_exec sqlplus -S [DEST_ENV="KINTANA_SERVER".DB_USERNAME]/[DEST_ENV="KINTANA_SERVER".DB_PASSWORD]@[DEST_ENV="KINTANA_SERVER".DB_ORACLE_SID] @[AS.PKG_TRANSFER_PATH][REQ.REQUEST_ID]SQL_script.txt

d4y4n4
Frequent Visitor

Re: ksc_simple_respond times out after 50 seconds with PPM 9.12

Hi,

Check this information, I hope this helps

Appendix A: System Special Commands
Examples using ksc_simple_respond
If it becomes necessary to invoke a new shell while in a remote session, it would be ideal to simply use the command ‘sh’. However, this can cause the execution engine to wait indefinitely while waiting for an exit code. To avoid this problem, the ‘sh’ command can be encapsulated in a ksc_simple_respond command with no prompts as shown:
ksc_simple_respond “sh”
As another example, suppose it becomes necessary to switch to another user account while in a remote session using the ‘su’ command. This command always prompts for password, unless performed by a root user. By utilizing the -hide feature, the password will not be displayed in the execution logs. This interactivity can be handled using ksc_simple_respond as follows:
ksc_simple_respond "su <username>" -hide "word:" "<password>"
Note that “word:” was used as the prompt instead of the entire word “password:”. The execution engine will wait for the specified prompt string, whether it is all—or just a part—of the prompt text.

As one more example, consider the following Bourne shell command:
echo "Enter a string:\c"; read str; echo $str
Normally, this command line would cause the execution engine to hang while waiting for an exit code (the command will never exit because it is waiting for input), which would eventually timeout when the execution timeout time is reached. Use ksc_simple_respond to process this command as shown (this command should be entered on a single line):
ksc_simple_respond #echo "Enter a string:\c"; read str; echo
$str# #a string:# #my_value#
Since the command line contained double quotes, the pound sign (#) is used as the quote character. During execution, this command step will prompt “Enter a string:” and wait for input. The string “my_value” would be entered
The execution engine will wait for each specified prompt. If a prompt does not appear for some reason, then the execution engine will continue to wait for it until the command times out.
d4y4n4
Frequent Visitor

Re: ksc_simple_respond times out after 50 seconds with PPM 9.12

Here is an example to execute an store procedure called UPDATE_A

ksc_simple_respond "sqlplus [SOURCE_ENV="KINTANA_SERVER".DB_USERNAME]/[SOURCE_ENV="KINTANA_SERVER".DB_PASSWORD]@[SOURCE_ENV="KINTANA_SERVER".DB_ORACLE_SID]" "SQL>" "execute UTILITIES.UPDATE_A([REQ.REQUEST_ID],[SYS.USER_ID])" "SQL>" "quit"
Mandragoran
Super Collector

Re: ksc_simple_respond times out after 50 seconds with PPM 9.12

Did you ever find a solution for this problem?

I also recently upgraded (6.5 > 9.10), and I'm having the same problem.

 

One solution I have found is to just put the sqlplus command plain without ksc_simple_respond.

 

But I used ksc_simple_respond in a lot of object types. I think it's best to figure out why it's not working.

I have an incident going with HP, but the tech doesn't know what's wrong at this point.

 

bzdafro
Collector
Solution

Re: ksc_simple_respond times out after 50 seconds with PPM 9.12

The solution I found was to add "$" "echo $"  at the end of the line.  Also, just as FYI, we were using the command with a password response  The password had a $ in it.  If you take away the ksc_simple_respond, you cannot have a $ in your password (if its being passed during the command).   

Mandragoran
Super Collector

Re: ksc_simple_respond times out after 50 seconds with PPM 9.12

Thatt worked!

 

I was going to reply that our issues are unrelated, because I have no $ in the password.

But it worked for me.

The only $ is the one in the driver file variable. And I assume that has been replaced by the time the command is run:

 

ksc_simple_respond "sqlplus [DEST_ENV.ENV.DB_USERNAME]@[DEST_ENV.ENV.DB_CONNECT_STRING] @$driver" -hide "Enter password:" "[DEST_ENV.ENV.DB_PASSWORD]" "$" "echo $"

 

THANKS!

hotel_pappa_id
Occasional Advisor

Re: ksc_simple_respond times out after 50 seconds with PPM 9.12

Can you please explain what adding  "$" "echo $" at the end of the line does?

 

We have a sql execute script command that's having this problem also. We used to use the "Timout(s)" field at the top of the "Edit Command" window and set it to something like 1800, but since our upgrade this timeout period is ignored, and the timeout fails in these 5 seconds if it doesn't hear back from the database, for whatever reason, locks, etc.

 

Our sql execute script command looks like:

 

ksc_simple_respond "sqlplus [P.P_EXECUTE_AS] @$driver" -hide "word: " "[SQL_OUTPUT]"

 

Are you suggesting that we make it look like this and that will solve the problem?  If so, why?

 

ksc_simple_respond "sqlplus [P.P_EXECUTE_AS] @$driver" -hide "word: " "[SQL_OUTPUT]" "$" "echo $"

 

I'm not understanding how that solves the problem. 

 

Thanks for the explination.

//Add this to "OnDomLoad" event