Skip to main content
Umer221
Staff
Staff
Apr 17, 2025 4:10 PM UTC

Troubleshooting Tip: Error 'Entry not found in datasource' when adding an address object via CLI

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.

    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