6 Errors and Troubleshooting

This chapter discusses the likely errors that can arise when using Telemetry Streaming and how to fix them.

The following sections provide an overview of the potential errors and the troubleshooting steps required to resolve them.

Workspace Management Errors

Error Example Troubleshooting

ORA-00959: tablespace 'TBS' does not exist

SQL> exec dbms_telemetry_workspace.create_workspace('workspace1','tbs');
BEGIN dbms_telemetry_workspace.create_workspace('workspace1','tbs'); END;
 
*
ERROR at line 1:
ORA-00959: tablespace 'TBS' does not exist

Tablespace for the workspace should be created before creating the workspace.

ORA-20004: "ADMIN1":user does not exist

SQL> exec dbms_telemetry_workspace.enable_workspace_admin('workspace1','admin1');
BEGIN dbms_telemetry_workspace.enable_workspace_admin('workspace1','admin1'); END;
 
*
ERROR at line 1:
ORA-20004: "ADMIN1":user does not exist

Admin user should be created before enabling for the workspace. It is not created by the PL/SQL API.

Resolution: Create a DB user 'admin1' with connect privilege and retry the operation.

ORA-20012: "WORKSPACE1": has users. use force=>true

SQL> exec dbms_telemetry_workspace.drop_workspace('workspace1');
BEGIN dbms_telemetry_workspace.drop_workspace('workspace1'); END;
 
*
ERROR at line 1:
ORA-20012: "WORKSPACE1": has users. use force=>true

Workspaces with active users cannot be dropped without 'force' option being 'true'.

Workspace Administration Errors

Error Example Troubleshooting

ORA-44001: invalid schema

SQL> exec dbms_telemetry_admin.enable_workspace_user('workspace1','user1','INGEST');
BEGIN dbms_telemetry_admin.enable_workspace_user('workspace1','user1','INGEST'); END;
 
*
ERROR at line 1:
ORA-44001: invalid schema

Ingest or query user should be created before enabling for the workspace.

Resolution: Create a DB user 'user1' with connect privilege and retry the operation.

ORA-20008: inges: invalid role

SQL> exec dbms_telemetry_admin.enable_workspace_user('workspace1','user2','INGES');
BEGIN dbms_telemetry_admin.enable_workspace_user('workspace1','user2','INGES'); END;
 
*
ERROR at line 1:
ORA-20008: inges: invalid role

The role can be only one of 'ingest', 'query' or 'ingest|query'.

Resolution: Correct the role to a valid value.

ORA-20010: "USER1": already added to workspace "WORKSPACE1"

SQL> exec dbms_telemetry_admin.enable_workspace_user('workspace1','user1','INGEST');
BEGIN dbms_telemetry_admin.enable_workspace_user('workspace1','user1','INGEST'); END;
 
*
ERROR at line 1:
ORA-20010: "USER1": already added to workspace "WORKSPACE1"

User can be added to only one of the workspaces and only once.

Note:

For changing the role of an already assigned user, disable the user from the workspace and re-enable with new role.

Ingest Errors

Issue Example Troubleshooting

Metrics not ingested because the time epoch is not in the last one hour. Older metrics are discarded.

begin
   dbms_output.put_line(dbms_telemetry_ingest.ingest_metrics(
                                'speed',
                                '{"type":"car","unit":"mph"}',
                                100,
                                1000));
end;
/
{"metrics_data_size":60,"metrics_ingested":0,"metrics_given":1,"metrics_metadata
":0,"ingest_duration_ms":10,"ingest_format":"telemetry","ingest_method":"plsql
","ingest_user_name":"\"USER1\""}

Issue: "metric_ingested":0 implies that no rows were ingested.s

Resolution: The metrics time should be greater than 3600 seconds from the time of ingestion and less than equal to current time.

PromQL Errors

Error Example Troubleshooting

ORA-52002: PromQL error: start time and end time cannot be zero for range or point queries.

SQL> select dbms_telemetry_query.promql_instant('node_cpu_load{tag!~"1|2"}',0) from dual;
   ERROR:
   ORA-52002: PromQL error: start time and end time cannot be zero for range or point queries

Passing start time and end time as 0 for Instant/Range PromQL query.

ORA-00067: invalid value 0 for parameter step size; must be at least 1.

SQL> select dbms_telemetry_query.promql_range('node_cpu_load{tag=~"8|3"}',1389312600 - 500, 1389312600,0) from dual;
   ERROR:
   ORA-00067: invalid value 0 for parameter step size; must be at least 1

Passing Step Size that is less than or equal to zero for range PromQL query.

ORA-52002: PromQL error: Aggregate functions are not used with Series Query.

SQL> select dbms_telemetry_query.promql_series('avg(node_cpu_load{tag="3"})', 0, 0) from dual;
   ERROR:
   ORA-52002: PromQL error: Aggregate functions are not used with Series Query

Using aggregate or aggregate-by operator for label/series PromQL query.

ORA-52002: PromQL error: Unknown Expr Node type passed for Label query. Expr Node type 1.

SQL> select dbms_telemetry_query.promql_label('avg(node_cpu_load{tag="3"})', 0, 0) from dual;
   ERROR:
   ORA-52002: PromQL error: Unknown Expr Node type passed for Label query. Expr Node type 1

Using aggregate or aggregate-by operator for label/series PromQL query.

ORA-52002: PromQL error: Incorrect result type passed as input

SQL> select dbms_telemetry_query.promql_label('tags', 0, 0, 8) from dual;
   ERROR:
   ORA-52002: PromQL error: Incorrect result type passed as input

Passing invalid result_type values for PromQL query.

ORA-52002: PromQL error: Unknown Expr Node type passed for Label query. Expr Node type 5

SQL> select dbms_telemetry_query.promql_label('irate(node_cpu_load{tag="3"}[8m])', 0, 0) from dual;
   ERROR:
   ORA-52002: PromQL error: Unknown Expr Node type passed for Label query. Expr Node type 5

Applying rate/irate functions in PromQL label or series-based queries.

ORA-52002: PromQL error: rate/irate functions are not used with Series Query

SQL> select dbms_telemetry_query.promql_series('rate(node_cpu_load{tag="3"}[8m])', 0, 0) from dual;
   ERROR:
   ORA-52002: PromQL error: rate/irate functions are not used with Series Query

Applying rate/irate functions in PromQL label or series-based queries.