cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1478
Views
0
Helpful
6
Replies
Sergio Garrido
Beginner

Router no memory when run tcl

Hi Friends,

 

First of all I thank all the shared information in this community, it is very helpful.

I need help with my lab of Router GUI on tcl.

My issue description is follows:

  •  I enable a web server on router with .tcl file, It works.
  •  I create other .tcl, for example, showclock.tcl and copied it to the flash on router. 
  •  I can access one time in my page, in my browser I put router_ip/showclock.tcl and show me the clock of the router.
  •  I did some changes on my .tcl file to add other function, for example, show  version of the router. I copied it to the router flash r. Go in my browser, put the router_ip/showclock.tcl and nothing happen.
  • After seconds in the router console I recieve this logs:

*Mar 31 16:15:52.507: %HA_EM-6-LOG: http_server.tcl: error reading "sock2": broken pipe
*Mar 31 16:15:52.507: %HA_EM-6-LOG: http_server.tcl:     while executing
*Mar 31 16:15:52.511: %HA_EM-6-LOG: http_server.tcl: "gets $httpsock"
*Mar 31 16:15:52.511: %HA_EM-6-LOG: http_server.tcl:     invoked from within
*Mar 31 16:15:52.511: %HA_EM-6-LOG: http_server.tcl: "$slave eval $Contents"
*Mar 31 16:15:52.511: %HA_EM-6-LOG: http_server.tcl:     (procedure "eval_script" line 7)
*Mar 31 16:15:52.515: %HA_EM-6-LOG: http_server.tcl:     invoked from within
*Mar 31 16:15:52.515: %HA_EM-6-LOG: http_server.tcl: "eval_script slave $scriptname"
*Mar 31 16:15:52.515: %HA_EM-6-LOG: http_server.tcl:     invoked from within
*Mar 31 16:15:52.515: %HA_EM-6-LOG: http_server.tcl: "if {$security_level == 1} {       #untrusted script
*Mar 31 16:15:52.515: %HA_EM-6-LOG: http_server.tcl:      interp create -safe slave
*Mar 31 16:15:52.515: %HA_EM-6-LOG: http_server.tcl:      interp share {} stdin sl
R1#ave
*Mar 31 16:15:52.515: %HA_EM-6-LOG: http_server.tcl:      interp share {} stdout slave
*Mar 31 16:15:52.515: %HA_EM-6-LOG: http_server.tcl: ..."
*Mar 31 16:15:52.515: %HA_EM-6-LOG: http_server.tcl:     (file "tmpsys:/lib/tcl/base.tcl" line 50)
*Mar 31 16:15:52.515: %HA_EM-6-LOG: http_server.tcl: Tcl policy execute failed:
*Mar 31 16:15:52.515: %HA_EM-6-LOG: http_server.tcl: No memory

I think this issue related to memory of the router, but I increase the memory and the issue still persist.

Whats Can I do to avoid this problem?

My Lab enviroment is GNS3, I use 7200 router with 512 of memory. Also I try in phisical router 819 with 512 memory and recivied the same errors

and %SYS-2-MALLOCFAIL.

Thanks in advance for the help.

Attached some prints.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Sergio

I have tried to reproduce the issue on Cisco 2811 router. it didn't show up the requested page but there was something different on mine. The logs you mentioned before, it didn't occur on my router. I am looking for the script, whether I can do some tunning to fix this

 

 

thanks

ananto

View solution in original post

6 REPLIES 6

Can you share the tcl scripts? so I can reproduce in my lab

 

thanks

nanto

Hi Nanto,

Attach the tcl script. 

I hope your comments

 

thanks in advance


Sergio

 

Joe Clarke
Hall of Fame Cisco Employee

There very well could be a memory leak in the http_server.tcl script.  You may want to have a look at the http://www.cisco.com/assets/cdc_content_elements/docs/ios/eas/easy-httx.tar implementation.  It has probably received more testing.

Hi Joseph,

 


Thanks very much for your time.

I'm testing with easy_http_server and we'll let you know the results
Had found the cisco live 2012 document in which you participated, I get excited and I want to try in my lab enviroment.

I want to thank you for helpful documents that you posted on the forum and  for taking the time to help us, the mortlas. :)

Best regards,

 

Sergio Garrido

Hi Sergio

I have tried to reproduce the issue on Cisco 2811 router. it didn't show up the requested page but there was something different on mine. The logs you mentioned before, it didn't occur on my router. I am looking for the script, whether I can do some tunning to fix this

 

 

thanks

ananto

View solution in original post

Hi nanto,

 

Thanks very much for your time to do the test.

Attached the http_server.tcl to enable the web server and test the showclock.tcl on the router.
Yo should copy the http_server.tcl in your router and uses EEM to run this.
Summary steps:
* copy tftp:http_server.tcl flash:
*event manager directory user policy flash:
*event manager policy http_server.tcl
*event manager run http_server.tcl

This procedure should show you the showclock.tcl page

Best

Sergio Garrido

Content for Community-Ad