cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2421
Views
0
Helpful
8
Replies

Tcl Script Check Please Pt1

Hello Community,

I've compiled the attached script with the help of others from this forum.

During the registration I get the following error:

Router(config)#even ma p ISPTest.tcl

Compile check and registration failed:syntax error in expression "$arr_einfo(condition) == Occurred"

    ("if" test expression)

    while compiling

"if {$arr_einfo(condition) == Occurred} {

    if [catch {cli_open} result] {

        error $result $errorInfo

    } else {

        array set cli1 $res..."

Tcl policy execute failed: syntax error in expression "$arr_einfo(condition) == Occurred"couldn't compile policy file to bytecode: Unknown error 0

Embedded Event Manager configuration: failed to retrieve intermediate registration result for policy ISPTest.tcl: Unknown error 0

I wonder if someone could take a look at the script and let me know how I might fix it?

Cheers

1 Accepted Solution

Accepted Solutions

Try this version.              

View solution in original post

8 Replies 8

Joe Clarke
Cisco Employee
Cisco Employee

Try this version.

Joseph,

Thanks ever-so-much for responding.

I will check out your version and let you if it works?

Cheers mate

Sent from Cisco Technical Support iPad App

Hi Joseph,

I tried your script. However, I'm getting the following error message when I try to register the script

Router(config)#even man p ISPTest.tcl

Compile check and registration failed:invalid command name "::cisco::eem::event_register_ipsla"

    while executing

"::cisco::eem::event_register_ipsla operation_id 102 reaction_type timeout

"

Tcl policy execute failed: invalid command name "::cisco::eem::event_register_ipsla"

Embedded Event Manager configuration: failed to retrieve intermediate registration result for policy ISPTest.tcl: Unknown error 0

Router(config)#

Hello Joseph,

It worked!

I was trying to register on router that didn't support event ip sla.

Star man.


Cheers mate.

Joseph,

While carrying out a full test with the script I incurred the following error:

*Feb  2 19:47:58.511: %HA_EM-6-LOG: ISPTest.tcl: Primary Internet Circuit UP

*Feb  2 19:47:58.515: %HA_EM-6-LOG: ISPTest.tcl: can't read "cli1(fd)": no such variable

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl:     while executing

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl: "cli_exec $cli1(fd) "enable""

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl:     invoked from within

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl: "$slave eval $Contents"

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl:     (procedure "eval_script" line 7)

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl:     invoked from within

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl: "eval_script slave $scriptname"

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl:     invoked from within

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl: "if {$security_level == 1} {       #untrusted script

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl:      interp create -safe slave

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl:      interp share {} stdin slave

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl:      interp share {} stdout slave

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl: ..."

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl:     (file "tmpsys:/lib/tcl/base.tcl" line 50)

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl: Tcl policy execute failed:

*Feb  2 19:47:58.519: %HA_EM-6-LOG: ISPTest.tcl: can't read "cli1(fd)": no such variable

I wonder if you could take another look and let me know where it might be going wrong?

Cheers

Carlton

Try this version.              

Hi Joseph,

Going to try it now.

Will let you know.

Thanks in advance

Joseph,

Perfect.

Cheers mate.

Carlton

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco