FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Umer221
Staff
Staff
Article Id 387358
Description This article describes how to troubleshoot the error 'entry not found in datasource' encountered when selecting an address object with spaces in its name using the CLI on FortiGate.
Scope FortiOS, FortiGate.
Solution

The error 'entry not found in datasource' may occur in the CLI when attempting to select an address object that includes a space in its name.

 

This issue is specific to address objects with space characters in their names. It can be reproduced during CLI operations where address objects are assigned to firewall policy fields or any other fields where required.

  

Following screenshot demonstrates the parsing error that occurs when a space is included in the address object name.

 

                                                       Entry Not Found.png

Solutions and Workarounds:

 

  1. Use quotes around the full name with a space:

set srcaddr "Test Address"

 

This is the correct syntax and will work if the address object exists with that exact name.

 

  1. Use tab-completion to auto-fill the address object:

Begin typing part of the name and press Tab. If unique, the CLI will auto-complete the name, replacing the space with a backslash (\):

 

set srcaddr Test\ Address

 

This method avoids typing the full quoted name and ensures the correct object is selected depending on how many address object match the similar name.

 

  1. Avoid using spaces in object names:

For proper CLI object naming conventions to avoid parsing errors, refer to CLI Basics - FortiGate administration guide.

 

This will prevent CLI parsing issues and improve script readability.

 

Related article:
CLI basics - FortiGate administration guide.