02-22-2017 09:19 PM
hi guys,
I have an existing script and now i upload and run it, and it getting an error. i tried to modify based on the error giving from the log and upload again and retry upload but still same. can someone advise? Did i miss anything?
Feb 23 04:17:03.846: %HA_EM-6-LOG: op_tr.tcl: can't read "arr_einfo(msg)": no such element in array
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: can't read "arr_einfo(msg)": no such element in array
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: while executing
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: "set syslog_msg $arr_einfo(msg)"
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: invoked from within
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: "$slave eval $Contents"
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: (procedure "eval_script" line 7)
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: invoked from within
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: "eval_script slave $scriptname"
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: invoked from within
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: "if {$security_level == 1} { #untrusted script
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: interp create -safe slave
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: interp share {} stdin slave
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: interp share {} stdout slave
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: ..."
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: (file "tmpsys:/lib/tcl/base.tcl" line 50)
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: Tcl policy execute failed:
Feb 23 04:19:03.840: %HA_EM-6-LOG: op_tr.tcl: can't read "arr_einfo(msg)": no such element in array
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Below is snippet of the scripts
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#::cisco::eem::event_register_syslog tag 1 pattern "BGP-5-ADJCHANGE: neighbor 10.233.254.* Up" occurs 1 maxrun 100
#::cisco::eem::event_register_syslog tag 1 pattern "Line protocol on Interface Tunnel0, changed state to up" occurs 1 maxrun 100
:cisco::eem::event_register_timer watchdog time 120 name crc maxrun 999999
#::cisco::eem::event_register_none
#event timer cron cron-entry "0 0 * * *" maxrun 9999999
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
###10 Sec delay
proc reset_bgp {} {
if [catch {cli_exec $cli1(fd) "conf t"} _cli_result] {
error $_cli_result $errorInfo
}
if [catch {cli_exec $cli1(fd) "router bgp 4788"} _cli_result] {
error $_cli_result $errorInfo
}
############################################
if [catch {cli_open} result] {
error $result $errorInfo
} else {
array set cli1 $result
}
if [catch {cli_exec $cli1(fd) "enable"} _cli_result] {
error $_cli_result $errorInfo
}
if [catch {cli_exec $cli1(fd) "cisco123"} _cli_result] {
error $_cli_result $errorInfo
}
reset_bgp
after 10000
reset_isis
after 10000
reset_ldp
after 10000
reset_subinterface
after 10000
reset_interface
after 10000
clear_bgp
after 10000
clear_isis
after 10000
clear_ldp
after 10000
if [catch {cli_exec $cli1(fd) "exit"} _cli_result] {
error $_cli_result $errorInfo
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
03-01-2017 12:41 AM
This forum for Cisco TCL IVR queries. For EEM Script queries , please post in below forums.
https://supportforums.cisco.com/community/5941/eem-scripting
Thanks,
Raghavendra
03-01-2017 01:09 AM
HI
you can disregard this discussion
thanks
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