Skip to main content
rafaesp
New Member
February 14, 2018
Question

Error running large script

  • February 14, 2018
  • 1 reply
  • 8485 views

I'm trying to develop a script to create a large amount of firewall policies but I'm getting the error "Broken Pipe" when the script is larger than ~260kb. To send the script, I'm using a library available with my programming language to open a ssh connection and send the commands but the connection is broken immediately when the command is larger than those ~260kb.

 

I'm testing against FortiWiFi-60D v5.2.3.

 

Any idea of what may be happening? Thanks a lot.

    1 reply

    emnoc
    New Member
    February 14, 2018

    Are you sure it's the script or  the size? If you cut the script down in half and execute partA and then partB does it work? Do you have compression enabled ? ( if yes try turning it off ) and  the same for the option TcpKA? ( enable it or disable it and see if the output changes )

     

    I never seen scripts that big,  but have create  in excess of  3K objects and addrgrp and never had errors using bash or piping thru ssh  and various ssh clients seems to be better or less  ( i.e OpenSSH )

     

     

     

    ede_pfau
    SuperUser
    SuperUser
    February 14, 2018

    Seriously, thousands of policies on a FG-60D??

    Have you checked that against the Maximum Values Matrix, for instance here http://help.fortinet.com/fgt/56/max-values/5-6-3/max-values.html ?

    OK it says 5.000 policies hard limit but I guess you'll run into memory issues far below that.

    rwpatterson
    New Member
    February 14, 2018

    The Max values matrix referenced is for a different firmware level. May be different on 5.2.x.