alibaba/arthas · error · IllegalArgumentException
Argument(s) is/are expected, type 'help tt' to read usage
Error message
Argument(s) is/are expected, type 'help tt' to read usage
What it means
Thrown by checkArguments() in the `tt` command when none of the meaningful options are supplied: no index, not record mode (-t), not delete-all, no watch expression, not list (-l), and no search expression. The command needs at least one action argument to know what to do.
Source
Thrown at core/src/main/java/com/taobao/arthas/core/command/monitor200/TimeTunnelCommand.java:271
// 检查d/p参数是否有i参数配套
if ((isDelete || isPlay) && null == index) {
throw new IllegalArgumentException("Time fragment index is expected, please type -i to specify");
}
// 在t参数下class-pattern,method-pattern
if (isTimeTunnel) {
if (StringUtils.isEmpty(classPattern)) {
throw new IllegalArgumentException("Class-pattern is expected, please type the wildcard expression to match");
}
if (StringUtils.isEmpty(methodPattern)) {
throw new IllegalArgumentException("Method-pattern is expected, please type the wildcard expression to match");
}
}
// 一个参数都没有是不行滴
if (null == index && !isTimeTunnel && !isDeleteAll && StringUtils.isEmpty(watchExpress)
&& !isList && StringUtils.isEmpty(searchExpress)) {
throw new IllegalArgumentException("Argument(s) is/are expected, type 'help tt' to read usage");
}
}
/*
* 记录时间片段
*/
int putTimeTunnel(TimeFragment tt) {
int indexOfSeq = sequence.getAndIncrement();
timeFragmentMap.put(indexOfSeq, tt);
return indexOfSeq;
}
@Override
public void process(final CommandProcess process) {
// 检查参数
checkArguments();
// ctrl-C supportView on GitHub (pinned to 21cf2e9ba5)
Solutions
- Add at least one action option, e.g. `tt -l` to list, `tt -t ...` to record, or `tt -i <index>` to show a fragment.
- Run `tt --help` (or `help tt`) to see supported actions.
Example fix
// before tt // after tt -l
Defensive patterns
Strategy: validation
Validate before calling
if (index == null && !isTimeTunnel && !isDeleteAll
&& StringUtils.isEmpty(watchExpress) && !isList
&& StringUtils.isEmpty(searchExpress)) {
fail("tt needs at least one action argument");
} Type guard
null
Try / catch
null
Prevention
- Always pass at least one action option to tt.
- When unsure, start with `tt -l`.
When it happens
Trigger: Running a bare `tt` with no options at all.
Common situations: Typing `tt` expecting a menu or default action; piping an empty argument set; alias misconfiguration that drops all flags.
Related errors
- Time fragment index is expected, please type -i to specify
- Class-pattern is expected, please type the wildcard expressi
- Method-pattern is expected, please type the wildcard express
- Invalid line number: {}
- Line number must be greater than 0: {}
AI-assisted analysis of alibaba/arthas@21cf2e9ba5 (2026-08-14).
Data as JSON: /api/errors/7f480ae52dc85b19.
Report an issue: GitHub.