apache/seatunnel · warning

Log file name get failed, get log path: {}

Error message

Log file name get failed, get log path: {}

What it means

AllLogNameServlet.doGet delegates to logService.allLogName() to list log files. If it throws SeaTunnelRuntimeException (typically the local log path is unresolvable/invalid), the servlet responds 404 NOT_FOUND and logs this warning containing the configured log path, instead of a stack-trace response.

Source

Thrown at seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/servlet/AllLogNameServlet.java:49

@Slf4j
public class AllLogNameServlet extends LogBaseServlet {

    private final LogService logService;

    public AllLogNameServlet(NodeEngineImpl nodeEngine) {
        super(nodeEngine);
        this.logService = new LogService(nodeEngine);
    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {
        try {
            writeJson(resp, logService.allLogName());
        } catch (SeaTunnelRuntimeException e) {
            resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
            log.warn("Log file name get failed, get log path: {}", logService.getLogPath());
        }
    }
}

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Set the log file path correctly in the logging configuration (log4j2 properties / appender file path) and restart the node.
  2. Verify the configured directory exists and is readable by the SeaTunnel process user.
  3. Confirm SEATUNNEL_HOME and related env vars point to a complete deployment.
  4. Cross-check with errorIndex 3719: if path is blank, the log path is not configured at all.

Example fix

// before (log4j2.properties)
// appender.file.fileName = ${sys:seatunnel.logs.path}/seatunnel.log  (path unset)
// after
// -Dseatunnel.logs.path=/tmp/seatunnel/logs
// appender.file.fileName = ${sys:seatunnel.logs.path}/seatunnel.log
Defensive patterns

Strategy: validation

Validate before calling

// before requesting log names, ensure path is configured and exists
// String path = logService.getLogPath();
// if (path == null || path.isBlank() || !Files.isDirectory(Paths.get(path))) {
//     fixLoggingConfig();
// }

Try / catch

try {
    writeJson(resp, logService.allLogName());
} catch (SeaTunnelRuntimeException e) {
    resp.setStatus(HttpServletResponse.SC_NOT_FOUND);
    log.warn("Log file name get failed, get log path: {}", logService.getLogPath());
}

Prevention

When it happens

Trigger: GET the log-name listing endpoint when logService.allLogName() cannot resolve the configured log directory: log path not set in logging config, path does not exist, or filesystem error while listing files.

Common situations: seatunnel log4j2/log path property missing or wrong in the deployment; container image without the expected logs directory; permissions preventing directory listing; moving from default to custom SEATUNNEL_HOME without updating log config.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/e85a2a4e8720e888. Report an issue: GitHub.