08-25-2013 10:58 PM
Hello I need help, my Cisco Router (2921) work not correct with tcl script.
Tcl script work fine on this device long time, but in one time script was not start get error(no any script changes):
005495: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: Unknown error 2620
005496: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: while executing
005497: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: "close $myfileid"
005498: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: invoked from within
005499: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: "$slave eval $Contents"
005500: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: (procedure "eval_script" line 7)
005501: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: invoked from within
005502: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: "eval_script slave $scriptname"
005503: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: invoked from within
005504: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: "if {$security_level == 1} { #untrusted script
005505: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: interp create -safe slave
005506: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: interp share {} stdin slave
005507: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: interp share {} stdout slave
005508: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: ..."
005509: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: (file "tmpsys:/lib/tcl/base.tcl" line 50)
005510: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: Tcl policy execute failed:
005511: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: Unknown error 2620
If I try do command it not help:
no event manager policy event.tcl
event manager policy event.tcl
I try reload script in router, and every time then script was start, some part of script file was deleted (it very intrusting, because i think script in flash only read (not write))
Only reload help, auto reload script work fine.
Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.1(4)M6, RELEASE SOFTWARE (fc2)
08-26-2013 08:03 AM
Without seeing the Tcl policy, it's difficult to understand what might be going on. While the stack trace is clear, I do not understand the rest of your problem.
08-26-2013 12:27 PM
hello Joseph, this TCL script work long time with out any problem and with out any changes.
On this device I change configuration (add two EEM aplet with event tag syslog pattern) auto this modification i have problem. May be I try do all my configuration on TCL script.
I add EMM (it work with out any problem):
event manager applet RESET-3G-S
event tag 1.0 syslog pattern "%TRACKING-5-STATE: 2 ip sla 2 reachability Up->Down"
***
event manager applet 3G-EEM-STOP
event tag 1.0 syslog pattern "%TRACKING-5-STATE: 2 ip sla 2 reachability Down->Up"
***
My scipt have syslog patern:
::cisco::eem::event_register_syslog tag 1 pattern ".*SEC_LOGIN-4-LOGIN_FAILED: Login failed.*" occurs 1 maxrun 50
::cisco::eem::event_register_syslog tag 2 pattern ".*%SEC_LOGIN-5-LOGIN_SUCCESS: Login Success*" occurs 1
::cisco::eem::event_register_syslog tag 3 pattern ".*%SYS-5-RESTART.*" occurs 1
::cisco::eem::trigger {
::cisco::eem::correlate event 1 or event 2 or event 3
::cisco::eem::attribute tag 1 occurs 1
::cisco::eem::attribute tag 2 occurs 1
::cisco::eem::attribute tag 3 occurs 1
}
Tahnk you
08-26-2013 02:14 PM
Please post the full Tcl script.
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