cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2164
Views
0
Helpful
5
Replies

Cisco Switch TCL SMTP timeout

peraocompany
Level 1
Level 1

Hello I have some problem with cisco switch if i use SMTP event over TCL.

My TCl scrip contain code:

if [catch {smtp_send_email $mail_msg} result] {

error $result $errorInfo

#code for dump to file

} else {#code if all ok}

If internet is work script work fine. but if internet is down switch try send message long time and script "Process Forced Exit"

I have error

Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: Process Forced Exit- MAXRUN timer expired.
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl:     while executing
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: "error $result $errorInfo"
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl:     invoked from within
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: "$slave eval $Contents"
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl:     (procedure "eval_script" line 7)
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl:     invoked from within
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: "eval_script slave $scriptname"
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl:     invoked from within
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: "if {$security_level == 1} {       #untrusted script
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl:      interp create -safe slave
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl:      interp share {} stdin slave
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl:      interp share {} stdout slave
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: ..."
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl:     (file "tmpsys:/lib/tcl/base.tcl" line 50)
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: Tcl policy execute failed:
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: Process Forced Exit- MAXRUN timer expired.

I try change Maxrun timer but it not help (i have same error but it not print before time not end).

I try ios for switch 150-2.SE4 | 122-55.SE8 | 122-44.6

I try this code on cisco router, it work fine(if smtp server not avalable script print error 1-2sec).

Thank you.

1 Accepted Solution

Accepted Solutions

No, that is not possible since the client socket connection is attempted synchronously.

View solution in original post

5 Replies 5

Joe Clarke
Cisco Employee
Cisco Employee

If the mailer server is not listening on tcp/25 or otherwise refuses the connection, then the socket attempt should die quickly.  If the mail server is truly unreachable, then the socket will never timeout until the EEM policy terminates.  This holds true on the latest version of EEM on routers as well.

Thank you Joseph.

Possible skip in script line

if [catch {smtp_send_email $mail_msg} result] {}

if it run more 10sec?

I have lab test on router, I have same problem (like on switch) if SMTP server not available.

No, that is not possible since the client socket connection is attempted synchronously.

Thank you Joseph.

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: