- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Why is batch import rules failing?
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×
Sign in with your Check Point UserCenter/PartnerMap account to access more great content and get a chance to win some Apple AirPods! If you don't have an account, create one now for free!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jump to solution
Why is batch import rules failing?
Any idea what is going wrong with this batch operation to add a couple of rules?
C:\Users\admin>mgmt_cli -m 172.27.254.180 -u api_user -p ****** add access-rule -b rule2.csv
Error occured during parsing of CSV file.
Line 1 column 6: Unexpected character in the end of line.
Failed to read parameters file [rule2.csv]: Invalid format
C:\Users\admin>more rule2.csv
layer,position,source,destinaton,service,action
Network,bottom,keith,lab.local-ad,http,accept
Network,bottom,lab.local-ad,keith,smtp,drop
Labels
- Labels:
-
Access Policy
-
General
-
Object Management
1 Solution
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Robert - turns out that Notepad++ had created my file encoded with UCS-LE BOM. I don't recognize it so switched to UTF-8 and the errors disappeared!
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please ensure that each line ends with CRLF characters -
"endline can be \n - in Linux or \r\n - in Windows, therefore after \r we expect \n othrwise input is invalid"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Robert - turns out that Notepad++ had created my file encoded with UCS-LE BOM. I don't recognize it so switched to UTF-8 and the errors disappeared!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Probably end of the line issue.
What editor have you used to create the CSV?
Take a look here for possibilities to modify the EOLs:
