Troubleshooting¶
This document addresses common issues encountered when connecting OWL CLI and OWL MCP Server.
CLI: Prompt owl not found¶
Symptom:
Resolution:
- Windows: Close the current PowerShell window and reopen it before executing the command again.
- Linux / macOS: Close the current terminal window and reopen it before executing the command again.
- Verify that the executable file exists in the default installation directory.
Default executable paths:
- Windows:
%LOCALAPPDATA%\Programs\owl\owl.exe - Linux / macOS:
$HOME/.local/bin/owl; falls back to/usr/local/bin/owlif the default path is not writable.
Automatic Installation: AI tool cannot execute commands¶
Cause: The current AI tool does not have terminal command execution permissions, or the current environment prohibits writing to local configurations.
Resolution:
- Switch to an AI tool that supports terminal command execution.
- Or use manual installation instead.
Automatic Installation: Temporary authorization code is invalid, expired, or not authorized¶
Cause: OWL_TEMP_CODE has expired, has already been used, was copied incorrectly, or the current account does not have permission to generate an authorization code.
Resolution:
- Regenerate a temporary authorization code in the TrueWatch console.
- Re-execute the installation command from the automatic installation guide.
- Do not reuse an
OWL_TEMP_CODEthat has already been used.
Automatic Installation: Endpoint mismatch¶
Cause: OWL_REGISTRY_ENDPOINT is inconsistent with the site of the workspace, or /api/v1 was incorrectly appended to the endpoint.
Resolution:
- Select the OWL CLI Endpoint for the node where the workspace is located.
- Set
OWL_REGISTRY_ENDPOINTto only the root address of the endpoint. - For private deployment environments, use the OWL CLI Endpoint provided by the actual deployment.
CLI: Authentication failed or unable to reach the endpoint¶
Check the following:
- Is
OWL_REGISTRY_ENDPOINTset to the OWL CLI Endpoint of the current site? - Was
/api/v1incorrectly appended to the endpoint? - Is the access token valid? Both
OWL_API_KEYandOWL_TOKENcan be used as access tokens. When both are set,OWL_API_KEYtakes precedence. - Does the API Key have the corresponding Open API permissions?
- Can the current terminal reach the OWL CLI Endpoint?
CLI: HTTPS certificate verification failed¶
If a self-signed certificate is used in a local development or private test environment, the CLI may return x509: certificate signed by unknown authority. First, try to install a trusted CA for the system. If this is not possible, you can temporarily disable certificate verification:
This configuration turns off registry identity verification, which may expose the system to man-in-the-middle attacks. It should only be used in controlled development environments and must not be enabled in production. To re-enable verification, run owl config set registry.insecure_skip_verify false.
CLI: Long-running query times out prematurely¶
If a data query returns context deadline exceeded, first check the network and registry status, then inspect registry.request_timeout. This value is in milliseconds and defaults to 150000. The server-side limit for data query tools is 130 seconds, so it is not recommended to set the client-side total timeout to a shorter value.
Increasing the client timeout does not extend the server-side query deadline. If the query still fails, narrow the time range, reduce the amount of data returned, or simplify the query conditions.
CLI: Prompt tool not found¶
Cause: The tool is not in the local cache, or the tool name was entered incorrectly.
Resolution:
Confirm the tool name and re-execute.
CLI: Prompt category not found¶
Cause: The category name does not exist or has not been synchronized yet.
Resolution:
CLI: Prompt missing required parameter¶
Cause: A required parameter is missing.
Resolution:
Fill in the required parameters according to the tool definition and re-execute.
CLI: Prompt unknown parameter¶
Cause: The parameter name does not match the tool definition.
Resolution:
Verify the parameter names and re-execute.
CLI: owl validate returns validation failure¶
owl validate only performs a pre-check and does not invoke the target tool. The request_executed field in the JSON result should always be false.
First, distinguish between a failed validation result and a failed validation command:
- If the JSON contains
valid: false, do not execute the tool. Correct the parameters based on thekindandcodein theissuesarray. - If the command exits with a non-zero status code or does not output a validation JSON result, the validation is incomplete. Do not execute the tool. After troubleshooting synchronization, authentication, network, or registry availability, run the validation again.
For valid: false results, handle based on the kind and code in issues:
tool/tool_not_found: First runowl sync, then ensure the tool name exactly matches the output ofowl list.parameter/invalid_arguments: Correct missing parameters, incorrect types, or unknown parameters all at once based on the list of issues.dql_syntax/dql.parseError: Correct thequery_textofowl.data.query.generated_dql/dql.builderError: Correct theselect_clause,where_clause, orgroup_by_clauseof the simple query. Do not retry with the same parameters.
If the validate command is not available, upgrade to version 1.2.0 or later. Pre-check for DQL generation from simple queries requires version 1.2.1 or later.
CLI: Results are empty or not as expected¶
Check in the following order:
- Use
owl show <tool_name>to verify the parameter definitions. - Use
owl list -c <category_id>to confirm that the correct tool is being executed. - Run
owl syncto refresh the local cache. - Check whether the query time range is correct. Time parameters should be 13-digit millisecond timestamps.
- Check whether the API Key has the Open API permissions for the corresponding resource.
MCP: Client connection fails¶
Check the following:
- Is the MCP type configured as
streamableHttp? - Is the URL the OWL MCP Endpoint for the current site?
- Does the URL end with
/mcp? - Does the request header include
Authorization: Bearer <API Key>? - Can the client's network reach the OWL MCP Endpoint?
MCP: Authentication failure¶
Check the following:
- Is the API Key copied correctly?
- Is the Authorization Header format correct?
- Has the API Key been disabled, deleted, or rotated?
- Does the workspace associated with the API Key match the workspace you are trying to access?
Request header format:
Note: The
/mcpendpoint authenticates before establishing the event stream. If credentials are missing or invalid, it directly returns an HTTP401 Unauthorized(with aWWW-Authenticate: Bearer realm="mcp"response header) without opening thetext/event-streamevent stream. Therefore, if the client reports "connected but the event stream is empty", first confirm whether it actually received a 401. This is usually an authentication issue, not an empty stream. Correct the credentials based on the 401 and theWWW-Authenticateheader, then retry.
MCP: Tool list is empty¶
Possible causes:
- The MCP client did not successfully connect to the service.
- The API Key is invalid or has insufficient permissions.
- The client did not refresh the MCP tool list.
- The endpoint was selected incorrectly.
Resolution:
- Re-test the MCP connection in the client.
- Confirm that the endpoint matches the workspace site.
- Confirm that the Authorization Header is correct.
- Reload or restart the MCP client.
MCP: Tool call returns a permission error¶
Cause: The API Key does not have the corresponding Open API permissions.
Resolution:
- Check the API Key's permission scope.
- For read-only scenarios, grant the corresponding query permissions.
- For write scenarios, grant the corresponding write permissions.
- It is not recommended to configure overly broad API Key permissions for an agent.
MCP: Tool call returns an empty result¶
Check in the following order:
- Is the query time range correct?
- Do the selected data domain, source, field, and index exist?
- Is it necessary to first call discovery tools, such as
owl.metric.listorowl.log_index.list? - Does the API Key have read permissions for that data scope?
- Does the corresponding data actually exist in the current workspace?
MCP: Write operation is blocked or not effective¶
Possible causes:
- The API Key does not have write permissions.
- The client is configured with manual confirmation but the confirmation was not provided.
- The parameter structure does not conform to the tool requirements.
- There are approval or audit restrictions on the workspace side.
Resolution:
- Verify the tool parameters.
- Verify the API Key permissions.
- Check whether the client is waiting for manual confirmation.
- Check the workspace-side approval, audit, or permission configurations.