infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
No response within timeout -- Assuming process is hung!
Rick Martin
I have a TCL script running from a batch script (Windows platform) via hcitcl. One of the things it has to do is check the status of a thread and possibly stop/start it. This works some of the time, but intermittently, I receive the following error:
No response within timeout -- Assuming process is hung!
when executing the following, $cmd is either pstop or pstart:
catch {exec cmd.exe /c hcicmd -p $pname -c "$tname $cmd"} result
Is there a way around this? Can the timeout be increased?
Thanks, Rick
Find more posts tagged with
Clovertech
Comments
Charlie Bursell
That message simply means the command thread was too busy to acknowledge your request within its allotted time. That timeout is fixed. That does not mean the action did not happen. It means you didn't get an acknowledgement that it happened.
It is for this reason that I prefer to place threads that I will be stopping and starting from a script within its own process. When you call hcienginestop, if the engine does not stop within a certain time, the hcienginestop script will kick it to death.
Also, you may wish to change that time. By default, it can take up to 300 seconds (5 minutes) for an engine to shut down if it is hung.
All you need to do is edit the hcienginestop script in the $HCIROOT/bin directory. Look for the following subroutine:
sub waitForIt {
local( $name ) =
@_
;
local( $tries ) = 30;
while( ($pid = &getHciEnginePid( $name )) && $tries-- ) {
sleep 10;
}
return $pid;
}
Change the number of tries and or sleep time to whatever you like. For example, if you change number of tries to 9, it would take at most 90 seconds.
I hope this helps
System
Originally posted by Julie Kimmel
Hi Rick,
I don't have a 'reply' for your post, but just a question for you...
I am trying to figure out how to do windows batch using the tcl...and I am having a hard time.
Would you mind sharing a bare bones batch script, a 'hello world' if you will, of how to do such a thing? I, too, want to check the status of a thread (which I can only figure out through tcl) and down it (which I can only figure out through batch) I just can't figure out how to combine them.
Thank you,
Julie Kimmel
Rick Martin
Hi Julie,
I'm sure there are other ways to do this, but here's what we do. In the bat file, we call the TCL script using parameters passed into the bat file. The %1 is the site id and %2 is the filename for the TCL script. Here's what's in the bat file:
call quovadxqdx5.3integratorsbinsetroot quovadxqdx5.3integrator %1
cd quovadxqdx5.3integratorbin
hcitcl %2
In the TCL script, we have a proc to check the status of a thread:
proc isThreadUp {tname} {
set reply [msiGetStatSample tname]
catch {keylget reply PSTATUS} result
if {$result == "up"} {
return 1
} else {
return 0
}
}
and also procs to start and stop threads:
proc startThread {pname tname} {
set cmd "pstart"
catch {exec cmd.exe /c hcicmd -p $pname -c "$tname $cmd"} result
}
proc stopThread {pname tname} {
set cmd "pstop"
catch {exec cmd.exe /c hcicmd -p $pname -c "$tname $cmd"} result
}
At the beginning of the TCL script you also need to have:
msiAttach
I hope that helps.
Rick