Skip to main content
SSC_Seb
New Member
Apr 11, 2017 5:08 PM UTC
Solved

"Configuration File Error" when trying to upload CLI script - works fine on CLI?

Hey all

 

Trying to automate a few things so I made a script that makes a script that makes the many objects I need to create on a regular basis. The problem is that whatever I do, I can't get the "Upload bulk CLI file" to take my CLI script, all I get is "configuration file error". Pasting the whole script on the CLI works fine and behaves exactly as expected, so I have no idea what the GUI upload function is going on about. Here's a super simple CLI script I made for testing:

 

config firewall address
edit "Blocked-IP-22.222.22.222"
set subnet 22.222.22.222 255.255.255.255
next
edit "Blocked-IP-222.22.222.22"
set subnet 222.22.222.22 255.255.255.255
next
edit "Blocked-IP-11.111.11.111"
set subnet 11.111.11.111 255.255.255.255
next
edit "Blocked-IP-111.11.111.11"
set subnet 111.11.111.11 255.255.255.255
next

end

 

4 simple address objects to create. Even if they exist, this doesn't produce any error on CLI since it's just editing existing objects anyway. GUI though, "configuration file error" and I can't really find anything on bulk scripts except that you just put the commands in the file and away you go. But it doesn't go. Why?

 

 

ede_pfau
ede_pfauAnswer
SuperUser
Apr 11, 2017 5:15 PM UTC

hi,

 

I've just uploaded your script to my 60E, running v5.4.4, without any problems.

To debug bulk scripts:

1- connect via ssh or serial Console

2- enter 'diag deb en'

3- enter 'diag deb cli 7'

4- upload bulk script

 

You will see each line of the script echoed in the terminal, with "0:" prepended if successful and a negative number if not. You should see an error message then.

 

Finally,

5- diag deb cli 3

6- diag deb dis

 

9 replies

ede_pfau
SuperUser
ede_pfauAnswer
SuperUser
Apr 11, 2017 5:15 PM UTC

hi,

 

I've just uploaded your script to my 60E, running v5.4.4, without any problems.

To debug bulk scripts:

1- connect via ssh or serial Console

2- enter 'diag deb en'

3- enter 'diag deb cli 7'

4- upload bulk script

 

You will see each line of the script echoed in the terminal, with "0:" prepended if successful and a negative number if not. You should see an error message then.

 

Finally,

5- diag deb cli 3

6- diag deb dis

 

Translate
SSC_Seb
SSC_SebAuthor
New Member
Apr 11, 2017 5:20 PM UTC

That was useful. Unexpected output from the debug:

 

FGT1 # cmd=â–’â–’c -61: â–’â–’c FGT1 # Backtrace: [0x08b64ea8] => /bin/httpsd [0x0834422a] => /bin/httpsd [0x08b64c1f] => /bin/httpsd [0x400a0ef8] => ../lib/libc.so.6 liboffset 0001cef8

 

Given the weird format, I checked my script file and let's just say the encoding was very strange (WTH is UCS 2 BE BOM?). Switched it to UTF-8, uploaded, works fine. Now to look at my master script and get it to set the encoding properly... Thanks for the help!

Translate
ede_pfau
SuperUser
SuperUser
Apr 11, 2017 5:21 PM UTC

Some editors include a BOM right at the start of the file to indicate the UTF encoding. FOS of course chokes on that.

Talk to your editor :)

Translate
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024