

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
UCMDB 9x: Not possible to execute shell commands after a timeout
Hi all,
in ucmdb 9, does anyone know why a shell command in timeout prevent the discovery script to execute any subsequent commands.
Please consider the following 2 examples using ShellClient.executeCmd and ShellClient.executeCmdWithTimeOut. As shown below, when the first command exceeds a configured timeout value an exception is raised (unless executeCmdWithTimeOut is called). This is the expected behaviour.
What I do not understand is that any commands executed afterwards timeout as well even if those are not supposed to. A command in timeout does not mean that the whole discovery script is in timeout.
Example 1: ShellClient.executeCmd
try:
logger.debug('Test 1 ...')
waitfortimeout = 0
client.executeCmd('sleep 60; ls /tmp', 5000, 0)
except Exception, ex:
exInfo = ex.getMessage()
logger.debug('Unexpected exception: %s' % exInfo)
try:
logger.debug('Test 2 ...')
waitfortimeout = 0
client.executeCmd('sleep 5; ls /tmp')
except Exception, ex:
exInfo = ex.getMessage()
logger.debug('Unexpected exception: %s' % exInfo)
errormessages.resolveAndReport(exInfo, Framework)
[DEBUG] - Test 1 ...
[DEBUG] - Unexpected exception: Command timed out: Exceeded timeout after 5000 milliseconds
[DEBUG] - Test 2 ...
[DEBUG] - Unexpected exception: Command timed out: Exceeded timeout after 15000 milliseconds
Example 2: ShellClient.executeCmdWithTimeOut
try:
logger.debug('Test 1 ...')
waitfortimeout = 0
client.executeCmdWithTimeOut('sleep 60; ls /tmp')
except Exception, ex:
exInfo = ex.getMessage()
logger.debug('Unexpected exception: %s' % exInfo)
try:
logger.debug('Test 2 ...')
waitfortimeout = 0
client.executeCmd('sleep 5; ls /tmp')
except Exception, ex:
exInfo = ex.getMessage()
logger.debug('Unexpected exception: %s' % exInfo)
errormessages.resolveAndReport(exInfo, Framework)
[DEBUG] - Test 1 ...
[DEBUG] - Test 2 ...
[DEBUG] - Unexpected exception: Command timed out: Exceeded timeout after 15000 milliseconds
P.S. This thread has been moved from Application Perf Mgmt (BAC / BSM) Support and News Forum to CMS and Discovery Support and News . - Hp Forum Moderator