alibaba/arthas · error · IllegalArgumentException
delete operation requires index parameter
Error message
delete operation requires index parameter
What it means
The delete action requires an index to identify which specific recording entry to remove. Use deleteAll to remove all entries without an index.
Source
Thrown at core/src/main/java/com/taobao/arthas/core/mcp/tool/function/monitor200/TimeTunnelTool.java:131
}
if (methodPattern == null || methodPattern.trim().isEmpty()) {
throw new IllegalArgumentException("methodPattern is required for record operation");
}
break;
case "info":
case "replay":
if (index == null) {
throw new IllegalArgumentException(action + " operation requires index parameter");
}
break;
case "search":
if (searchExpression == null || searchExpression.trim().isEmpty()) {
throw new IllegalArgumentException("search operation requires searchExpression parameter");
}
break;
case "delete":
if (index == null) {
throw new IllegalArgumentException("delete operation requires index parameter");
}
break;
case "list":
case "deleteall":
break;
default:
throw new IllegalArgumentException("Unsupported action: " + action);
}
}
/**
* 标准化操作类型
*/
private String normalizeAction(String action) {
if (action == null || action.trim().isEmpty()) {
return "record";
}
View on GitHub (pinned to 21cf2e9ba5)
Solutions
- Run tt(action="list") to find the index of the recording to delete.
- Pass the integer index.
- Use action=deleteAll (alias da) if you want to clear all recordings.
Example fix
// before tt(action="delete") // after tt(action="delete", index=1000) // or delete everything: tt(action="deleteAll")
Defensive patterns
Strategy: validation
Validate before calling
// Before calling tt delete, validate index
if ("delete".equals(normalizedAction) && index == null) {
throw new IllegalArgumentException("index is required for tt delete");
} Try / catch
try {
String result = timeTunnel(action, ..., index, ...);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("delete operation requires index")) {
// index missing — provide it or use deleteAll
}
} Prevention
- Run tt(action="list") to find the index before deleting.
- Use action=deleteAll (alias da) to remove all recordings without an index.
- Always pass index for single-entry delete.
When it happens
Trigger: Calling tt with action=delete while index is null.
Common situations: User forgets to specify which recording to delete; confuses delete with deleteAll.
Related errors
- classPattern is required for record operation
- methodPattern is required for record operation
- ${action} operation requires index parameter
- search operation requires searchExpression parameter
- Unsupported action: ${action}
AI-assisted analysis of alibaba/arthas@21cf2e9ba5 (2026-08-14).
Data as JSON: /api/errors/0a2252b41c8860a2.
Report an issue: GitHub.