05-09-2011 02:28 PM
I have a question regarding TCL and/or EEM.
A script with udp_open would execute when started manualy but if it is published as policy there are errors:
103894: *May 9 12:20:21.176 UTC: %HA_EM-6-LOG: time.tcl: (file "tmpsys:/lib/tcl/base.tcl" line 50)
103895: *May 9 12:20:21.176 UTC: %HA_EM-6-LOG: time.tcl: Tcl policy execute failed:
103896: *May 9 12:20:21.176 UTC: %HA_EM-6-LOG: time.tcl: invalid command name "udp_open"
103897: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: invalid command name "udp_open"
103898: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: while executing
103899: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: "udp_open"
106300: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: invoked from within
106301: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: "$slave eval $Contents"
106302: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: (procedure "eval_script" line 7)
106303: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: invoked from within
106304: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: "eval_script slave $scriptname"
106305: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: invoked from within
106306: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: "if {$security_level == 1} { #untrusted script
106307: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: interp create -safe slave
106308: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: interp share {} stdin slave
106309: *May 9 12:20:22.123 UTC: %HA_EM-6-LOG: time.tcl: interp share {} stdout slave
Does anyone have an idea what's wrong?
Thank you in advance for taking the time to respond.
05-09-2011 03:22 PM
EEM does not currently support UDP sockets. I have filed CSCth34807 requesting support to be ported.
05-09-2011 03:34 PM
Hi Joseph,
in the bug details it says that there is a workaround for this:
Workaround:
Use an EEM policy to wrap the execution of a Tcl shell script which can then open UDP sockets
Do you know how do I do that?
Thanx again!
05-09-2011 03:35 PM
Write a tclsh policy that you invoke from EEM using (for example):
action 002 cli command "tclsh flash:/udp_script.tcl"
05-09-2011 03:47 PM
Thank you!
I will give that a try.
Regards.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide