{"record":{"id":"e85a2a4e8720e888","repo":"apache/seatunnel","slug":"log-file-name-get-failed-get-log-path","errorCode":null,"errorMessage":"Log file name get failed, get log path: {}","messagePattern":"Log file name get failed, get log path: (.+?)","errorType":"console","errorClass":null,"httpStatus":404,"severity":"warning","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/servlet/AllLogNameServlet.java","lineNumber":49,"sourceCode":"\n@Slf4j\npublic class AllLogNameServlet extends LogBaseServlet {\n\n    private final LogService logService;\n\n    public AllLogNameServlet(NodeEngineImpl nodeEngine) {\n        super(nodeEngine);\n        this.logService = new LogService(nodeEngine);\n    }\n\n    @Override\n    protected void doGet(HttpServletRequest req, HttpServletResponse resp)\n            throws ServletException, IOException {\n        try {\n            writeJson(resp, logService.allLogName());\n        } catch (SeaTunnelRuntimeException e) {\n            resp.setStatus(HttpServletResponse.SC_NOT_FOUND);\n            log.warn(\"Log file name get failed, get log path: {}\", logService.getLogPath());\n        }\n    }\n}\n","sourceCodeStart":31,"sourceCodeEnd":53,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/servlet/AllLogNameServlet.java#L31-L53","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Set the log file path correctly in the logging configuration (log4j2 properties / appender file path) and restart the node.","Verify the configured directory exists and is readable by the SeaTunnel process user.","Confirm SEATUNNEL_HOME and related env vars point to a complete deployment.","Cross-check with errorIndex 3719: if path is blank, the log path is not configured at all."],"exampleFix":"// before (log4j2.properties)\n// appender.file.fileName = ${sys:seatunnel.logs.path}/seatunnel.log  (path unset)\n// after\n// -Dseatunnel.logs.path=/tmp/seatunnel/logs\n// appender.file.fileName = ${sys:seatunnel.logs.path}/seatunnel.log","handlingStrategy":"validation","validationCode":"// before requesting log names, ensure path is configured and exists\n// String path = logService.getLogPath();\n// if (path == null || path.isBlank() || !Files.isDirectory(Paths.get(path))) {\n//     fixLoggingConfig();\n// }","typeGuard":null,"tryCatchPattern":"try {\n    writeJson(resp, logService.allLogName());\n} catch (SeaTunnelRuntimeException e) {\n    resp.setStatus(HttpServletResponse.SC_NOT_FOUND);\n    log.warn(\"Log file name get failed, get log path: {}\", logService.getLogPath());\n}","preventionTips":["Always configure a file appender with an existing, readable directory","Validate SEATUNNEL_HOME and log-path env vars after deployments","Check the endpoint locally on each node after config changes"],"tags":["servlet","rest-api","logging","file-not-found"],"backgroundTag":"file-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}